Closed (fixed)
Project:
Custom Search
Version:
7.x-1.7
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Aug 2011 at 16:10 UTC
Updated:
27 Sep 2011 at 13:21 UTC
When updating a D7 install from 7.4 to 7.7 I came across an infinite loop before the update process fully finished. An issue was created for Drupal Core while the problem was debugged.
I have since debugged the problem and found the cause to be down this module having a call to the menu_get_item() function in the hook_theme() implementation, this coupled with a l() call in font-your-face's hook_menu() caused the inifite loop.
The original core issue is #1232346: Easy to trigger multiple menu rebuilds per page (including infinite recursion) via menu_get_item() since 7.12 and the font-your-face issue is #1235880: Infinite recursion in D7
Comments
Comment #1
agoradesign commentedHere's the problematic function:
The call to menu_get_item() could be easily replaced with a database query and as a bonus, it would be more efficient to do so.
Comment #2
somanyfish commentedThis bug cost me a bunch of time. I enabled Custom Search, then did a bunch of work. The infinite loop did not occur until I tried to enable another module. I initially thought that the other module was causing the problem, but it was only when I figured out that enabling any module at all caused the infinite loop that I thought to go back and see what was the last module I installed, namely Custom Search. I really hope you fix this so it doesn't bite someone else.
Thank you agoradesign for posting this issue.
Comment #3
jdanthinne commentedWow, sorry but I was on holiday this month and I've just come across this issue. Pretty nasty one!
Unfortunately, I can't reproduce this bug, so can you give me the list of all contrib modules enabled on your install?
Comment #4
somanyfish commentedThanks for responding and sorry to make your return from vacation buggy!
Here's the contrib modules installed. Let me know if any other info would help.
Comment #5
jdanthinne commentedOk, I think I've found a way to kill this loop… and pushed it to DEV.
The patch is there : http://drupalcode.org/project/custom_search.git/patch/f1a1a7a
I've replaced
by
Hope it works for you.
Comment #6
somanyfish commentedHmm...I don't see your updating code in the latest dev release.
Comment #7
jdanthinne commentedI've just pushed the code, so the DEV version should be available tomorrow…
that's why I've included the changes ;-)
Comment #8
somanyfish commentedThe dev release fixed the problem for me, thank you.
Comment #9
jdanthinne commented@mjpa @agoradesign : is it working for you as well? I need to release a new stable version quickly.
Comment #10
mjpa commentedWorks fine for me.
Comment #11
jdanthinne commentedGreat!
Comment #12
agoradesign commentedSorry for the late answer - I've overseen this...
Yes, for me it works too because the menu_get_item() call is gone now. But I cannot proof, if the if-condition still works as expected because my installation doesn't need this check for the page_callback
Comment #13.0
(not verified) commentedAdding font-your-face issue number