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.
After upgrading core to 6.14, accessing the Drupal Tweaks module now yields this error:
Fatal error: Unsupported operand types in (blah blah sitepath blah)/modules/system/system.module on line 627
Comments
Comment #1
kenorb CreditAttribution: kenorb commentedIt's probably Drupal core bug.
Line:
Possible related issues:
#471964: Rules administration menu broken - Fatal error: Unsupported operand types in modules/system/system.module on line 626
#458880: admin/rules on the administration menu no longer works
#421250: Unsupported operand types in system.module on line 626
#346945: Events not appearing after upgrade to Drupal 6.8
#116895: Show regions at 404 page #25
#149562: Menu module causes duplicate menu items
#550254: Menu links are sometimes not properly re-parented
#251792: Implement a locking framework for long operations
Probably you have corrupted menu_links table and Drupal can't find proper menu item (on system_admin_menu_block_page callback).
Possible solutions:
1. Make sure that you already upgraded Drupal through /update.php page
2. If you are using admin_menu, please disable it (issue: #511744: /admin page links are broken with latest development snapshot)
3. Go to admin/build/modules to rebuild your menu_router table
4. Install DTools module and run wsod_emergency.php?q=your_wsod_path page (paste the output)
Comment #2
cdmarine CreditAttribution: cdmarine commented1. Check
2. Not using
I'll give 3 & 4 a shot, but it'll have to wait until next week. Will return and update then.
Comment #3
cdmarine CreditAttribution: cdmarine commented... though, FYI, I just completed a fresh Drupal installation for a different site, and installed Drupal Tweaks before doing anything else (same version, of course), and it works fine. Definitely something corrupted in the other site.
Comment #4
kenorb CreditAttribution: kenorb commentedComment #5
lappn CreditAttribution: lappn commentedhi there, replace the "+" in system.module on line 627 with a ".", then it should work again.
original: $item += db_fetch_array(db_query("SELECT mlid, menu_name FROM {menu_links} ml WHERE ml.router_path = '%s' AND module = 'system'", $item['path']));
new: $item .= db_fetch_array(db_query("SELECT mlid, menu_name FROM {menu_links} ml WHERE ml.router_path = '%s' AND module = 'system'", $item['path']));
SORRY, NO GOOD!!! As a result no objects are shown in /admin/*. It only results in: You do not have any administrative items.
P.S. I know, never mess in the system files.
Comment #6
kenorb CreditAttribution: kenorb commentedIt's workaround, but it's not a solution from Drupal perspective.
Something causing that this item in menu_links is missing and there should be some reason, which should be found.
Comment #7
tim-drupal CreditAttribution: tim-drupal commentedHi there,
I'm experiencing a similar problem to cdmarine, whith SMS Framework module:
I went through the steps described in #1
1. did that, and also cleared cach
2. not using it
3. did that, then run update.php once again,
4. installed dtools 6.x-1.1-rc1. But dtools module doesn't appear along with other modules in admin/build/modules. I've tried the emergency solution described in the README.txt of the module : http://localhost/sites/all/modules/dtools/wsod/wsod_emergency.php didn't work, always stuck with a "page not found" error, nor did http://localhost/crim_ertim/sites/all/modules/dtools/wsod/wsod_emergency... link.
I've even tried the non from Drupal perspective solution described in #5, it actually solved the system.module error, but led to a new one with a message error on admin pages: "You do not have any administrative items."
Now I turned the system.module file to its initial state, and I'm always having the "Unsupported operand types" error and unable to run wsod_emergency.php.
Any clue?
Thank's a lot.
Comment #8
tim-drupal CreditAttribution: tim-drupal commentedHi,
I've split my #7 comment into a specific new issue to SMS Framework module: #630680:SMS Framework administration menu broken - Fatal error: Unsupported operand types in modules/system/system.module on line 626 and added a comment to this dtools module issue #527888:wsod_emergency.php does not run at all after getting WSOD
Hope it's more relevant.
Comment #9
dkeays CreditAttribution: dkeays commentedI have the same problem with some administrative menu items in Ubercart using both Drupal6.14 and 6.15. I did something similar to the work-around listed above; except that I used "ArrayMerge()".
Comment #10
joshuautley CreditAttribution: joshuautley commentedSame issue as #9. However, I hav enot updated any code. dkeays, please provide details of your work-around for Ubercart. Thanks.
Comment #11
kenorb CreditAttribution: kenorb commented#10 -> #610276: Lisa Has the BUG also----Fatal error: on line 1459
Comment #12
dkeays CreditAttribution: dkeays commentedWhen I said I used array_merge(), my memory was off. According to my notes and the actual code I simply added the mlid key to the associative array. I think the concatenate operator would do the job also, but that is not how I solved the problem. This is only a temporary fix and makes kernel updates a little more difficult. But I don't think my client would be pleased waiting for ubercart and/or the Drupal kernel to be fixed.
system.module lines 627
from:
to:
I filed a bug report with the system module but apparently some do not feel it is a true core bug. Even though ubercart seems to be calling menus without mlid being set, the core should try to recover without an error or fail gracefully. The line fetches an array which cannot be handled by the PHP operator used. That sounds like a bug to me and needs to be fixed.
Many other modules are having problems with the ml system, ubercart is not alone.
Comment #13
jasonnovember CreditAttribution: jasonnovember commentedI had the same problem with the messaging module. Whenever I clicked on admin link for messaging i got the error, Fatal error: Unsupported operand types ... /modules/system/system.module on line 627.
However, I noticed that after I disabled and uninstalled the messaging module, the menu item was not removed from the administration menu. I manually removed the messaging item from the admin menu. After which I reinstalled the messaging module. Now it works fine.
It looks like it could be a case of faulty uninstallation rather than a core bug.
Comment #14
GuyPaddock CreditAttribution: GuyPaddock commentedPlease see comment #4 in #785930: Fatal error: Unsupported operand types for my workaround. Definitely something nasty going on in core, methinks.
Comment #15
dkeays CreditAttribution: dkeays commentedI agree it is nasty. When I posted an issue about this, an administrator got upset that I called this a bug. His approach was that if a module doesn't call the menu correctly then the core should display a bug. What ever happened to the idea that
#651654: "unsupported operand" in system.module line 627 (seen in administrative menus)
"If the mlid cannot be determined, this function *has to fail* one way or the other (the mlid is used just a few lines below). Failing with a fatal error is not such a bad way to fail."
What ever happened to the idea of failing gracefully?
Comment #16
kenorb CreditAttribution: kenorb commentedPlease vote here to be fixed:
#647064: Fatal error: Unsupported operand types when menu_links query returns no results in system_admin_menu_block()
Comment #17
kenorb CreditAttribution: kenorb commentedComment #18
c-12 CreditAttribution: c-12 commentedThis is my first comment on drupal.org and I think it will be helpful :)
I've just finish my upgrade with drupal from 6.16 to 6.17 and I have the same issue with with this /modules/system/system.module on line 627.
Here is what I've did to correct this problem.
1st before upgrading I planned to do backup the whole thing!
2nd I deleted every drupal file and folder except site folder where are mine files and site config.
3rd I've deleted also sites folder in the new drupal 6.17 installation and installed it on the site.
4th After uploading was finished I've turned on every module that was on my drupal 6.16 including module rules.
5th And than boom there is the mentioned error "system.module on line 627" so after that I've restored the drupal database.
6th The final step was the magic update.php.
There problem solved gone forever :)
Something just happens between rules and used drupal database.
And sorry about mine bad English xD it's hard to know 12 languages :-/
Comment #19
kenorb CreditAttribution: kenorb commentedc-12: Great! Your English is very good!
Comment #20
dpardo CreditAttribution: dpardo commentedIt can be solved going to /admin/build/menu-customize/navigation and editing the link for the Simplenews menu item and after saving it...
Comment #21
brayo4 CreditAttribution: brayo4 commentedI installed admin menu module.......fixed it....
Update:
admin menu module should be installed with a lot precaution. It meesed up my menus and had to rebuild them manually......great module but be careful when pushing buttons, it may haunt you later.......
Comment #22
ja09 CreditAttribution: ja09 commenteddpardo, Thank you so much for your quick solution. (even though it was a year ago :)
I had the exact same issue with Ubercart (admin/store) after upgrading core to 6.22. Just a simple edit to the "Menu link title" fixed the problem.
Anyone know the cause or if there's an underlying problem that needs to be addressed?? Thanks again.
Comment #23
blazetechThank you so much for your quick solution!!!!
FROM:
$item += db_fetch_array(db_query("SELECT mlid, menu_name FROM {menu_links} ml WHERE ml.router_path = '%s' AND module = 'system'", $item['path']));
TO:
$item['mlid'] = db_fetch_array(db_query("SELECT mlid, menu_name FROM {menu_links} ml WHERE ml.router_path = '%s' AND module = 'system'", $item['path']));
AFTER ADD IN index.php:
menu_rebuild();
go in your site for rebuild menu and to finish remove menu_rebuild(); from index.php
Comment #24
samhaldia CreditAttribution: samhaldia as a volunteer commentedIt May be a possibility some of newly developed modules .info file is not proper, may have some improper values