craftcms / craftcms/ckeditor

The convert command doesn't find Redactor fields in super table fields nested in matrix fields

Open
#109 9 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
47
Forks
32
PR merge metrics
No merged PRs in 30d

Description

Description

I just noticed that Redactor fields inside Super Table fields inside Matrix fields are not converted by the ckeditor/convert command. Looks like the command can't find those fields, because they don't show up in the output of the command at all. Regular Super Table fields (not nested inside Matrix fields) work fine.

Edit: I was wrong, the nested fields do show up and they are even converted correctly in the config/project/ folder. However, the changed config is not applied to the database for some reason, so the field still shows up as a Redactor field in the field settings. Running php craft project-config/apply --force fixes this, after that the field correctly shows up as a CKEditor field.

Can this be fixed inside the command? Or is this a Super Table issue?
In the meantime, it would probably be a good idea to add a note regarding this issue and the workaround to the README.

Steps to reproduce
  1. Install the Super Table plugin.
  2. Create a matrix field and add a new block type. Inside the block type, add a Super Table field. Inside the Super Table field, add a Redactor field.
  3. Run php craft ckeditor/convert. The YAML file inside config/project/superTableBlockTypes/ will be updated correctly. But the field will still show up as a Redactor field in the field settings in the backend.
  4. Run php craft project-config/apply --force. Now the field settings in the backend should correctly show the field as a CKEditor field.
Additional info
  • Craft version: 4.4.13
  • PHP version: 8.2
  • Database driver & version: MySQL 8.0.32
  • Plugins & versions: CK Editor 3.4.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the php craft ckeditor/convert command and inspect the generated YAML under config/project/superTableBlockTypes/ for nested fields. Compare the resulting backend field state before and after php craft project-config/apply --force; done means the command applies the conversion without requiring that workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.