[wp-trac] [WordPress Trac] #14134: Menus item are limited to 16 item and will not save more than that

WordPress Trac noreply at wordpress.org
Sun Oct 28 19:11:25 UTC 2012


#14134: Menus item are limited to 16 item and will not save more than that
--------------------------+-----------------------------
 Reporter:  jaanfx        |       Owner:  filosofo
     Type:  defect (bug)  |      Status:  reviewing
 Priority:  high          |   Milestone:  Future Release
Component:  Menus         |     Version:  3.0
 Severity:  major         |  Resolution:
 Keywords:  has-patch     |
--------------------------+-----------------------------
Changes (by okax):

 * cc: okax (added)
 * keywords:  needs-patch => has-patch


Comment:

 I have the same problem with Suhosin and too much submit fields and there
 is no good work around. So I decided to change the implementation of menu
 editor to only transmit changed menu items.


 For this to work each menu item get the flag "menu-item-unchanged" on
 load. When a menu item is changed in the web the flag will be removed.
 Only menu items without the flag will be transmitted to the server.

 The deletion of menu item will now be done explicitly with a hidden "menu-
 item-delete" field and not with the absence of an item as before.

 The tricky part was the transmission of the order of the menu items
 because they are totally ordered. That means when a new menu item is
 inserted at position "1" the position of all items of the menu have to be
 updated. In the old implementation the position was calculated in
 JavaScript and all items were transmitted. Now, only new items or items
 with a change are transmitted and the correct position of the other items
 are calculated in PHP.

 I wrote also an unit test for the new PHP function
 wp_update_menu_item_positions.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14134#comment:76>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list