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.
Upgraded to 5.3 and the admin menu doesn't show up any more. html is not in the footer.
Comment | File | Size | Author |
---|---|---|---|
#11 | admin_menu_php_5.3.patch | 1.04 KB | spam38 |
#5 | 586228_php_5.3.patch | 449 bytes | Island Usurper |
Comments
Comment #1
gavinblair CreditAttribution: gavinblair commentedI'm having the exact same problem.
Parameter 1 to admin_menu_admin_menu() expected to be a reference, value given in /.../includes/module.inc on line 471.
UPDATE: There's a problem with calling date('Y') - this is chopping off the rest of the page, including the echo $closure, causing admin menu to not work (I think).
The error I'm getting from date('Y') is
warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier...
Comment #2
PGNetDev CreditAttribution: PGNetDev commentedsubscribing ...
Comment #3
drasgardian CreditAttribution: drasgardian commentedsubscribing..
The date issue is probably not related to admin_menu though. You might just need to set the local timezone value in your php.ini
Comment #4
Dave Reid1. admin_menu only calls gmdate() and doesn't use date, so that's not a related problem.
2. The only time admin_menu calls module_invoke_all() (from line 471 in includes/module.inc) there's no additional arguments and seems like it's a Drupal core PHP 5.3 bug:
Marking as won't fix.
Comment #5
Island Usurper CreditAttribution: Island Usurper commentedNo, it's a valid issue, but fortunately the fix is easy. Drupal 6.14 changed the way some things work so that PHP 5.3 doesn't throw warnings all over the place any more. One of those things was that theme functions don't get parameters by reference.
This problem doesn't really show up until you clear the cache after upgrading PHP. After applying this patch, clearing the cache allowed admin_menu to appear again. I don't know if the code after theme_admin_menu_links() is relying on the by-reference behavior, but I haven't seen any side effects yet.
Comment #6
jdelaune CreditAttribution: jdelaune commented#5 works well. I'm still missing my 'create content' menu however... kind of annoying, maybe it's another issue but I suspect it's at php 5.3 issue.
Comment #7
jdelaune CreditAttribution: jdelaune commentednvm I've read that was intensional in 3.x
Good patch.
Comment #8
Dave ReidCommitted to DRUPAL-6--3 CVS. Thanks!
Comment #10
aacraig CreditAttribution: aacraig commentedJust in case someone stumbles upon this as I did, I thought I'd point out that this issue was exacerbated for me by #549884: PHP 5.3 issue - Attempt to modify property of non-object (Date module).
Even after applying the patch in #5, admin_menu still was not showing up. After fixing the issue with the date plugin (as indicated in comment #10 on that page) the admin_menu suddenly appeared.
I'll also confirm that this seems to be a PHP 5.3 issue, as it cropped up when I updated my dev machine to Fedora 12 (and PHP 5.3). The live version of the site (an exact copy) was working just fine on a previous PHP version.
Comment #11
spam38 CreditAttribution: spam38 commentedThe problem is that $deleted is no longer being passed by reference in admin_menu_admin_menu(). Because of this, any changes to $deleted (like removing the Create Content submenu) aren't being passed back to the caller. I've create a patch that returns the modified $deleted in addition to the normal $links together in an array. Unfortunately, the patch does break the API since it changes what the function returns, but it seems to get the job done.
Comment #12
jonloh CreditAttribution: jonloh commentedJust upgrade it 6.x-3.x-alpha4. That solves the admin menu problem with PHP 5.3.0