Details
-
Bug
-
Resolution: Fixed
-
High
-
2.2.1
-
None
Description
Overriding default layout for Page FieldType results in duplicated default layout in layout choose dialog. Clicking one of the "default layouts" will result in selecting both of them.
Steps to reproduce
1. Create 2 template files in app/Resources/views/landinglayout: default.html.twig, second.html.twig - they can be empty.
2. Put below configuration in ezplatform.yml:
ezplatform_page_fieldtype: layouts: default: identifier: 'default' name: 'Default layout' description: 'Default layout for Page' thumbnail: '/bundles/ezplatformpagefieldtype/images/layouts/default.png' template: '/landinglayout/default.html.twig' zones: default_id: name: 'default' second: identifier: 'second' name: 'Second layout' description: 'Second layout for Page' thumbnail: '/bundles/ezplatformpagefieldtype/images/layouts/default.png' template: '/landinglayout/second.html.twig' zones: top_id: name: 'top' bottom_id: name: 'bottom'
3. Go to Content > Content Structure, click on "Create" and choose "Landing page".
Result
The choose layout dialog will show containing 3 layouts to choose from: default layout, a layout that overrides default layout and "second layout". After choosing one of the "default" layouts, both get checked (refer to attached screencast).