Drupal Fatal Error: Unsupported operand types in common.inc on line 2984

After updating a Drupal site to version 6.24 from 6.22 I started receiving this error during cron runs: Fatal Error: Unsupported operand types in common.inc on line 2984 I added the following debug text to common.inc to track down the error:
  if (!is_array($elements)) {
    print "\n--------------\n";
    $backtrace = debug_backtrace();
Looking at the stack trace I could see that the issue was with the search module indexing the site.

Search Drupal User Profiles

It is difficult to search for users (in code) based on profile information in Drupal 6 due to the flexible nature in which the profiles module stores information. Basically profiles are stored in 2 tables.
mysql> select * from profile_fields;
| fid | title      | name              | explanation | category            | page | type      | weight | required | register | visibility | autocomplete | options |

How To Restore Drupal from backup on a linux server

This is part 2 to the previous How To (how to backup drupal using linux)
If you followed the previous tutorial to create your backups, then this tutorial will allow you to quickly restore Drupal to the previous version.

How to backup and upgrade drupal to latest version on a linux server using ssh and simple shell commands

If you use Drupal you will be both pleasantly surprised and frustrated by the frequency of updates and security patches.

This How To will help you quickly backup and upgrade your Drupal installation via ssh and simple shell commands.
You must have ssh access to your server in order to follow this tutorial.

Creating subcategories for CCK Nodes in Drupal

Use the cck_taxonomy module

The CCK Taxonomy module provides a cck widget for selecting taxonomy terms and assigning them to a cck field.


  1. The field updates appropriately when the term is updated.
  2. The field does not provide a taxonomy link (it could be made to do so)
  3. The selection list properly displays sub categories - like normal taxonomy item list
  4. Searching on the taxonomy field works as expected.

If you set your cck content type in the vocabulary then 2 vocabulary form items will be displayed, 1 by taxonomy and one by cck. Simply assign the vocabulary to a dummy node type to omit this behavior.
Later you can change the dummy node to a category description node, or anything else for that matter to allow taxonomy links in your cck node to provide standard taxonomy behavior (pull up an rss enabled list of content tagged with that term.

Taxonomy categories (vocabularies/terms) are much easier to edit for category list then cck nodes because you can see the full list. The only way to edit categories when using the CCK node reference technique is to goto edit content, filter the content type, make a mental snapshot, goto create content and add the new content (in this case more of a term). This method does have the advantage of providing nodes for each category, but often this is not needed.




This module creates a new group for each member that joins your site.
Drupal 4.7

Drupal 5.0 Themes

I haven't had much time to play around with the themes other than the included default themes, but from what I have seen so far, the new themes are very slick! Most noticable is that you can now choose colors of different components with an Ajax / kde style color picker.
I created something similar for myclassroomhelper, where the entire theme was created using png transparency. The creaphics created a two tone style, and the user could set the color of all the elements which were stored in a mysql backend and used to generate dynamic stylesheets. All of the drop shadows and bevels were created by the foreground png graphics.

The default drupal theme seems to be doing pretty much the same thing, but the Ajax color picker is much more elegant than my table javascript solution. I am impressed, and can't wait to create my own Drupal 5.0 themes.

My new Drupal 5.0 site

I have been wanting to get my site out of Nuke for a long time now, and since I have been doing a lot of drupal development lately it seemed like a good choice. I wasn't really excited about another drupal install, so this is the new 5.0 beta. I was anxious to check out the latest drupal beta, mostly to make sure all of the modules I have been working on are forward compatible.

So what's new?

The first thing I noticed was the new web-based install. The previous installation was pretty straight forward so this doesn't save you too much. The DB is populated by the setup script, but you have to create the DB - of course, so if I am creating a db, creating the tables is not a big deal. You also have to set permissions on a config file to be readable, so it would be easier to do the entire install from a terminal. A simple php or perl script could prompt the user for the root mysql user/pass and allow creating the db for the drupal install or or allow entering a user/pass if the db is allready set up, then create the db, extract the installation, write the config and secure the permissions. But the install went very smooth.

The next thing I noticed was the default theme, Huge Improvement - Nice work!

I am not sure if there is a WYSIWYG editor by default because I am in konqueror, but from the drupal forums I do not think they ever plan on including a WYSIWYG by default which is probably for the best!

The new administration interface uses a two column layout and I think it will be much easier to use once I get used to the new layout.

Another new feature is Ajax style dropdowns for list.

Well, that is all I have noticed so far. Now to install some modules and transfer all of my nuke content.