On creating my first menu following the QUICKSTART instructions, I get the following red box when I save the newly created menu:

user warning: Table 'stuart59_isos.menu_links' doesn't exist query: SELECT link_path, menu_name, depth FROM menu_links where mlid = 651 in D:\WebStuff\www\drupal\sites\all\modules\taxonomy_treemenu\taxonomy_treemenu.module on line 1837.

Oh, and the menu doesn't work!

The problem is that the table name "menu_links" has not had my database table prefix (which is "isos_") added - i.e. the table name should be "isos_menu_links".

Looking at the line indicated in taxonomy_treemenu.module:

$result = db_query("SELECT link_path, menu_name, depth FROM menu_links where mlid = %d", $mlid);

I am new to Drupal, so my knowledge of the internals is limited, but I think it should be:

$result = db_query("SELECT link_path, menu_name, depth FROM {menu_links} where mlid = %d", $mlid);

As I understand it, the {} round the table name in the db_query function tells Drupal to prefix the table name. I searched taxonomy_treemenu.module for "FROM " and didn't find any other cases with {} missing.

Comments

rcrowther’s picture

Assigned: Unassigned » rcrowther

New to Drupal, ok, but you still gave me a code line and number, spotted the error, presumably cross-checked against some references, guessed (probably right) about the problem, then posted. Many thanks!

This fix will go in the next versions (due in a couple of days time).

Rob

rcrowther’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.