There are modules out there, both contrib and custom that either declare for themselves or end up with weights that are higher than 100 or lower than 100. Enabling this module on sites with these modules and saving the form would cause their weights to break (since the limit set for the delta of the weight field is 100).

We should make sure we are taking into account whatever weights modules can have. Patch following.

CommentFileSizeAuthor
#1 2541234-1.patch1.92 KBUpchuk
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Upchuk’s picture

Status: Active » Needs review
FileSize
1.92 KB

Here is the patch prepares the delta for the weight field for each individual module. If the weight is higher than 100 or lower than 100, the module weight will be used as delta (positive number only). I think most sites have the DRUPAL_WEIGHT_SELECT_MAX set to 100 so this will cause the weight field to be a textfield in these cases. Which is not bad.

Upchuk’s picture

Issue summary: View changes
artofeclipse’s picture

This is perfect and I agree with you, great fix, I will commit you patch after more testing.

  • artofeclipse committed 82a8bd5 on 7.x-1.x authored by Upchuk
    Issue #2541234 by Upchuk: Module weights can't go higher than 100 or...
artofeclipse’s picture

Status: Needs review » Reviewed & tested by the community
Summit’s picture

Status: Reviewed & tested by the community » Fixed

This is committed according to #4, right?
Greetings, Martijn

artofeclipse’s picture

@Summit, yes this is committed to dev branch.

Status: Fixed » Closed (fixed)

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