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.
A few d6 sites, not all, after update to 6.35 core are giving error when user links point to path /user/login?destination=frontpage
Fatal error: Call to undefined function t() in /.../.../includes/menu.inc on line 1538
Sometimes clearing the cache solves the problem only to have it return and sometimes clearing the cache does not help.
I'm really stumped.
Any suggestions on how to resolve the fatal error would be appreciated. Thanks.
Comment | File | Size | Author |
---|---|---|---|
#23 | drupal_core-t_is_undefined-2455675-23.patch | 565 bytes | underq |
#8 | patch_drupal-core-6.35.patch | 518 bytes | underq |
Comments
Comment #1
izmeez CreditAttribution: izmeez commentedSo far I have tracked this down to be a problem with securepages and logintoboggan.
For some reason the site is not switching to https:// on paths with user* but was before.
Comment #2
izmeez CreditAttribution: izmeez commentedIssue summary updated.
Comment #3
izmeez CreditAttribution: izmeez commentedResolved with update to securepages-6.x-2.x
Comment #4
IFL Todd CreditAttribution: IFL Todd commentedHow is this resolved? securepages-6.x-2.x still produces the same error mentioned by the OP after upgrade to D6.35.
Comment #5
izmeez CreditAttribution: izmeez commentedWith securepages-6.x-2.x-dev it is working for us. Don't know about securepages-6x-2.1
[edit] checked another site using 6.x-2.1 and seems to be fine there too. [/edit]
Comment #6
IFL Todd CreditAttribution: IFL Todd commentedEvery instance I have of D6.35 with Secure Pages 6.x-2.1, even on different servers, produces the error.
Fatal error: Call to undefined function t() in includes/menu.inc on line 1538.
The error occurs also when clearing cache, not through Drush but through the CC link in admin_menu, and often when even trying to edit content. I have admin* as an https path btw, if that makes any difference.
This really should be a critical issue.
Comment #7
gcassie CreditAttribution: gcassie commentedI don't think this is a contrib issue, rather some of the security checks in the new core release are triggering some of the menu translation behavior before Drupal has finished bootstrapping enough to have access to all the required functions. I was able to get some different errors with this patch, which I don't think is the final solution, but a start:
The new errors after that change are
So, more menu shenanigans. I can't reliably reproduce the originally reported error, but with that patch I get the new errors when I log out - the page seems to render okay despite them. Your mileage will vary by what contrib you have installed, I expect.
Spent some time tracing through but haven't pinpointed when these things are trying to execute.
Comment #8
underq CreditAttribution: underq commentedHi,
I suggest the patch, for fix this Drupal core bug included in 6.35 version.
The bug caused by menu.inc which is include too soon.
Comment #9
izmeez CreditAttribution: izmeez commentedFeel free to change the title and metadata to better reflect the current thoughts on this issue.
My problem was as initially described and appears resolved but clearly others are experiencing issues.
Comment #10
IFL Todd CreditAttribution: IFL Todd commentedIt seems that some paths secured by Secure Pages get the error after upgrade to Drupal 6.35; although, I'm not sure to what extent. In my case (again across several sites and servers) admin sections and certain views related edit links are producing the error when clicked. The error is a WSOD error and is causing problems for site administrators, who are having to troubleshoot, or jump through hoops to get to the content they wish to access and edit.
underq, is this a Drupal core issue? I ask, because it obviously comes after a core update; however, is the core bugged or is it just how core is changed and other modules need to update likewise to reflect the change?
Fatal error: Call to undefined function t() in includes/menu.inc on line 1538.
The error doesn't seem to happen for paths not secured by SP.
Comment #11
izmeez CreditAttribution: izmeez commentedFor the WSOD since this is drupal 6 have you tried the dtools wsod module to see if that helps point to the problem?
Comment #12
IFL Todd CreditAttribution: IFL Todd commentedUpon further testing, the error does not occur if certain paths are excluded from Secure Pages, such as user* and admin*. Those are obviously the kind of paths which need to be secured.
Fatal error: Call to undefined function t() in includes/menu.inc on line 1538.
Comment #13
izmeez CreditAttribution: izmeez commentedWe are including those paths (user* and admin*) without problems.
Comment #14
IFL Todd CreditAttribution: IFL Todd commentedPerhaps then it is a core problem as gcassie suggested. I've made a post in core about this as a result.
Comment #15
izmeez CreditAttribution: izmeez commentedOn the d6 sites we are working with we are not having the issue beyond what was described above. If you can provide a way to reproduce the problem you are experiencing it may help.
Comment #16
IFL Todd CreditAttribution: IFL Todd commentedI might be to stupid to live. I just wanted to admit that. I did a fresh install that I was going to use to test and to answer izmeez' question and I could not reproduce the error. Everything worked just fine. Puzzled, I actually opened the files on the sites experiencing the problem and they were all 6.x-1.11 and I was mistaken! I always use drush to update modules, and never realized the sites were all still using 6.x-1.11. I am very sorry for making this mistake.
Closing and marking as fixed.
Comment #17
IFL Todd CreditAttribution: IFL Todd commentedComment #18
izmeez CreditAttribution: izmeez commentedGood to hear. We have all had those moments :-) Don't forget to close the core issue also.
Comment #19
IFL Todd CreditAttribution: IFL Todd commentedThis core issue has also been closed. izmeez thanks for you understanding.
Comment #20
gcassie CreditAttribution: gcassie commentedNoting the site I was experiencing this error on does not run Secure Pages, so I'm re-opening the core issue.
Comment #21
bsenftner CreditAttribution: bsenftner as a volunteer commentedI am seeing this issue on a site not running Secure Pages too. The site has three different instances of D6.35, (Development, Staging, and Live) all separate installs on separate servers, but the same site code and configuration. Only the Live version is experiencing the t() function undefined in menu.inc
Comment #22
bsenftner CreditAttribution: bsenftner as a volunteer commentedI've applied the patch given by underq at https://www.drupal.org/node/2455675#comment-9832631 and will report back if this fixes my t() undefined in menu.inc issue for a site with no Secure Pages module.
27 hours later: the patch appears to be doing it's duty. whereas the site with the issue was hitting this issue 1-2 times per 24 hour period, it has not happened for 27 hours and counting. I will report back if it does occur, but so far so good.
Comment #23
underq CreditAttribution: underq commentedMy first patch, remove too many title,
I propose new patch which is more accurate.
Comment #24
gregstout CreditAttribution: gregstout commentedMy site was getting this 50% of the time for secured pages (/user and some /admin) especially when destination= was being used.
I tried the patch by underq above (https://www.drupal.org/node/2455675#comment-9951023) and it seems to work for our site. Thanks!
Comment #25
munyivaThank you, trying this now.
Comment #26
rooby CreditAttribution: rooby commentedWhy are people posting Drupal core patches to a secure pages issue?
The relevant issue for Drupal core is #2474625: Fatal Error: Call to undefined function t() in menu.inc on line 1538 and it's not fixed.
If you want this patch committed post it there. Also add a comment in the code to explain why it is checking destination like it is because it is not obvious by reading the code.
Changing the status of this one as it is a duplicate of that one and no fix was made here.
Comment #27
rooby CreditAttribution: rooby commented