Drupal Association members fund grants that make connections all over the world.
I am building a number of node template variants based on a list field on the node where the content admin can choose which layout they would like their page to have.
I've chosen this field under "selection rules" for each variant and chosen the appropriate value for the variant. After changing the value for this field, if I click the configure settings gear for the item, the values are presented with the default value rather than the value I selected for the active variant. If I change the value again and click "update and save", when I return to the "selection rules" tab and click on the configure settings gear, yet again the default value is selected instead of the value I had chosen and saved.
The result is that changing the value for this field on the node does not result in the appropriate page variant being applied to that node page.
Oddly enough, the export code outputs the correct value for this setting:
$handler->conf = array( 'title' => 'T3 Interior Template Three', 'no_blocks' => 0, 'pipeline' => 'standard', 'css_id' => 'tfa-template-three', 'css' => '', 'contexts' => array(), 'relationships' => array(), 'access' => array( 'plugins' => array( 0 => array( //Layout Setting 'name' => 'entity_field_value:node:page:field_page_layout', 'settings' => array( 'field_page_layout' => array( 'und' => array( 0 => array( 'value' => 'three', ), ), ), 'field_page_layout_value' => 'three', ), 'context' => 'argument_entity_id:node_1', 'not' => FALSE, ), 1 => array( 'name' => 'node_type', 'settings' => array( 'type' => array( 'page' => 'page', ), ), 'context' => 'argument_entity_id:node_1', 'not' => FALSE, ), ), 'logic' => 'and', ), );
I've tested this on a clean install of Drupal and was able to recreate the issue.
Steps to reproduce:
- Add a list (text) field with radios widget to any node type
- provide 2-3 options for that field
- Enable the Node Template page in Page Manager
- Create a new variant
- Under selection rules, choose the new field you created from the drop-down list. configure it to use any one value.
- choose the "all criteria must pass option"
- Save the variant
- Create a test node with the same value for the option field as your page variant and notice that the panel is not applied to that node.
- Edit the variant. click the "configure" gear next to you field selection rule and notice that the default option is selected instead of the option previously specified.
Let me know if I can provide any more information. The entirety of the variant export code is attached.