Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matrix blocks with multiple redactor fields aren't all converted #349

Open
brucejxz opened this issue Jan 3, 2025 · 4 comments
Open

Matrix blocks with multiple redactor fields aren't all converted #349

brucejxz opened this issue Jan 3, 2025 · 4 comments
Labels

Comments

@brucejxz
Copy link

brucejxz commented Jan 3, 2025

Description

If a matrix block contains more than 1 redactor field, running php craft ckeditor/convert will only convert 1 of them. Note that they all seem to be converted in the project config so running the command again doesn't find them, however, only 1 of them is actually converted in the database.

Steps to reproduce

  1. Create a matrix field with a single block containing 2 redactor fields
  2. Run php craft ckeditor/convert

Additional info

  • Craft version: 4.13.8
  • PHP version: 8.2.27
  • Database driver & version: MariaDB 10.11.10
  • Plugins & versions: Redactor 3.1.0, CKEditor 3.10.0
@brucejxz brucejxz added the bug label Jan 3, 2025
@jpcarpenter
Copy link

jpcarpenter commented Jan 9, 2025

I’m experiencing the same issue mentioned here. Additionally, I've noticed that after running the command:

php craft ckeditor/convert/redactor

all previously enabled/selected asset volumes in Redactor fields are being deselected. This results in broken links for content that was previously set up using the Redactor fields.

In my circumstance, I think the asset volume issue might stem from the migration process from Craft 3 to Craft 4. During the migration, filesystem configurations silently fail to be created, which likely caused the asset volumes settings within the newly converted ckeditor fields to be omitted completely. I made an issue over on the Craft CMS repo about this, you can find that here.

Additionally, I found this stack overflow post which describes the migration issue, but it unfortunately doesn't have any solutions.

@jpcarpenter
Copy link

jpcarpenter commented Jan 10, 2025

Just to follow up: I've fixed the issue about the filesystems not being automatically created. This had to do with there being deprecated syntax located within my projects general.php file. Once those were addressed, I ran php craft migrate/all and filesystems were successfully created.

However, the main issue this post references is still at play. All ckeditor fields located within matrix fields are now missing content, regardless if there are one or more ckeditor fields existing in a single block.

@i-just
Copy link
Contributor

i-just commented Jan 13, 2025

Could you please try what’s described in this comment: #301 (comment)?

@jpcarpenter, you could also try doing your 3 -> 4 upgrade first, and once that’s done and everything works as expected, do the Redactor to CKEditor conversion.

@jpcarpenter
Copy link

@i-just that worked! Just to recap for anyone in the future: I resaved all entries via ddev craft resave/entries, then I also resaved all matrix block fields which had redactor fields via ddev craft resave/matrix-blocks --field=myFieldHandle. Once those were complete, I ran and went through the process of converting redactor fields to ckeditor fields via ddev craft ckeditor/convert/redactor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants