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.
I upgraded the page_manager to 8.4 alpha 2. When I want to create a node override node/{node} at saving I get an unexpected error and the log says:
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" plugin does not exist.
I uninstalled all (page_manager / panels / panalizer) and reinstalled them. It didn't work
Drupal is on 8.3.1
Comment | File | Size | Author |
---|---|---|---|
#12 | 2874489-12.patch | 556 bytes | phenaproxima |
| |||
#11 | 2874489-11.patch | 604 bytes | alexrayu |
#7 | 2874489-6.patch | 565 bytes | alexrayu |
| |||
#6 | 2841445-3.patch | 1.79 KB | alexrayu |
Comments
Comment #2
alexrayu CreditAttribution: alexrayu commentedI am having this issue with a fresh installation of Drupal with the page manager installed with composer.
Comment #3
alexrayu CreditAttribution: alexrayu commentedBreaks site, bump to major.
Comment #4
alexrayu CreditAttribution: alexrayu commentedDid some fast debugging - the discovery's doGetDefinition() ends up receiving a list of LayoutDefinitions rather than plugin definitions.
Versions:
ctools: 8.x-3.0
page manager: 8.x-4.0-beta2
panels: 8.x-4.0
panelizer: 8.x-4.0
Backtrace:
Comment #5
alexrayu CreditAttribution: alexrayu commentedThe issue is in panels, moving the issue.
Comment #6
alexrayu CreditAttribution: alexrayu commentedThe plugin selector form does not apply the selected layout on form submit within the wizard, which created the issue. For me, the fast solution has been the attached patch. Please review.
Comment #7
alexrayu CreditAttribution: alexrayu commentedApologies! The correct patch attached.
Comment #8
phenaproximaI was reproducing this problem on Panels 4.0. I applied the patch in #7 and it instantly fixed the problem for me. It seems to me that this will need a regression test before commit, though. Thank you, @alexrayu!!
Comment #9
phenaproximaWelp, according to @tim.plunkett, the branch tests are failing without this fix. So I guess a regression test is not needed. In which case...I came, I saw, I tried the patch, it worked. That's an RTBC as far as I'm concerned.
Comment #10
tim.plunkettTests passed last time we rolled a release, 8.x-4.0-beta1. They are failing in 8.x-4.0.
I began with
(first is the most recent known bad commit, second is the most recent known good commit).
At each step of the way, bisect checks out a new hash, and you must tell it if the commit is good or bad.
To determine if the commit was good, I ran
And the first two times, the test failed, so I ran
Because there were only a few commits, I only had to do this a couple times before git informed me of the breaking commit: #2873767: Tabledrag from change layouts doesn't work
The change to src/Form/LayoutPluginSelector.php in that patch seems to be exactly the problem.
However, I do not think the above fix is 100% right.
The correct fix would be
$variant_plugin->setLayout($form_state->getValue('layout'), $form_state->getValue('layout_settings') ?: []);
inside that new else{} block.
The above patch makes little sense to me, since
$cached_values['plugin']
is immediately overwritten.Furthermore, it does not take into account the
'layout_settings'
portion.Retagging for test coverage.
EDIT:
Just tested this with
git bisect run
, and it seems to work great!and that automatically found the right commit. Cool!
Comment #11
alexrayu CreditAttribution: alexrayu commentedUploading the updated patch with corrections requested by @tim.plunkett
Comment #12
phenaproximaI discussed this with @tim.plunkett on Slack and we realized that the test coverage is complete as-is, and does catch this. Furthermore, the
$form_state->getValue('layout_settings') ?: []
bit of the patch in #11 is unnecessary. Why? Because the LayoutPluginSelector form doesn't mention layout_settings in its buildForm() method. The layout settings are configured in the next step of the wizard, which is a separate form. Indeed, the existing PanelsTest asserts for this.I have confirmed that PanelsTest passes locally with this patch applied, and fails without it. I think we can safely say it's RTBC by this point.
Comment #14
japerryBased on the major regression we're getting here, and the fact that adding the else around what was the old code seems to fix the 'change layout' functionality that was previously broken, it looks like we can commit this.
Rolling a 4.1 release as well.
Comment #15
parijke CreditAttribution: parijke commentedI checked the patch. The problem mentioned is solved.
Many thanks
Comment #16
seyfettinkahveci CreditAttribution: seyfettinkahveci commentedI see that this problem is solved in the newest version of the module. Thanks
Comment #17
parijke CreditAttribution: parijke as a volunteer commented