Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
With the addition of the new defaults UI, there should no longer be a need for the custom field to be manually added to an entity type. It seems that the field is now created automatically per supported entity type (right now just nodes). We need to a) block the field from being addable via the UI, and b) make sure there's an upgrade path.
Comment | File | Size | Author |
---|---|---|---|
#12 | panelizer-n2835590-12.patch | 1.35 KB | DamienMcKenna |
|
Comments
Comment #2
DamienMcKennaComment #3
EclipseGc CreditAttribution: EclipseGc commentedNo, because the field tracks:
1.) Custom override level data in the situations where we perform that operation
2.) WHICH default this entity is using in the case that bundle allows layout selection.
If layout selection is not enabled AND customization is not enabled, then in that case I don't believe we would even deploy the panelizer field as it currently stands for all the reasons you suggested in the OP.
Eclipse
Comment #4
DamienMcKennaThe question then becomes: why do we need the custom field if the custom table can store exactly the same data, even the same columns? Is there any benefit to it that couldn't be moved into the custom table?
Comment #5
EclipseGc CreditAttribution: EclipseGc commentedI'm confused. The reason we implemented it as a field is to get native revision control for free. It'll also make language easier when we get that squared away. What are you proposing we do instead?
Comment #6
dsnopekThat's one of the reasons, but there's more!
That said, I'm also caught a little off guard about the field be required now. In my original implementation it was only necessary for per-entity customizations. But what EclipseGC writes #3.2 makes sense, and I don't really see any way around it (without adding the field as soon as there is more than one default, but that seems... less good).
Comment #7
DamienMcKennaI understand the benefits of adding a field, the problem is, though, that it doesn't seem to actually be used?
Comment #8
DamienMcKennaThe issue may be that the field is not supposed to be exposed to be added, in which case we just need a way of stopping the field from being manually added.
Comment #9
japerryRemoving it from the UI would be nice, but I don't think its a priority and also is not a blocker to a release.
Comment #10
dsnopekEven if it's just like a 5 line
hook_form_alter()
, I think we should put something in for the 3.0 release.Comment #11
dsnopekComment #12
DamienMcKennaThis hides the field from field_ui_field_storage_add_form().
Comment #13
DamienMcKennaI just thought of something - do we need an update script to migrate data away from any custom fields that people might have added into the correct tables?
Comment #15
DamienMcKennaCommitted.
Comment #16
DamienMcKennaI created a new issue to further work on removing the field, which can be done later: #2841710: Remove the custom Panelizer field from Field API
Comment #17
DamienMcKennaI created a new issue to deal with any legacy data that might exist: #2841712: Move data over from any custom Panelizer fields to the new entity data structures