Blocks all have the same weight after upgrade

Blocks all have the same weight after upgrade

by Daran Price -
Number of replies: 5
Hi,
we have recently upgraded from 1.8.4 to 1.9.5+ and it appears that course page blocks now have the same weight in the mdl_block_instance table! Any advice as to why and how this has happened and a fix (we have 4000 course pages) would be gratefully appreciated

Kindest Regards Daran Price
Average of ratings: -
In reply to Daran Price

Re: Blocks all have the same weight after upgrade

by Mark Johnson -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Are you experiencing a weird effect whereby if you try and move blocks around, they seem to appear and disappear at random? I've been experiencing this and it strikes me that I could be related?
In reply to Mark Johnson

Re: Blocks all have the same weight after upgrade

by Daran Price -
Hi Mark,
no it just seems that all the blocks on the left hand side have a 0 weighting so sit on top of each other. If you move them the "hidden" block below will appear. Not sure what has caused this issue but need to find a fix other than shifting them around!

Kindest Regards Daran
In reply to Daran Price

Re: Blocks all have the same weight after upgrade

by Frank Ralf -
Hi Daran,

Some ideas:

1) If you have a backup of your database from before the upgrade you could try importing its block_instance table into the new database.

2) Or you could export your recent table, amend the weight column (using your favorite spreadsheet application) and re-import it.

3) You could also try to set the weight field to "auto_increment" in the database but I don't no whether this is possible (or recommended). This won't give you the original order of blocks.

(You can use http://www.phpmyadmin.net for all these activities.)

hth
Frank
In reply to Frank Ralf

Re: Blocks all have the same weight after upgrade

by Daran Price -
Hi Frank,
we ended up having to replace the table with our old version. This has fixed the issue but elicited a few irate calls from tutors who had worked on blocks in the three weeks since the upgrade!

I think it may have caused by the following issue

http://tracker.moodle.org/browse/MDL-11131

Kindest Regards Daran
In reply to Daran Price

Re: Blocks all have the same weight after upgrade

by Frank Ralf -
Hi Daran,

I added a link to this thread to the tracker issue. Thanks for the hint!

Frank