We have a very large website and it seems that when we upgraded to drupal 7.12 strange thing happened when we go to admin/structure/block the weight is displayed as an input field with number in it but if we save the page all the weights are saved as NULL. We took the website and set it up on a development server and after looking over every installed module by disabling and them uninstalling it seemed to make no difference at all. But when we cut down the blocks by deleting them the normal dropdown appeard again.
We have like over 700 blocks just counting on one theme key.
Comments
Comment #1
vefverksmidja commentedComment #2
marcingy commentedComment #3
vefverksmidja commentedI have figured out what was the problem.
The problem was the new code introduced in form.inc in drupal 7.12 that switches between select or textfield for the weights. This has turned out to be problem since when you save for instance some context that is using weights it does not retrieve the numbers from input field thus serializing the array with all weights as NULL.
I found out that you could set the variable 'drupal_weight_select_max' to some higher number then 100 sinze the contstant is 100. It solves the problem for now. I think this should be fixed either by context or drupal core.
So if someone encounters this problem you can set the variable in database either by using variable_set or with insert in mysql to some hight number I set mine to 1000.
Comment #4
pbfleetwood commented@vefverksmidja, you wrote in #3:
What table must be updated? Perhaps you could fill in the blanks? Update sometable set somecol = 1000 where someothercolumn = somevalue
Thanks for finding the problem.
Comment #5
vefverksmidja commentedHi,
it's a variable, they are in the "variable" table. Just change the value for drupal_weight_select_max.
regards, Vefverksmidjan
Comment #6
rudiedirkx commentedComment #7
David_Rothstein commentedFor reference, the change in Drupal core (described above) that may have led to this is #1346760: Add a scalable weight select element... I just cross-linked this problem at that issue, and there's also already a bug report against the Context module about this: #1439134: Error when saving context - unable to define weight
Presumably, it needs to be fixed in Context at this point. Given that, is there a reason to keep this issue open?
Comment #8
vefverksmidja commentedHi,
Yeah, just close it, the other report covers it.
regards, Vefverksmiðjan
Comment #9
David_Rothstein commentedThanks!