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 currently have a menu block set up however it keeps giving me the following fatal error:
PHP Fatal error: Call to undefined function menu_block_configure_form_follow_validate() in /var/www/html/mysite/includes/form.inc on line 1465
I can create and save a menu block, however when I make subsequent changes (such as entering a list of pages), I get the above error.
My modules:
- Drupal 7.39
- CTools 7.x-1.9
- Menu Block 7.x-2.6+1-dev
I see that there is a similar issue: https://www.drupal.org/node/2418803 however I am not using panels which is why I raised a separate issue. Please combine if this is the same issue.
Thank you for your assistance.
Comment | File | Size | Author |
---|---|---|---|
#18 | 2574457-18.patch | 12.78 KB | joelpittet |
#16 | 2574457-16.patch | 11 KB | joelpittet |
#5 | menu_block-fatal_error_undefined_function-2574457-5-D7.patch | 1.03 KB | G.I.Joe |
Comments
Comment #2
katokalen2 CreditAttribution: katokalen2 commentedSame error here. Using Ctools 1.9, Panels 3.5, Menu Block 7.x-2.7. Can create block fine, it's when I edit and save in blocks admin that I see the same error:
Fatal error: Call to undefined function menu_block_configure_form_follow_validate() in /var/www/drupal/includes/form.inc on line 1465
Comment #3
kailou CreditAttribution: kailou commentedSame error for me as well:
Drupal 7.41
CTools 1.9
Menu Block 7.x-2.7
Comment #4
marcred CreditAttribution: marcred commentedSame here.
I was looking at
https://www.drupal.org/node/1596244
https://www.drupal.org/node/2222543 (applied Ctools 1.6)
https://github.com/backdrop/backdrop-issues/issues/828
Related issues not applicable:
https://www.drupal.org/node/2407951
https://www.drupal.org/node/2417293 (Panopoly_widgets module)
I haven't found a solution. Anyone?
Comment #5
G.I.Joe CreditAttribution: G.I.Joe as a volunteer commentedProblem, following functions can not be loaded in the 'menu_block.admin.inc' file:
Solution, load 'menu_block.admin.inc' file outside the hook-functions like in the patch.
or, add the functions above in the menu_block.module file.
Comment #7
ronaldmulero CreditAttribution: ronaldmulero as a volunteer commented#5 Works for me.
Drupal core 7.53
Ctools 7.x-1.12
Menu block 7.x-2.7
I could also apply the patch to 7.x-2.x-dev, so don't see why it failed testing.
Comment #8
Jorge Navarro CreditAttribution: Jorge Navarro commentedRelated: https://www.drupal.org/node/2521840
Comment #9
kalaiselvann CreditAttribution: kalaiselvann as a volunteer and commentedThanks Joe,
#5 Works for me.
Drupal core 7.54
Comment #10
Michael-IDA CreditAttribution: Michael-IDA at Internet Design Alliance commentedPatch works for me as well against Menu Block 7.x-2.7.
Not saying it's pretty though. Bigger issue is why pulling module_load_include outside of the three functions works. Which leads a surface level eyeball of the change to wonder if it's not ultimately a core issue? form.inc barfs on a lot of stuff...
In any event, this patch is a year plus old, it works, and, as written, it can't cause any detrimental issues (even if core get patched/fixed), so...
Would someone commit it?
Comment #11
joelpittet#1596244: block_configure hook does not allow form_state to be altered, which is problematic when modules use includes Made a core patch, though not to wait on that, I'd rather move the functions to
menu_block.module
Comment #12
joelpittetComment #13
defra_touch CreditAttribution: defra_touch as a volunteer commentedSolution #5 worked for me as well.
Comment #14
ownage CreditAttribution: ownage commentedThe patch in #5 worked for me as well on the latest 7.x-2.7+4-dev.
I was receiving the error with both the latest stable release (and latest unpatched dev) when simply making a checkbox change to "Expand all children of this tree."
Comment #15
joelpittetThis needs a new patch with the functions moved into menu_block.module as mentioned in #11. The current patch loads that extra file even when the functions aren't called which isn't a good practice for performance.
Comment #16
joelpittetOk here's a patch for what I suggested above.
Comment #18
joelpittetFixed CodeSniffer fails
Comment #20
drupal-son CreditAttribution: drupal-son commentedThe patch in #5 (3 years old) worked for me as well on the current latest 7.x-2.8.
#18 didn't work.
Any clue when it will be committed to the next release?
Thanks.