Closed (fixed)
Project:
Administration menu
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Sep 2009 at 00:45 UTC
Updated:
3 May 2011 at 12:19 UTC
Jump to comment: Most recent file
Comments
Comment #1
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 commentedsubscribing ...
Comment #3
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 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 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 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 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 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 commentedJust upgrade it 6.x-3.x-alpha4. That solves the admin menu problem with PHP 5.3.0