Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | 2541234-1.patch | 1.92 KB | Upchuk |
Comments
Comment #1
Upchuk CreditAttribution: Upchuk at Wunder commentedHere 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.Comment #2
Upchuk CreditAttribution: Upchuk at Wunder commentedComment #3
artofeclipse CreditAttribution: artofeclipse commentedThis is perfect and I agree with you, great fix, I will commit you patch after more testing.
Comment #5
artofeclipse CreditAttribution: artofeclipse commentedComment #6
Summit CreditAttribution: Summit commentedThis is committed according to #4, right?
Greetings, Martijn
Comment #7
artofeclipse CreditAttribution: artofeclipse commented@Summit, yes this is committed to dev branch.