After having created an initial panels page and variant, and configured it with a layout, I cannot go back and edit that variant and change to another variant. I can select them from the dropdown just fine, and get a message saying that the page is saved, but the configuration is not changed when I go back and edit the variant.
I would expect all my blocks to be moved to the first region of the new layout, allowing me to shuffle them into place afterwards.
I have tested this with a vanilla (minimal) install of Drupal 8.1-beta1 and latest Panels 8.x-3.x, as well as the dev version of Page Manager and latest alpha releases of Layout Plugin and CTools. I had some custom layouts in my theme, but it makes no difference whether I try this with those or the ones that come with Panels.
Comment | File | Size | Author |
---|---|---|---|
#18 | panels-screen.png | 68.41 KB | phjou |
#17 | Edit Panels variant - Profood Tech 2016-09-23 13-41-52.png | 158.54 KB | dobrzyns |
#12 | patch-issue-2687483-cannot-switch-variant-layout.patch | 856 bytes | phjou |
| |||
#6 | cannot_switch_variant_layout-2687483.patch | 664 bytes | doostinharrell |
Comments
Comment #2
achtonAdditional info: if I export the configuration and then manually alter the value of
variant_settings.layout
to the layout I need and re-import, it works.Comment #3
jackalope CreditAttribution: jackalope commentedI experience the same thing using Panels 8.x-3.0-beta4; I mistakenly filed it as a page_manager issue.
Comment #4
rjbaron CreditAttribution: rjbaron as a volunteer commentedTemporary workaround:
I am seeing the same issue when attempting to change it via the admin page, however I am able to change the variant layout if I am using the in place editor gui.
Comment #5
rcodina CreditAttribution: rcodina commented@rjbaron Thanks for the workaround!
Comment #6
doostinharrell CreditAttribution: doostinharrell at Blue Oak Interactive commentedThis appears to be an issue with the layout plugin selector code. I have a temporary fix that works against the latest dev release. Hope it helps someone.
Comment #7
doostinharrell CreditAttribution: doostinharrell at Blue Oak Interactive commentedComment #8
phjouI was about to look for the problem and patch it but hopefully I found this issue. The pach #6 works well for me. The Layout is correctly updated.
Moreover, it was really strange because the select value in the "Layout" tab couldn't be changed, but after clicking on the save button in the "Layout" tab, the content had the new correct structure in the "Content" tab.
Thank you for the patch.
Maybe it is time to make a new release, I had other problems earlier when I tried the actual release. I think the actual release is just too buggy to be used, but the dev branch seems pretty stable to me.
Comment #9
doostinharrell CreditAttribution: doostinharrell at Blue Oak Interactive commentedComment #10
phjouHello, the patch works well on this issue but it creates another bug for me. I am not able to create a new page with a variant anymore. It works well without the patch.
I have this error when I attempt to create a new page. It occurs just after choosing the layout:
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" plugin does not exist. in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 52 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).
For information, I have found another person with the same error on this issue: https://www.drupal.org/node/2761795 but I'm not sure he applied the patch. Maybe it's a more complicated problem...
Comment #11
doostinharrell CreditAttribution: doostinharrell as a volunteer and at Blue Oak Interactive commentedHi @phjou,
Are you running the latest dev release of ctools, pagemanager, and panels? I'm not able to reproduce the issue when using the latest versions. I would update and re-patch. I also had that error message before updating as well.
Comment #12
phjouI am on the latest release (dev branch) of all these modules and I still have the bug at the creation of a new page after choosing the layout. The only difference is that I have a patch on ctools: https://www.drupal.org/files/issues/ctools_2672110_16.patch
I haven't tested if the patch is the cause of our difference, but I don't really see why this patch could be the reason of that difference of behaviour.
Concerning panels, I think that the code which was in the "else" that you put in the "if" should always be done. I have done a patch and it seems to be ok for me in both cases: "change the layout" and "create a new page".
Comment #13
icicleking CreditAttribution: icicleking as a volunteer commentedI have the same issue. I will test patches against the latest dev releases when time allows.
Comment #14
japerryComment #16
samuel.mortensonThe patch from #6 failed tests and was reviewed by the person submitting it, and the patch from #12 has not been reviewed. Moving back to Needs Review.
Comment #17
dobrzyns CreditAttribution: dobrzyns at PMMI Media Group commentedI applied the patch from #12 and tested this with Drupal 8.2.0-rc1 and the dev version of panels. The Layout dropdown disappeared and instead the "Builder" dropdown appeared. However, I can successfully change the layout using the in-place editor.
The "layout" dropdown also doesn't appear with the standard builder:
Comment #18
phjouHi,
I want to reproduce your problem but I'm confused about your interface, it doesn't look like mine on my screen with a 8.1.10 Drupal installation.
I'm using page_manager, layout_plugin and panels but I have this interface (attached image) which is pretty different. I can change the builder in the "General" tab and the layout in the "Layout" tab but not both at once.
Could you tell me exactly which modules do you have? Only panels? Thank you for testing my patch, I will try to reproduce your problem when I will have some time.
Comment #19
icicleking CreditAttribution: icicleking as a volunteer and at Last Call Media commentedComment #20
japerryComment #21
dobrzyns CreditAttribution: dobrzyns at PMMI Media Group commented@phjou That was my bad. I must have thought I had the dev version of both panels and page_manager and didn't.
The patch in #12 works great on an existing site.
Comment #22
dobrzyns CreditAttribution: dobrzyns at PMMI Media Group commentedComment #23
DamienMcKennaFYI nplowman added a patch for this in #2824632: Changes to Layout not being saved that is almost identical to this patch. I'm not sure which is the correct approach, both appear to (mostly) work, but this is the older one.
Comment #25
japerryLooks good to me. Fixed.