Closed (fixed)
Project:
Drupal core
Version:
6.16
Component:
block.module
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
4 Nov 2008 at 00:04 UTC
Updated:
2 Nov 2013 at 00:30 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mattbk commentedI am having this problem as well, whether I have Javascript enabled or not. Drupal 6.10.
Comment #2
Anonymous (not verified) commentedIt's probably a caching issue. Goto the admin/settings/performance and click the Clear Cache button at the bottom of the form.
Comment #3
mattbk commentedI've cleared the cache multiple times (Drupal and browser) and have gone so far as to turn off all the Drupal caching features.
I'm very confused. All the blocks are weighted the same, but they show up in a different order on the sidebar than they do in the block list.
Comment #4
mattbk commentedOkay, it seems to have fixed itself somehow. I have no idea what happened, maybe caches had to expire somewhere?
Comment #5
Anonymous (not verified) commentedIt may be a browser related cache as well. I've recently discovered that I must wait some period of time before things appear correct after clearing the cache.
Comment #6
mattbk commentedNever mind, Drupal block rearranging is an epic fail.
Comment #8
mattbk commentedNo, it's still a problem.
Comment #9
milagrow commentedCan someone tell me the solution to the problem, whenever i change the order as per my requirements and save the changes the blocks get re-ordered back to the alphabetical order.
Please help me resolve the issue.
Comment #10
Anonymous (not verified) commentedAre we discussion admin/build/block? Shuffle the order and click save? If you ``configure'' the block before saving the order changes, the changes for the order will revert to the previous order.
Other than that, it works for me. Do you have a module enabled causing the issue? Is your theme at fault? Try switching back to the default garland theme.
Since the block ordering works with stock Drupal I'm moving this to a ``support request'' for now.
Comment #11
gpk commentedDo the replies at the bottom of this thread http://drupal.org/node/258856 help at all? suhosin security extension could be interfering with the submission of the form on the blocks admin screen.
Comment #12
BradM commentedI was having a similar situation: the block listing would save positions with respect to regions, however, the order within each region would not save. Sometimes a group of blocks would be listed alphabetically, but this wasn't the case for each region. The tip off was that I noticed the message * The changes to these blocks will not be saved until the Save blocks button is clicked would no longer appear at the bottom of the block admin whenever I shuffled around the blocks. Also, drag and drop was very buggy -- sometimes I couldn't drop the block, or would have to right-click in order to release it.
Turns out, I had a block that loaded an external .js file, which was the source of the problem. In my case I was loading a javascript widget from Shelfari (http://www.shelfari.com) which completely messed up the ability of the Drupal admin to properly save the order of the blocks. Once I disabled this block, everything in the admin worked properly.
So basically, if you have an issue with block order not saving correctly, disable any blocks that load external javascript files, and you should be OK.
Comment #13
a6hiji7 commentedThere is a problem with the data-type of the "weight" column of "blocks" table. The type is "tinyint" which is too small and can create a problem if there are more than 128 blocks. The type should be changed to "int". I had the same problem as discussed in this thread and I could solve the problem by changing the "weight" column's type to "int". (EDIT - The problem should NOT come up with 128 blocks. It will only come up if there are more than 256 blocks in total.)
Comment #14
gpk commentedIt's a bug then...
Comment #15
a6hiji7 commentedI think the issue is not about having "more than 128 blocks in a region" (which will be a very rare case) but about having "more than 256 blocks in total".
Comment #16
gpk commented2 blocks in different regions can have the same weight... so it's probably when there are more than 256 in a region that we hit the buffers, i.e. the weight goes outside the range +/- 128
Comment #17
gpk commentedOn second thoughts it looks like the weights are always negative or 0, which means you can't use the full 256. Whether having > 128 disabled blocks causes the problem I'm not sure.
Comment #18
a6hiji7 commentedIf your theme has 300 blocks in total then the weights can be from -150 to +150. Problem is that -150 will become the default weight. So any new blocks added to a region will have the weight -150. That's why rearranging these blocks will not work, unless you bring them below a block which already had a weight in the valid range (-128 to +127). I hope that makes it clear. (EDIT - "So any new blocks added to a region will have the weight -150" - by this I mean Drupal will try to assign the weight -150 to the block; but database value will still be -128).
Comment #19
BDS commentedMy blocks for the Content region gets alphabetize while others doesn't; and I only have 12 blocks for that region, the other working blocks contain much more; overall, I don't know how many I have--is there a way for the system to count? Cleared / Flush Drupal's cache, tried on different browsers (IE, Chrome and Firefox)... I now can't order the content for one of my page.
Drupal 6.14
Comment #20
gpk commented@19: might be worth having a look at the block weights for the relevant theme in the {block} table in your DB to try and spot anything odd. Might help in the understanding of this issue also...
Comment #21
xjmSee #612870: Weight fields should be int, not tinyint, maybe the same issue here?
Comment #22
drupalusering commentedconfirming: changing Tinyint to int fixed this issue for me.
Comment #23
susanmccormick commentedalso confirming that changing tinyint to int solved the problem for me. thank you!
Comment #24
terbs commentedConfirmed: changing tinyint to int solved the problem for me too.
Comment #25
mile23Looks like a duplicate to me, since it's solved by this other issue: #612870: Weight fields should be int, not tinyint
Comment #26
devd commentedThis bug is reported due to blocks table field type. Suppose your theme has 300 blocks in total then the weights can be from -150 to +150. Block weight field is type of tinyint which length between -128 to 127. Drupal will try to assign the weight -150 to the block; but database value will still be -128, So we need to change weight field type form tinyint to int.
Alter your database block table look like this.
ALTER TABLE `blocks` CHANGE `weight` `weight` INT( 10 ) NOT NULL DEFAULT '0'
Comment #27
Anonymous (not verified) commentedStop changing the status fields. As already indicated this is a duplicate issue.
Comment #28
xjmAgain, the patch for this issue is in #612870: Weight fields should be int, not tinyint.
Comment #29
xjmHm crosspost :P