Problem/Motivation
Basically, it's a follow up for:
#2883680: Force all route filters and route enhancers to be non-lazy
We have made changes to routing filters and enhancers:
- \Drupal\Core\Routing\Enhancer\RouteEnhancerInterface | \Drupal\Core\Routing\RouteFilterInterface are removed
- Service ID collector functionality added
and made them non-lazy: #2883680-104: Force all route filters and route enhancers to be non-lazy
Since that we have to:
1. Update VariantRouteFilter
to be implemented from Drupal's FilterInterface
instead of Symfony's RouteFilterInterface
.
see: \Drupal\Core\Routing\Enhancer\RouteEnhancerInterface | \Drupal\Core\Routing\RouteFilterInterface are removed
2. Update page_manager.services.yml
to use the same approach like core.services.yml
for page_manager.variant_route_filter
service.
Proposed resolution
Fix that according to change records mentioned above.
Remaining tasks
1. Review this issue when #2915772: Deprecate non_lazy_route_enhancer service tag in favor of route_enhancer, same for non_lazy_route_filter and route_filter is done.
2. TBC
Comments
Comment #2
alphawebgroupComment #4
MaskOta CreditAttribution: MaskOta commentedWithout this fix i was not able to install the module so i think this is critical.
The patch fixed it for me but i don't know what the consequences are.
Comment #5
alphawebgroupthere are no consequences
it just replaces one interface to other according to the description at the top of the issue
those fails in tests basically are not related to this patch I think (at least by a quick overview)
Comment #6
alphawebgroupComment #7
alphawebgroupComment #8
alphawebgroupComment #9
alphawebgroupComment #10
alphawebgroupComment #11
alphawebgroupComment #12
alphawebgroupComment #14
alphawebgroupsome tests have been fixed
Comment #16
alphawebgroupit looks like tests are broken...
also, this one:
in
/web/core/lib/Drupal/Core/Routing/Enhancer/RouteEnhancerInterface.php
will not allow make tests green as I understandbefore we get fixed CTools'
/web/modules/contrib/ctools/src/Routing/Enhancer/WizardEnhancer.php
Comment #17
alphawebgroupComment #18
joelpittetThis gets past the
After upgrading to Drupal Core 8.5.x.
Comment #19
joelpittetActually, maybe needs to be tested with 8.4 first before RTBC.
Comment #20
dillix CreditAttribution: dillix commented+1 for RTBC, error has gone away after upgrade to 8.5.x
Comment #21
larowlan8.5.0-alpha1 is out.
Queued test-runs for 8.4.x and 8.5.x - so we need to see if it passes on both branches, and then fix fails if not.
Comment #22
jibranVariantRouteFilter
was running before core route filters and giving me 405 instead of 404. Here is the fix.Comment #23
AnybodyI can confirm that #22 fixes the problem with Drupal > 8.4.x while it breaks things for 8.4.x.
Comment #24
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedYes, the new interface:
is only in core 8.5 and 8.6. It has not been backported to 8.4, but I have asked for this on #2924899: Backport \Routing\EnhancerInterface to core 8.4
Jonathan
Comment #25
alphawebgroup@jibran thank you for your fix, I definitely missed that we need to fix page_manager.variant_route_filter service.
Comment #26
aleksipCan also confirm that #22 works with 8.5.0-rc1.
Comment #27
dillix CreditAttribution: dillix commented8.5 was released today, so we need to fix this is issue
Comment #28
mglamanThis fixed my install.
Comment #29
tuchoHi!
I just tested the patch with the Drupal 8.5.0 release and it works ok.
Comment #30
hvanderheide CreditAttribution: hvanderheide commentedRan into the same issue and the patch fixed it for me. For anyone who has to figure out how to patch the code (like me):
# cd modules/contrib/page_manager
# wget https://www.drupal.org/files/issues/2918564-22.patch
# patch -p 1 < 2918564-22.patch
Comment #31
AnybodyI can also confirm compatibility with 8.5.0
Comment #32
tim.plunkettOut of scope. Especially shouldn't remove the first hunk, since we need to use the new trait in Symfony CMF eventually.
If someone doesn't have time to revert those hunks, then I'll do it in a bit, before commit.
Comment #34
tim.plunkettThanks for the patch! Committed.
Comment #35
karolus CreditAttribution: karolus as a volunteer commentedTested with 8.5.0 running PHP 7.0 and Panels Everywhere. With this patch to CTools, all running nominally, no issues found.
Comment #36
alphawebgroupThank you folks! It’s finally fixed!
Many thanks.
Comment #37
freelylw CreditAttribution: freelylw commentedI apply this patch on the latest dev version, I got the message:
Reversed (or previously applied) patch detected! Assume -R? [n]
Please advise what should I do ? Thank you.
Comment #38
dillix CreditAttribution: dillix commented@freelylw This patch was commited to the latest dev, why you try to patch it?
@tim.plunkett can you create new release according to #2952188: Beta 3 or new release?
Comment #39
freelylw CreditAttribution: freelylw commented@dillix I am using the latest dev version, but I still getting problem which I am not quite sure where this problem come from. please see attached screen image.
After I go through the page making process. I end up on the page there is no where I can add things in, on a "path" showing, there is no context,content,general all those links that i can add things in.
Please advise if you know what's this problem. Thank you. I am in core8.5.0
Comment #40
dillix CreditAttribution: dillix commented@freelylw you should create new issue for this problem.
Comment #41
freelylw CreditAttribution: freelylw commentedI did https://www.drupal.org/project/page_manager/issues/2951961
But I guess this topic is related problem so I post it. if I am wrong sorry for this.
Comment #42
nico.pinos CreditAttribution: nico.pinos commentedMy D8.5 site was unusable so I applied this patch and all my paths for my panel pages stopped working. They all give me a 404.
No error messages in the logs.
Are we sure this is not breaking things?
I will create another issue but I don't have much to work with since there are no errors in the logs.
Thanks!
Comment #43
xeM8VfDh CreditAttribution: xeM8VfDh commentedErm... I tried updating my site from 8.4.5 to 8.5.0 and it failed with white screen of death everywhere and this stack trace:
Comment #44
xeM8VfDh CreditAttribution: xeM8VfDh commented@joelpittet, are you suggesting in #18 that those of us on 8.4.x need to update to 8.5.0 (this broke my site), then manually install that the patch you referenced? If that is the case, do we think this fix will be rolled into a new Page Manager release soon(ish)? If so, would we need to update Page Manager before updating core to 8.5.x? Thanks in advance, much appreciated.
Comment #45
dillix CreditAttribution: dillix commented@xeM8VfDh patch was commited to the latest dev!!!
Comment #46
kadsy CreditAttribution: kadsy commentedi can confirm #39 happen to me too. D8.50 with this module latest dev.
there is no error in Log messages tho.
Comment #47
tim.plunkettCan #39 be opened as a new issue? I think that's also a bug, but is not directly tied to this issue.
Comment #48
freelylw CreditAttribution: freelylw commented@tim,plunkett issue already there :
https://www.drupal.org/project/page_manager/issues/2951961
Comment #49
xeM8VfDh CreditAttribution: xeM8VfDh commentedwhat about #42, has anyone else experienced the same issue?
@dillix thanks for the clarification. For those of us running 8.x-4.0-beta2 instead of the dev branch, do you think there is any projected time-line for this fix being pushed out into a more official release than the dev branch? I would think it would warrant a new beta, since this is a rather popular module and this fix is a requirement for the module to work with the current version of D8 (8.5.0). Thoughts?
Comment #50
tim.plunkettThanks @freelylw
@xeM8VfDh This issue has been fixed. Other problems should each have their own issue.
Comment #51
nico.pinos CreditAttribution: nico.pinos commentedWas anyone able to reproduce #42?
I'm talking about panel pages built with page manager using custom blocks.
I'm trying to make sure this is not an issue caused by something else on my installation.
Comment #52
tim.plunkettPlease open an issue describing the bug in #42.
Comment #53
xeM8VfDh CreditAttribution: xeM8VfDh commented@tim.plunkett, is our only option to deploy the patch or install the dev branch instead of the latest beta branch? Or will a new beta branch be issued for this, seeing as this fix is required for 8.5.0+ compatibility, so anyone creating a new D8 site who also wants to use this rather popular module will have to use the dev branch of PM instead of the "official" beta release?
Comment #54
mpotter CreditAttribution: mpotter at Phase2 commented@nico.pinos did you create the issue for #42? After updating to page_manager 4.x-dev and core 8.5.x all of my pages are giving 404 errors also.
Edited: My guess is that the problem is there has been some config changes between the Beta2 and the Dev version without any update hooks. So doing the config-import after updating to page_manager dev and core 8.5 apparently causes broken pages. I'm going to try going back to the beta with the above patch to see if that works better.
Perhaps that is why there isn't a new Beta release yet since there would need to be update hooks to migrate any config changes.
Comment #55
mpotter CreditAttribution: mpotter at Phase2 commentedAlso, problem is that #22 doesn't actually apply to 4.0-beta2
Edited: Ahh, the problem was that the patch in #22 isn't compatible with the patch in #2876880: page_variant entity type does not exist when installing or enabling. Trying #22 by itself now.
Comment #56
mpotter CreditAttribution: mpotter at Phase2 commentedAll pages still giving 404 as in #42 even going back to the Beta2 with the patch in #22. So not a config change. Something incompatible with core 8.5. Posted new issue here: #2953056: Update to core 8.5.x breaks all page_manager pages
Comment #57
brunodbo@mpotter: Do you have Rules installed on your site? If so, the 404 issue might be related to #2951263: With Rules enabled, page_manager pages return a 404 after core 8.5 update.
Comment #58
xeM8VfDh CreditAttribution: xeM8VfDh commented@mpotter, thanks for the info. You raise a good point. Since the beta2 release is nearly a year old, and since there is apparently a fix (#22) for this issue, and since said fix is a requirement for current versions of drupal, I think the circumstances warrant drafting a new beta release that include the config migration hooks @mpotter mentioned. That is, assuming #22 is a stable fix, which it sounds like it might not be given #42 and #56
I suppose this issue covers this topic.
Comment #59
mxhI have the problem that my taxonomy routes are broken. Even the edit form now only returns entity.taxonomy_term.canonical as route.
Comment #60
tim.plunkettEach new problem that has been described (#39, #42, #59) are all related to 8.5.0, but unrelated to this particular bug.
Some have new issues (see #56, #57), others should be opened for them.