Hello
I tried to clone the admin menu (to feed a light version to control panel to try to tame administration delegation).
I had a name error (that made me loose all configuration / ignore settings) so I decided to try to clone the whole menu after the "validation error"
I ended up with a "clone-admin-menu" menu that looks EMPTY ("there is no menu entry") but when I want to suppress it, the message says :"there is 384 entries in the ....".
I suspect that is I supress the menu i will loose the ORIGINAL entries and I am not that eager to try even on my dev platform..

What should I look into ?
what datas can I bring you ?

CommentFileSizeAuthor
#3 dump.txt258.91 KBAnnakan

Comments

malc0mn’s picture

I'll look into this further. The lost settings upon validation error will be reproducable and is definitely not good...

About the admin menu: was it the default admin menu you tried to clone? Are you using the Administration menu module as well?

What would help would be a look into your DB's menu_links table. Could you execute this:

SELECT * FROM menu_links WHERE menu_name = 'clone-admin-menu'
or
SELECT * FROM menu_links WHERE menu_name = 'menu-clone-admin-menu'

A 'menu-' prefix will always be added to the menu name, so it's probably the 2nd query...

Most likely deleting the clone will be safe, but to be sure, I would need to see the result of the query above...

Annakan’s picture

You are right I use Administration menu and the menu I tried to clone was this one. I did not realize that Administration menu was creating a real menu since I activate it systematically I pretty much forget it is not a part of drupal core :).

I'll execute the queries ASAP.

Annakan’s picture

StatusFileSize
new258.91 KB

here is attached the result of mysql> SELECT * FROM menu_links WHERE menu_name = 'menu-clone-admin-menu';

For informations

mysql> SELECT menu_name FROM menu_links group by menu_name;
+------------------------+
| menu_name              |
+------------------------+
| admin_menu             |
| devel                  |
| menu-clone-admin-menu  |
| menu-menucollectlocale |
| navigation             |
| primary-links          |
+------------------------+
6 rows in set (0.00 sec)

thanks a lot for your support.

malc0mn’s picture

From the dump.txt I can see it's safe to delete 'menu-clone-admin-menu'.

If you want to be absolutely sure you can:

DELETE FROM menu_links WHERE menu_name = 'menu-clone-admin-menu'

I suspect the reason why you can't see the menu items is that a great deal of them are linked to the mlid '5751'. Could you do me a:

SELECT * FROM menu_links WHERE mlid = 5751

and post the result? I bet 5751 does not belong to the 'menu-clone-admin-menu' menu, because it's not in the dump.txt :p

Could you give me the exact procedure you used to clone this menu, including any validation errors you encountered?

Before releasing the full rewrite of Menu Clone I had tested cloning the admin-menu several times, since it is the most challenging one ;-). I'm really curious to see what happenned here so I can fix it.

malc0mn’s picture

I reproduced the 'lost menu order after submit error' and found the following:

When dragging menu's below the ignore row, or dragging the ignore row itself, hidden weight fields are modified. When you submit the form and recieve a validation error, all fields you filled in are preserved! The problem with the draggable table is that you don't visually see this as such. The weight fields are OK, but the visual rendering is not.

That was the easy part, now for the solution. Ha, that's a whole different ballpark imho...

Annakan’s picture

Sorry for the dealy in asnwering, busy days. :(

I'll look into that asap (the menu informations you asked)

malc0mn’s picture

No problem man! I'm not in a hurry :-)

Annakan’s picture

Sorry for the delay
SELECT * FROM menu_links WHERE mlid = 5751
gives

menu_name 	mlid 	plid 	link_path 	router_path 	link_title 	options 	module 	hidden 	external 	has_children 	expanded 	weight 	depth 	customized 	p1 	p2 	p3 	p4 	p5	p6 	p7 	p8 	p9 	updated
	admin_menu 	5751 	0 	admin 	admin 	Administer 	a:0:{} 	menu 	0 	0 	1 	0 	9 	1 	0 	5751 	0 	0 	0 	0 	0 	0 	0 	0 	0
malc0mn’s picture

As suspected, for some reason alot of items are linked to the source admin menu. I'll see if I can replicate this. As I said in #4, it's safe to delete the menu using Drupal, or the SQL I posted...

Thanks for the info!