By aneuryzma on
Hi,
I've just installed Drupal and downloaded the most recent module versions. I get this warning on the top of Content Types page.
"warning: Parameter 1 to admin_menu_admin_menu() expected to be a reference, value given in .../Sites/drupal/includes/module.inc on line 483."
how can I fix it
thanks
Edited by: VM; Moved to appropriate forum
Comments
=-=
most recent version doesn't always help. Please state exact version of admin_menu module in use.
I'd disable, use the uninstall tab to remove it and reenable it.
; $Id: admin_menu.info,v
; $Id: admin_menu.info,v 1.5.2.1 2008/11/30 12:50:36 sun Exp $
name = Administration menu
description = Provides a dropdown menu to most administrative tasks and other common destinations (to users with the proper permissions).
package = Administration
core = 6.x
; Information added by drupal.org packaging script on 2009-07-02
version = "6.x-1.5"
core = "6.x"
project = "admin_menu"
datestamp = "1246537502"
=-=
Beyond uninstalling and reinstalling not sure what else I can tell you.
I use 3.x alpha 1 and don't have this error.
I get this error also
I get this error also :
warning: Parameter 2 to user_relationship_blocks_user_relationships_type() expected to be a reference, value given in C:\wamp\www\drupal\includes\module.inc on line 483.
=-=
That error has nothing to do with admin_menu and looks to be coming from the user_relationships module
Yes, this error appears on a
Yes, this error appears on a fresh install of D 6.15, admin_menu .
it is caused by PHP version 5.3+
no known solution yet?
So I guess there is no known solution yet?
=-=
nope Drupal 6.x isn't PHP 5.3 ready nor are most of the modules.
Drupal 7.x is the first version to run on PHP 5.2 and higher see: http://drupal.org/requirements
Drupal core is sort of ready
Drupal core is sort of ready for PHP 5.3 since 6.14 according to the requirements page:
PHP 5.3 is the real problem
Thanks level09, I'm running Wampserver 2.i which has PHP 5.3 as default. By reverting back to PHP 5.2.11 this issue was resolved as well, and does not involve hacking files.
In Administration menu
In Administration menu 6.x-1.5, I god rid of this error by removing the & from line 107 in admin_menu/admin_menu.inc, from:
function admin_menu_admin_menu(&$deleted) {to:
function admin_menu_admin_menu($deleted) {Where Do you find: function admin_menu_admin_menu(&$deleted) {
...I'm a newbie.
As I said, it is on line 107
As I said, it is on line 107 in the file
admin_menu.incin theadmin_menumodule folder.Find your modules folder (usually
sites/all/modules/) and then theadmin_menufolder and then edit theadmin_menu.incfile on line 107.Hacking a module like this is usually not recommended, since it wont last past next update of the module, but for fast solutions to critical errors it may be the only way.
Thanks AdrianB
I appreciate you taking the time to help out. I didn't get where to find the file to change line 107.
As to hacking for a quick fix, can I just update the module as normal or will I still get the same message?
I ask this because as a novice I figure that if an issue is brought up enough times to the Drupal community, someone finds the answer and shows everyone else. Further, that this info is then included in futures updates. Am I wrong in this assumption?
Again thanks for your help.
I ask this because as a
Bringing it up many times is not necessarily enough. If there is a problem with at module, in this case the Administration menu, then the proper way is to open an issue for that module. But before that, search through existing issues since it's more than likely that someone else already has opened an issue.
If a solution to the problem is found then someone has to create a patch, the patch has to be tested and then the module maintainer has to commit that patch. When it's committed the fix is usually in the -dev version of the module until the maintainer releases an new official ("stable") release of the module.
In this case there's already an issue for this problem: #615058: Parameter 1 to admin_menu_admin_menu() expected to be a reference
This issue contains a patch that was tested and committed by the maintainer. That means that the 6.x-1.x-dev version of the Administration menu contains this fix and therefore you can upgrade to that version and this problem will be solved without hacking the module any more.
Unfortunately the maintainer, sun, says that they won't release a new official release of Administration menu. That means you will have to use the -dev version and in this case that is ok, but as a newbie it is usually better to stick with official releases since -dev version can be broken and unstable.
But you will soon learn that some maintainers never releases official version and then the -dev versions is the only option. Although Drupal 7 is closing in there are still popular modules for Drupal 6 that's only available in -dev versions. Or, as in this case, the -dev version contains important bug fixes that the official release lacks.
thx a lot you saved my day
Many many thanks
In Administration menu
Worked for me, thank you for posting this.
admin menu
Thank you for your help with changing the line 107. It worked!!!!!!!
worked well
thanks it works well
Thanx AdrianB
Tnx a lot bro, that worked for me!
it works
removing the ampersand does work
next problem with admin menu
hi all,
i have also the same problem and i remove also the & on line 107 to fix the error message,
but unfortunately the error message doesn't stay not in connection with my primary problem :P
The admin menu doesn't list all menu items. For example the "create content"-link.
Do you have also a solution to this problem? Stand this problem also in connection with php5.3 - i need a quick fix ^^
Remove all &$
I removed all &$ in admin_menu.inc and everything is solved overhere:
* line 107 function admin_menu_admin_menu(&$deleted)
* line 298 function admin_menu_adjust_items(&$menu_links, &$sort)
* line 418 function _admin_menu_devel_settings_form_alter(&$form, $form_state)
Even the create content link reappears in the menu
Ampersands in Function Calls
Folks should be careful when removing ampersands from function calls and definitions.
It means parameters are passed in by reference, and removing them could cause havoc.
In the above example, hook_form_alter expects to be able to alter the form, which is why $form is passed in by reference. It's the entire point of the hook.
function
function admin_menu_admin_menu($deleted) {
worked
...
Use admin_menu 1.6
in admin_menu 1.6, they have fixed this
the hack worked for me
AdrianB's hack worked for me, many thanks