Closed (fixed)
Project:
Page Manager
Version:
8.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
29 Mar 2016 at 16:33 UTC
Updated:
16 Apr 2016 at 14:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
andrewbelcher commentedSo here are some patches, one just the test and one with the fix as well.
I have added:
As #2650588: Entities with plugin collections should be updated before serialization was released in 8.0.4. Is this still the right way TM to depend on a minimum version of core?
The addition of
\Drupal\page_manager\Plugin\DisplayVariant\PageBlockDisplayVariant::__sleepcould arguable by better in\Drupal\ctools\Plugin\DisplayVariant\BlockDisplayVariantas that includes the trait that introduces the context... Very happy to update the patch to remove that and create a CTools issue, though we'll either be blocked on that or have to put it in here with an@todoto remove it...Comment #4
andrewbelcher commentedPostponing this on a couple other issues - have updated the issue summary and will get the patch that applies on top of those two uploaded soon.
Comment #5
andrewbelcher commentedHere's some updated patches that apply on top of the current patches in #2692325: Add description to Page/#2690047: Allow setting the Page on a PageVariant.
I have also fixed a bug in the
testHttpStatusCodeVariantPluginwhere I was creating the wrong plugin type and I've expanded the tests to actually check the post-serialization values are as expected.Comment #6
andrewbelcher commentedRe-uploaded so they can be tested when this is unpostponed.
Comment #7
andrewbelcher commentedOk, those other issues are committed now.
Comment #9
andrewbelcher commentedThis got partially committed as part of #2550879: Use CTools Wizard API to add/edit Pages (and move plugin UI using PluginWizardInterface). Unfortunately, it looks like the solution currently here (which was committed) is actually insufficient and could introduce rather than solve problems.
Specifically, dependency on core are no semver compatible (#2641658: Module version dependency in .info.yml is ineffective for patch releases). It looks like it ends up completely , so HEAD of page_manager will currently pass dependency validation on
>=8.0. This means that anyone who is on anything after e.g.8.0.1will not get a any notice that they are on an incompatible core version.Since the changes here defer some of the serialization work to
\Drupal\Core\Config\Entity\ConfigEntityBase::__sleepthat was released in8.0.4that will cause exceptions on earlier version.Also, the version committed has
>8.0.4rather than>=8.0.4and an @fixme was committed referring to this issue.I'll work on a patch that will:
page_manager.info.yml@fixmehook_requirements()check that will check the core versionComment #10
andrewbelcher commentedOk - here is a patch to fix things.
Comment #11
andrewbelcher commentedUnfortunately can't get the test bot to test against an old release of core :( So that will just pass...
Comment #14
andrewbelcher commentedOk, so 3 things I've found:
- That fix was actually in 8.0.5 (8.0.4 was security only)
-
Drupal\page_manager\Event\PageManagerEvents::PAGE_CONTEXTrequires the router, so I'm manually adding context to avoid that. Not 100% sure what has changed to make that now an issue...-
Drupal\page_manager\Entity\PageVariant::getVariantPluginCollectionnow sets the uuid if it doesn't exist, so I've cleared that out of the unserialized config for the assert as that is a legitimate change.I've not bothered testing the test only patch as it will pass as we can't test prior to 8.0.5 on DrupalCI.
Comment #15
andrewbelcher commentedComment #16
andrewbelcher commentedJust had a hangout with @EclipseGc. One of the changes I made to do with the UUID is actually going to be fixed upstream in CTools (preserving the UUID), so I've reverted that bit of the test. It will fail tests until CTools is updated. This does mean we may need a minimum version of CTools, which I've not included...
Comment #19
eclipsegc commentedAfter updating and releasing a new ctools alpha this test all passes and looks great. Fixed.
Eclipse
Comment #20
andrewbelcher commentedDo we not need to version our dependency on CTools?
Comment #21
eclipsegc commentedWe could, but given these are all alphas, it's pretty reasonable to expect that you should have the latest. We've had these sorts of interdependencies everywhere for many many years in this ecosystem. If we were to do it, it just means we'll be constantly updating that one line and that strikes me as odd.
Eclipse