Closed turnstylerj closed 6 months ago
That’s expected. Only fields that store content in the content
table are reusable within a field layout.
This is also the case with CKEditor fields. Are they also not expected to be reuseable?
CKEditor fields are a bit of an edge case because, while they do store content in the content
column, they also manage nested entries. The way it works right now, some nested entries would end up getting deleted unexpectedly when saving, if they were multi-instance. So they are single-instance for the time being. It should be possible for us to make multi-instance work for them, though.
Can I say that from the perspective of someone building out a site, this limitation feels like a bug.
"I thought we didn't have to make redundant duplicated fields anymore; why is this broken for Matrix fields?" is what that feels like.
CKEditor 4.0.0-beta.8 is out now with multi-instance support 🎉
Just to clarify, as I've have been getting myself into knots with fields/entry-type/matrix since going deeper into scaffolding out Craft5... this fix is for allowing multiple instances of a CKeditor field in an Entry Type, and not Matrix? So we can not pull in multiple instances of a single matrix-field into an Entry Type still, but now we can have multiple instances of a single CKEditor field in an Entry Type?
@MattWilcox Correct. Just mentioning it here since it came up in the discussion.
First off, Craft 5 has some great improvements such as which reusing fields.
In regards to not being able to reuse matrix fields: same goes for the entries
field. It would be great if these could be reused as well. I tend to allow our clients to select entries for e.g. the Contact page, privacy statement and disclaimer for use in various templates. If the entries field would be reusable this would save me creating separate fields for these items.
+1 for this feature. This would be super awesome!
Content reuse is a big selling point of other "expensive" Composable CMS platforms such as Contentful, and even Enterprise Content Management systems like MadCap or Paligo. This follows the DRY (Don't Repeat Yourself) principle. Being able to find (search for) and insert nested, re-useable, atomic (matrix/neo fields) content in the GUI, would be great, and could let us keep one of our growing projects in Craft where this has been a consistent pain point for content creators dealing with knowledge-base content for related products.
For some examples/ideas from the "super duper expensive" CCMS/ECM platforms, here's how Contentful content re-use works: https://training.contentful.com/student/page/792577-reusing-content-across-compose And Paligo: https://paligo.net/content-reuse/ (although this is a deep-copy and not a true instance)
@dolphiq-allard @humandevs See https://github.com/craftcms/cms/discussions/8497#discussioncomment-9525050.
What happened?
Description
In the field layout designer where fields can now be re-used with custom handles, Matrix fields still disappear when they're dragged into the field layout.
Steps to reproduce
Expected behavior
Matrix field persists in the available field options and is able to be re-used with a new handle.
Actual behavior
Matrix field disappears from available field options.
Craft CMS version
5.0.0-beta.2
PHP version
8.2.13
Operating system and version
Linux 5.15.68-0-virt
Database type and version
MySQL 8.0.33
Image driver and version
Imagick 3.7.0 (ImageMagick 6.9.11-60)
Installed plugins and versions
"craftcms/ckeditor": "4.0.0-beta.6" "nystudio107/craft-seomatic": "5.0.0-beta.5"