When I trying to open pege with block list, all blocks disappear from site and status of all blocks became inactive.
Later I discovered that blocks was duplicated in the table "blocks". One line contained a value status=1, and other had value of status=0.
When funtion _blocks_rehash is called, duplicated items overlapped original.
I can't find reason why these dublicate records were stored to the table, but the problem was fixed by modifying sql request, where blocks are fetched from the database only with status=1. See attached patch.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | block_47_0.patch | 601 bytes | ajwwong |
| #4 | block_47.patch | 514 bytes | ajwwong |
| block.module_9.diff | 496 bytes | andrewsl |
Comments
Comment #1
nedjoIt doesn't look like there are other reports of this particular issue. Details? I wonder if this was a leftover from some of the (since fixed) issues with multi-theme blocks, i.e., bad data was being inserted into the blocks table. Was this an upgrade or a clean install? What theme was default? Had you switched default themes?
Comment #2
markus_petrux commentedThere was a bug in 4.7 similar to this. It was caused when throttle module was active. Maybe the same bug is also present in 4.6.6?
Do you have the throttle module? If not, well, it was just an idea. :-)
Comment #3
ajwwong commentedJust fyi / I'm observing some strange disappearing block stuff too -- though in 4.7.0. I've disabled the throttle module, but it's still happening. Usually when I am viewing the page...
admin > blocks
Only navigation and login stay activated. The rest seem to periodically disappear.
albert
www.ithou.org
Comment #4
ajwwong commentedNote: The suggestion in the original patch saves the day.
I've modified it for 4.7 and suggest that it be included for core.
I've attached the patch for 4.7 in case anyone else is having this disappearing blocks issue.
Comment #5
ajwwong commentedOoops... that's the wrong patch...
Here's the one...
Comment #6
ajwwong commentedHmmmm.... well... I spoke too soon... my settings got reset again.
This happens when I view the blocks list page, i.e., at the page: admin > blocks.
This what happens, first, all the blocks except for navigation and login disappear. Then when I do a "refresh" the blocks return, except now, all the weights are back to zero. The patch above that I thought worked doesn't seem to solve this. Very strange....
Comment #7
ajwwong commentedMore weirdness:
When I activate the throttle module:
the blocks' weightings mysteriously reappear.
And... even after de-activation of the throttle module:
the block's weightings remain.
Don't know enough to fix this, or even if this is replicable, but I thought I'd post here in case another person finds a glitch in their system.
Comment #8
magico commentedAfter looking at this problem I realize that the {blocks} table does not have a primary key or even an unique index.
When the problem described happened it was because the table allowed a duplicate row for the (module/delta) and I think the solution is in creating a PK (module,delta) for the table {blocks}
Just a note, for the current HEAD the PK would be (module, delta, theme)
I'm putting this issue in HEAD, so I can catch some atention to it and try to solve it faster.
Both patchs here, still apply but I think the solution is not in those patchs but in the table structure.
Comment #9
stevenpatzMoving to a real version.
Comment #10
chx commentedwe have a bid now.
Comment #11
(not verified) commented