Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295737

Reordering fails with more than 100 items in a menu

$
0
0

Problem/Motivation

An issue occurs when more than 100 items exist in the root of the menu or under a single parent item, or items exist with a weight outside of -50..50 (causing overflow when trying to fit that weight into the select form element).

Proposed resolution

A patch was drafted using the parameter ($delta) to the recursive helper function
_menu_overview_tree_form() to build the menu tree form. $delta first gets set in menu_overview_form() to the total number of links in the menu

The book and taxonomy modules address this issue in these ways.

A possible solution includes a generic procedural function that takes a minimum value and a maximum value and returns the recommended FAPI delta based on that.

The interdiff file is available.

The last patch failed testing with these results.

Remaining tasks

Remaining tasks might include a more integrated solution across the implementation of menu instances, partly described by Dries, D7 backport, and testing.

Unit testing any new procedural function would be a need.

User interface changes

Row weights is described as being criticial in this issue.

Select boxes/widget in text fields are related.

Drop down menus and node forms were also orginially discussed in the issue posting.

API changes

Entity form controllers now appear in core.


Viewing all articles
Browse latest Browse all 295737