1

I duplicated an existing site, and mostly everything is working, but I'm having a hard time with the Redactor plugin.

In any field that uses it, Redactor is not enabled, and there's this message: Support for Redactor fields has been moved to a plugin.. Followed by an Enable button. If I press the Enable button, I get a message saying the plugin has been enabled, but still, the error message shows up and Redactor is not enabled.

Looking into Utilities -> Project Config -> Loaded Project Config Data, I found this:

897c004b-8a3f-4676-9e80-5d4ff6450a4c:
    columnSuffix: ejkbnkpn
    contentColumnType: string
    fieldGroup: cb80ec4a-57a3-4280-bcc4-a8394b6ef965
    handle: copy
    instructions: ''
    name: Copy
    searchable: false
    settings:
      errorMessage: 'Unable to find component class ''craft\redactor\Field''.'
      expectedType: craft\redactor\Field
      settings: '{"availableTransforms":"*","availableVolumes":"*","cleanupHtml":true,"columnType":"text","configSelectionMode":"choose","defaultTransform":"","manualConfig":"","purifierConfig":"","purifyHtml":"1","redactorConfig":"Standard.json","removeEmptyTags":"1","removeInlineStyles":"1","removeNbsp":"1","showHtmlButtonForNonAdmins":"","showUnpermittedFiles":false,"showUnpermittedVolumes":false,"uiMode":"enlarged"}'
    translationKeyFormat: null
    translationMethod: none
    type: craft\fields\MissingField

I was able to go to Settings -> Plugins and uninstall and remove Redactor. Then, from the plugin store, I installed it again. The problem is still the same.

I have also removed and installed Redactor by manually issuing commands to composer:

nitro composer remove craftcms/redactor
# 
nitro composer require craftcms/redactor
#
nitro composer update

But the problem persists.

I suspect the source of the issue comes from the way I duplicated the site. These were my steps:

# 1. In the new project's directory:
nitro create myproject
nitro craft setup
# 2. Then, copied from the old project the following directories, files:
  ./config
  ./modules
  ./templates
  ./vendor
  ./web
  composer.json
# 3. From the old project, I created a db backup, which I then uploaded to the new project's database.
# 4. To auto load modules and download/install plugins in the new project I ran
nitro composer dump-autoload -a
#
nitro composer update

There might be some redundant steps on my workflow. So I'm open to suggestions there too.

And would really like to know how to get Redactor working again.

Thank you so much.

1 Answer 1

1

As it is often the case, I found a solution, but I'm not sure what went wrong on the first place.

I repeated the steps to create the duplicated site, but instead of doing a manual export and import of the database I use nitro to import it, and then my problem was gone. I admit, it's nice to do everything form within your terminal, and not having to deal with one more piece of software to import the sql file.

Below you'll see an updated sequence for my site cloning using Nitro.

# 1. In the new project's directory:
nitro create myproject
nitro craft setup

# 2. Create a db backup in the original site
Control panel -> Utilities -> Database Backup

# 3. Import the db into the new site
nitro db import theExportedSQLFile
  # Nitro will ask you into which db you want to import the sql file. Choose the new site's dB

# 4. Then, copy the following folders, and files, from original to new site:
  * ./config (then delete the license.key file, a new, unique one will be autogenerated)
  * ./modules
  * ./templates
  * ./vendor
  * ./web
  * composer.json, composer.lock

# 5. To auto load modules and download/install plugins in the new project I ran
nitro composer dump-autoload -a
nitro composer update

# 6. Update settings 
In the control panel go to backend -> settings -> General, Sites & Email.

All in all, this should not take more than 10 minutes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.