Menu items reorders after edit one of menu item

havran - February 10, 2008 - 15:40
Project:Drupal
Version:7.x-dev
Component:menu system
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

I create new menu. I add 4 submenu items with names:

* Menu 1
* Menu 2
* Menu 3
* Menu 4

Then i get (drag and drop) Menu 1 and order it on latest position and Save it. I get:

* Menu 2
* Menu 3
* Menu 4
* Menu 1

Then i click edit Menu 2 item and simple save it. Nov i get:

* Menu 3
* Menu 4
* Menu 1
* Menu 2

This behaviour is confusing, i expect order vhich i create with drag&drop.

#1

havran - February 10, 2008 - 15:49

This is maybe because drag and drop system operate with weights -50 to 50 and if i edit menu item directly i get weight form menu item only -10 to 10. This save edited item with incorrect weight.

#2

webernet - February 10, 2008 - 16:15
Version:6.0-rc4» 6.x-dev
Status:active» patch (code needs review)

Attached patch expands the weights available to match the drag and drop form.

AttachmentSize
menu-weights.patch814 bytes

#3

havran - February 10, 2008 - 20:29

In menu item editation patch working great, but if i edit menu item in node editation there is still same problem - delta for weight is set only from -10 to 10.

#4

webernet - February 10, 2008 - 22:22

Attached patch fixes both forms.

Untested.

AttachmentSize
menu-weights.patch1.33 KB

#5

pwolanin - February 10, 2008 - 22:34
Status:patch (code needs review)» patch (reviewed & tested by the community)

applies cleanly (stripping trailing CRs), and works.

#6

havran - February 11, 2008 - 12:10

Patch working as expected. RTBC. Thanx.

#7

catch - February 11, 2008 - 13:56

#8

Gábor Hojtsy - February 11, 2008 - 15:13
Version:6.x-dev» 7.x-dev

Indeed, this was not consistently modified in the fix where we expanded that region. Committed #4 to 6.x. RTBC for 7.x.

#9

Dries - February 12, 2008 - 13:43
Status:patch (reviewed & tested by the community)» fixed

Committed to CVS HEAD. Thanks.

#10

Anonymous (not verified) - February 26, 2008 - 13:51
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.