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.
Problem/Motivation
We can create and export fieldable panels panes with UUIDs - but not other entity types.
We can attach them as page manager contexts in code however, the reference is made using the serial ID.
Sample exported code showing context:
'contexts' => array(
0 => array(
'identifier' => 'My pane',
'keyword' => 'node',
'name' => 'entity:node',
'entity_id' => '2',
'id' => 1,
),
),
Proposed resolution
Provide an entity context that uses UUID.
Remaining tasks
Patch (in progress)
Review.
Tests.
User interface changes
None
API changes
New context type
Comment | File | Size | Author |
---|---|---|---|
#7 | uuid-context-support.patch | 2.75 KB | rhys |
#1 | ctools-uuid-entity-2384715.patch | 11.74 KB | larowlan |
#1 | Screenshot 2014-12-01 13.33.42.png | 14.85 KB | larowlan |
#1 | Screenshot 2014-12-01 13.33.29.png | 8.51 KB | larowlan |
#1 | Screenshot 2014-12-01 13.33.17.png | 19.24 KB | larowlan |
Comments
Comment #1
larowlanSample of new context on export
Screenshots:
Comment #2
larowlanComment #3
larowlanComment #4
larowlanComment #5
DamienMcKennaComment #7
rhys CreditAttribution: rhys commentedI condensed this down so that it would simply add the UUID to any existing contexts that support entity uuids.
Although this patch doesn't sufficiently clean the features so the overridden notice will still be there.
Comment #8
gnucifer CreditAttribution: gnucifer commentedThis issue is basically the same as https://www.drupal.org/node/2145567? I am also in need of this functionality. Will have a look at #7.
Comment #9
gnucifer CreditAttribution: gnucifer commentedAfter trying out and reviewing all the patches in this thread and discovering some issues I have come to the conclusion that the patch in https://www.drupal.org/node/2145567 is probably the way to go. It's probably also nicer that the integration resides in the uuid module.
Comment #10
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedThe 4 year old patch in #7 to entity.inc applied cleanly to the latest ctools 7.x-1.x-dev, but per gnucifer's comment in #9 it sounds like this issue may need to be closed in favor of the patch in #2145567: CTools Contexts are missing UUID support..