When upgrading to Drupal 4.7 I found out that the original 4.6.6 menu table contained loads of unnecessary, unwanted rows - all defined by the word "blogs" (see: http://drupal.org/node/62514). Here's a fragment of the backup sql file:

...
INSERT INTO menu VALUES("40","1","blog","blogs","","0","16");
INSERT INTO menu VALUES("41","1","blog","blogs","","0","16");
INSERT INTO menu VALUES("42","1","blog","blogs","","0","16");
INSERT INTO menu VALUES("43","1","blog","blogs","","0","16");
INSERT INTO menu VALUES("44","1","blog","blogs","","0","16");
INSERT INTO menu VALUES("45","1","blog","blogs","","0","16");
...
INSERT INTO menu VALUES("330","1","blog","blogs","","0","16");
INSERT INTO menu VALUES("331","1","blog","blogs","","0","16");
INSERT INTO menu VALUES("332","1","blog","blogs","","0","16");
INSERT INTO menu VALUES("333","1","blog","blogs","","0","16");
INSERT INTO menu VALUES("334","1","blog","blogs","","0","16");
INSERT INTO menu VALUES("335","1","blog","blogs","","0","16");
INSERT INTO menu VALUES("336","24","admin/settings/form_mail","form_mail","","0","22");
INSERT INTO menu VALUES("337","1","blog","blogs","","0","16");
INSERT INTO menu VALUES("338","1","blog","blogs","","0","16");
INSERT INTO menu VALUES("339","1","blog","blogs","","0","16");
INSERT INTO menu VALUES("340","1","blog","blogs","","0","16");
...
INSERT INTO menu VALUES("635","1","blog","blogs","","0","16");
INSERT INTO menu VALUES("636","1","blog","blogs","","0","16");
INSERT INTO menu VALUES("637","1","blog","blogs","","0","16");
INSERT INTO menu VALUES("638","1","blog","blogs","","0","16");
INSERT INTO menu VALUES("639","1","blog","blogs","","0","16");
...

I've been searching at the forum, and it was hard to find someone else with the same kind of problem - who might have solved this problem. Found one similar post here: http://drupal.org/node/45331. In this post, Ramdak suggests clearing the cache, but that doesn't sound like a real solution to me...

Does anyone know where these empty/unused rows come from, how this can be solved, and what is the best way to clean up the menu table? AFAIK, I didn't use any modules (like menu on the fly, or something) that could possibly affect the menu table...

Cheers!
Marc

Comments

mbchandar’s picture

Assigned: Unassigned » mbchandar
Status: Active » Closed (won't fix)

hi,

i suggest you to remove from the table using the following sql after taking the backup of your data.

INSERT INTO menu VALUES("40","1","blog","blogs","","0","16");

delete from menu where title='blogs';

Marc Bijl’s picture

Hi,

Thanks for the reply! Few questions:

  • Deleting from menu like suggested, will also delete the just inserted row?
  • The values to be inserted are already values of one row, so why inserting them?
  • Why did you choose for inserting a row with menu id 40: is that the standard value for the blogs menu entry, or is it because the first of my example rows started with 40?

Thanks for taking time!

Marc Bijl’s picture

Oh, and two more question (:

  • Why did you change status to "won't fix"? Isn't this a strange kind of behaviour, that is, a bug?
  • Do you have any clue where this kind of behaviour comes from?

Thanks again.

Marc Bijl’s picture

Another similar post here:
- http://drupal.org/node/58945

Does not solve the issue; just want to show it happens more often...

Marc Bijl’s picture

Status: Closed (won't fix) » Active

And another one here:
- http://drupal.org/node/36860

Changed to active as others seem to have the same problem, which isn't solved yet.

greggles’s picture

Status: Active » Closed (duplicate)

I believe that this bug is a duplicate of the bug at http://drupal.org/node/34639 so I am going to close this issue.

New Oceans - please follow up on that bug with further investigation and advice so that we can keep people focused on the one issue.

mbchandar - while your solution provides a workaround, it does not solve the origin of the issue so this bug should not have been marked "won't fix".

Marc Bijl’s picture

Agreed, the topic mentioned seems to have -at least- similarities indeed. Thanks for pointing me into that direction greggles, didn't find that one when searching the forum.