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.

CommentFileSizeAuthor
#5 block_47_0.patch601 bytesajwwong
#4 block_47.patch514 bytesajwwong
block.module_9.diff496 bytesandrewsl

Comments

nedjo’s picture

It 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?

markus_petrux’s picture

There 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. :-)

ajwwong’s picture

Just 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

ajwwong’s picture

StatusFileSize
new514 bytes

Note: 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.

ajwwong’s picture

StatusFileSize
new601 bytes

Ooops... that's the wrong patch...

Here's the one...

ajwwong’s picture

Hmmmm.... 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....

ajwwong’s picture

More 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.

magico’s picture

Version: 4.6.6 » x.y.z
Status: Needs review » Active

After 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.

stevenpatz’s picture

Version: x.y.z » 6.x-dev

Moving to a real version.

chx’s picture

Status: Active » Fixed

we have a bid now.

Anonymous’s picture

Status: Fixed » Closed (fixed)