Following up on Checking out Drupal 6: Installation: I was back to playing with Drupal 6 again, as I'm really itching to upgrade all of my old Drupal 5 sites.
This time, I went beyond playing with my "sandbox" site; I got started on constructing two new, fresh sites. (Of course, I do so on the back of that sandbox site's database; that was the purpose of making the thing!)
Module trouble!
Enabling a number of spiffy D6 modules knocked my Modules form out of action, leaving it to forlornly display only this error:
Fatal error: Unsupported operand types in <path to my Drupal installation>/includes/common.inc on line 1376
Blech. Other pages still worked, but life's no fun with the Modules form AWOL. Gotta find and shut down the offending module(s)... but, oops, how to do that when I can't even see the form?
No trouble for the pros; there are doubtless many ways to tackle the problem. But for fellow pre-pros who might be thrown into panic by something like this, here's my own fumbling way of going about a fix:
Check the forums
First, I searched the Drupal.org forums for similar discussions. I couldn't find many at all involving the same error with "line 1376". Other responses for similar errors suggested clearing cache tables in the database, such as cache_views. But that didn't help me.
Remove the offending line(s)
Well, if Drupal doesn't like that line 1376 in the file common.inc, let's excise the offender and see what happens!
First, I made a safe backup of /includes/common.inc, then opened the file in a text editor to find line 1376. (Note: You'll definitely want to use a text editor that shows line numbers, like the SubEthaEdit I use. Unless you really like counting.)
That line only consists of
);
which isn't too helpful! Clearly, it's the closing part of a longer statement, which – checking parentheses to properly grab the whole thing – appears to be:
$options += array(
'fragment' => '',
'query' => '',
'absolute' => FALSE,
'alias' => FALSE,
'prefix' => ''
);
So. I remove that, save the file, and see what happens... Good! As expected, the codectomy let my Modules form properly load again. After that, troubleshooting was a matter of following these steps:
1) disable one possible offending module
2) put the removed code back into commons.inc, and save
3) try reloading Modules form
3a) If form now reloads, the last module removed was the offender. Go to 7)
3b) If form still doesn't reload, the last module removed wasn't the offender
4) remove the problem code again from commons.inc and save
5) reload Modules form
6) Go to 1)
7) note offending module and leave it disabled
8) make sure commons.inc is returned to original form
Yes, that's very elementary. And time-consuming. (Hello, inauguration speech videos!) But it worked for me, and spelling things out like that might give another newbie confidence to try such troubleshooting.
J'accuse!
Text Link Ads Integration module, you're the one who caused me such heartbreak today. I banish you, at least until I can troubleshoot whether you've got a problem with Drupal 6.x in general (might be so!) or whether you're just quarreling with some other contributed module I'm using.
No XML Sitemap module?
Ah, here's a minor disappointment: One of the items on my checklist for new site setup is making sure the XML Sitemaps module (née Google Sitemaps) works, and then submitting that sitemap to Google. Alas, the Drupal 6 versions warn of not yet being ready for production. All right, I'll just have to place a hold on that action and check again later.
New site checklist
Here I had a checklist used to quickly create sites in Drupal 5.x. and then 6.x. I've moved that to a page of its own: Drupal New Site Setup Checklist.
More Drupal 6 fun to come!
What does Drupal CMS
What does Drupal CMS do?
Thanks,
<a href="http://www.webmarketingexperts.com.au/">SEO</a>What does Drupal do?
See Drupal for Beginners.
I'm glad I found this
I'm glad I found this article, I'm having the same problems upgrading. An amusing read :) thanks
Re: Checking out Drupal 6: Dipping into new site creation
This is a problem with the syntax of the url() function in a module. If you do a backtrace, you can figure out where it comes from: see http://justinhileman.info/articles/unsupported-operand-types-in-drupal-6x.
Re: Checking out Drupal 6: Dipping into new site creation
Thank you! I've seen "unsupported operand type" errors before, so I'm glad to have that link on hand. Good info.
Post new comment