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 just updated Sub-pathauto and Redirect modules. Since then my sites went unavailable. Manually removing Sub-pathauto module directory solves the problem.
Comment | File | Size | Author |
---|---|---|---|
#15 | infinite_loop-1790508-15.patch | 1.23 KB | stBorchert |
#14 | infinite_loop-1790508-14.patch | 854 bytes | stBorchert |
#11 | Selection_027.png | 171.38 KB | girishmuraly |
Comments
Comment #1
kinyik90 CreditAttribution: kinyik90 commentedSame here. My site become white screen after I updated sub-pathauto and redirect module.
Comment #2
cesareaugusto CreditAttribution: cesareaugusto commented@kinyik90 How did you solve it?
Comment #3
PlayfulWolf CreditAttribution: PlayfulWolf commentedcan confirm the same - with module updated to 1.3 site is throwing WSOD on most of the heavier pages, using redirect, global redirect and subpathauto, had a really hard time understanding this, as updated bunch of modules
when downgrading to 1.2 - everything works fine
Comment #4
cesareaugusto CreditAttribution: cesareaugusto commenteddid you find any solution?
Comment #5
andrewbelcher CreditAttribution: andrewbelcher commentedI can confirm the same. Upgrading to 7.x-1.3 breaks it. Downgrading back to 7.x-1.2 fixes it. My issue was running out of memory when it tried to build the menu.
The call to
menu_get_item()
is new. Inmenu_get_item()
there is the following:I wonder if maybe there is an infinite recursion happening? I was still getting it dying even when I upped the memory to 1GB, so there is definitely something infinite going on.
Comment #6
blafri CreditAttribution: blafri commentedAlso can confirm the same. After update to 7.x-1.3 site throws wsod. problem is runing out of memory no matter how high I set the php memory limit.
Comment #7
chrisroditis CreditAttribution: chrisroditis commentedSame here
Comment #8
sashken2 CreditAttribution: sashken2 commentedSub-pathauto 7.x-1.3 don't work with XML sitemap menu 7.x-2.0-rc1 for me
Comment #9
Anonymous (not verified) CreditAttribution: Anonymous commentedRelated core issue #1815354: menu_get_item when called from hook_url_inbound_alter causes infinite loop.
At this time calling mingw_get_item or any API that might should not be called from the hook_url_inbound_alter() implementation.
Comment #10
thetech249 CreditAttribution: thetech249 commentedSame here downgraded to 1.2 fixed it for me.
Comment #11
girishmuraly CreditAttribution: girishmuraly commentedI can confirm the same. I get recursion when I clear drupal caches. Screenshot attached.
Comment #12
Anonymous (not verified) CreditAttribution: Anonymous commentedHow about the following as a workaround?
Comment #13
polskikrol CreditAttribution: polskikrol commentedLooks like I may have the same issue. After enabling the 1.3 version of the module everything takes FOREVER to load with things timing out. Looks like I will have to disable the module via a MYSQL table update and then try 1.2 version.
Comment #14
stBorchertWe ran into the same error using Sub-pathauto and XML sitemap.
The attached patch fixes the problem for us.
Comment #15
stBorchertMeh, the error still happens since the menu is rebuild every time
menu_get_item()</em> is called in <code>subpathauto_url_inbound_alter()
.Only way to stop this: set variable "menu_rebuild_needed" to
FALSE
before getting the menu item.Comment #16
R.Hendel CreditAttribution: R.Hendel commentedHello @stBorchert,
thanks a lot for your patch!
Without the patch both of my local and staging environment runs out of PHP-memory, although my local environment has 512 MB. It was not possible to login into drupal, because I got a white-screen on the user-login page.
After patching subpathauto I reduced my local memory to only 256 MB for testing and it works fine on both environments (local and staging). After intensive testing we deployed the patch against the production-site and everything there is ok also.
So I think, this patch should be commited.
Comment #17
JordanMagnuson CreditAttribution: JordanMagnuson commentedNot just memory: this also kills cpu.
Caused a huge headache for me today. The worst thing about this is that it's not necessarily instantly apparent.
The patch in #15 is absolutely CRITICAL, and needs to be applied asap, and module version updated to 1.4.
Comment #18
rooby CreditAttribution: rooby commentedThis is definitely a critical site breaking issue.
Patch code looks good to me and it fixes the problem. +1 for commit.
Comment #19
stefan.r CreditAttribution: stefan.r commentedAs this patch conflicts with #1814516: Subpathauto causing admin pages to appear in default theme, just in case anyone wants to use both in a makefile I'm posting a patch combining both patches.
Comment #20
stefan.r CreditAttribution: stefan.r commentedAnd I'll just unpublish this to make clear this is not the actual patch that's RTBC :)
Comment #21
JordanMagnuson CreditAttribution: JordanMagnuson commentedThis patch needs work as call to variable_del('menu_rebuild_needed') inserted here sometimes takes forever. See https://www.drupal.org/project/subpathauto/issues/2451445
Comment #22
JordanMagnuson CreditAttribution: JordanMagnuson commentedSo here's the relevant code in #19 that's causing issue:
I don't think we need to call variable_del() here at all--which then updates the database, only for us to reset the variable a few lines later. I believe all that's needed to prevent the infinite loop possibility is to temporarily set the global 'menu_rebuild_needed' conf variable, then set it back (rather than updating the variables table in the database). This is because variable_get() only returns the value of the conf setting anyway. So I think the code above can be safely changed to: