I was to create this bug on Drupal 7.12 (Chrome 18 Mac OSX, in case its JS related), using Rubik theme as Administrative theme, trying to place Views generated blocks on the Dashboard.
I started out by placing a block on the 'Customize Dashboard' page in the sidebar, then decided I'd rather have it in the main region. So I drag it over, and click Done. Looks good, but now I have an (empty) block that I cannot move or remove in the sidebar.
I noticed in the database, there were dummy blocks created that copied the delta of the block I was trying to place. For the Views block, I saw
myview-block_1 (the view generated block)
myview-block-1 (the copied view block)
myview-block-1--2 (another copied block)
The second block is the one that said (empty), a third appeared as well. I tried undragging my block, which brought the View block off the Dashboard, but the (empty) block remained. No matter what, I could not get rid of this (empty) block other than deleting the copied records in the database and clearing cache.
Attached are screens of the process.
Screen 1 - Selecting a block with the UI to drag into a region.
Screen 2 - Block is placed in a region, then removed (drag back up to top)
Screen 3 - The result, two dummy blocks that say (empty) with no way to remove them.
| Comment | File | Size | Author |
|---|---|---|---|
| screen-3.jpg | 168.9 KB | kevinquillen | |
| screen-2.jpg | 212.24 KB | kevinquillen | |
| screen-1.jpg | 200.6 KB | kevinquillen |
Comments
Comment #1
caiovlp commented@kevinquillen I was not able to reproduce this issue on Drupal 7.12, Chrome 19 and Firefox 12. Then I installed tao-7.x-3.0-beta4 and rubik-7.x-4.0-beta8 but still couldn't reproduce it with the given scenario. I didn't try monkeying around with views' blocks though, so maybe there's where the issue lies. Can you please try reproducing this issue with a clean install and core blocks/themes?
Comment #2
webchickThanks for triaging the bug queue, caiovlp! :)
Comment #3
daluxz commentedI'm having the same issue, also involving views-blocks.
This can be reproduced on a fresh install (standard installation profile), with Views and Ctools.
Steps to reproduce:
1. Create a node view with a block display.
2. Go to the dashboard page and click "Customize dashboard"
3. Click "Add other blocks"
4. Put the block you just created in step 1 in one of the available regions and save.
5. Go to the dashboard page and click "Customize dashboard"
6. Drag the Views-block to another region and click on the "Done"-button
You will now get the following error (or something similar):
Notice: Undefined index: test-view-block--2 in dashboard_page_build() (line 192 of /var/www/vhosts/Sandboxes/drupal 7 POCs/fresh/modules/dashboard/dashboard.module).
The dashboard will now show the views-block placed where you originally placed it, and on the place where you tried to place it there's an empty block now.
After having done this 2 times, I now have 2 empty blocks on the dashboard page and 3 rows in my blocks-table in the database:
test_view-block (delta of the original)
test-view-block (delta of the first "clone")
test-view-block--2 (delta of the second "clone")
I'm still able to do everything using the following workarounds, but it would be nice if this gets fixed.
- Using the contextual links to edit the empty blocks, you can change the Region Settings to make sure the block isn't shown in any of the themes. (This means the block still exists in the database)
- Using the blocks page for the dashboard (admin/dashboard/configure) you can put your views-blocks in the right region. (The empty blocks don't show up on this page)
Comment #4
denix commentedI confirm the same happen in 7.15. At the moment the only way to get rid of them is via your database, deleting the duplicated rows. https://drupal.org/node/936798.
Comment #5
denix commentedThis bug is a duplicate of https://drupal.org/node/936798