Problem/Motivation

See comment #1 for a full description and steps to reproduce.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Original Report

Dashboard gives me this error:
Notice: Undefined index: demo-content-slideshow-block-1 in dashboard_page_build() (regel 192 van

I had the Demo Content Slideshow Block 1 placed in the dashboard and then i disabled it..
After that i cannot save any changes to the dashboard also it gives me the error.

Where in the DB can i empty the settings for dashboard?
Or how do i solve this?

CommentFileSizeAuthor
#1 reproduction_modules.tgz1.16 KBcrystaldawn

Comments

crystaldawn’s picture

Title: Notice: Undefined index: demo-content-slideshow-block-1 in dashboard_page_build() (regel 192 van » Notice: Undefined index: demo-content-slideshow-block-1 in dashboard_page_build() (line 192 of
Priority: Normal » Critical
Issue summary: View changes
StatusFileSize
new1.16 KB

I can confirm that this is a pretty serious bug that has 3 reproduction methods. ALL of them have something to do with the fact that UNDERSCORE is either in the name of the module OR in the name of the block machine name. I have created reproduction modules for EVERY method of seeing this bug in action. I have also created a module that does NOT trigger the bug and it works perfectly. Unfortunetly I do not have the time to figure out all of this weirdness as creating the reproduction modules themselves and figure all of this out ate up all of my time I had available to track down this bug.

I have marked this as CRITICAL because it results in Database corruption of the blocks table. I have also updated the title since the original poster's server language was something other than english, so I've also updated it to english to make it more clear and easier to search for this bug in the queue.

If this is a duplicate bug of some other issue, mark it as such and leave out any flame comments as they are not necessary.

Reproduction of the original poster's error: This can be reproduced using my test module called "betastats". This error shows up under 2 circumstances.

1. The module name MUST NOT have any underscores in it's name
2. The block machine name MUST contain an underscore. Without these 2 criteria, you will not see the error but you will observe the DB corruption when you start seeing "Empty" blocks all over the dashboard.

The reproduction of this bug for all of these modules is exactly the same.

1. enable the module
2. Go to the dashboard
3. Click "Customize"
4. Move the module's block from sidebar to main content area
5. Click save
6. Observe either the error of the original poster, OR an empty block showing up in content area. In ALL cases, the block does NOT move from the sidebar except with the "deltastats" module I provide as a working example.

What is in my attachment called reproduction_modules.tgz

This file contains 3 modules. The first 2 are infected with different ways of reproducing this UNDERSCORE bug. The 3rd module (deltastats) shows how to WORK AROUND this bug until a proper fix can be devised. I cant provide a patch to fix this right now because of time limitations, but this module should help others get their own module blocks functioning since A LOT of modules are affected by this bug. Some will be able to implement the fix, others will not because of underscores in the module files themselves which is another good reason why this is a critical bug as it's work around requires changes that existing popular modules simply cannot do such as change the filename of their module.

alpha_stats.module:
What does this module show?
Using the 6 steps above with this module's block will result in the following:

The module will NOT produce an error, but you will see the data corruption in the block table where dashboard.module is replacing the _ with a - which is incorrect. These bad entries ARE NOT removed even after uninstall of the module like they should be. Since it is now corrupted, the entries have to be removed by hand. The entries duplicate themselves every time you click "Save" at step 5 resulting in all kinds of badness. No amount of changing the underscore for the block machine name will produce an error or change the behavior. Why? Because the module name has an underscore as well which is causing the error to be suppressed somewhere.

betastats.module:
What does this module show?
Using the 6 steps above with this module's block will result in the following:

The module WILL produce an error AND you will see the data corruption in the block table where dashboard.module is replacing the _ with a - which is incorrect. These bad entries ARE NOT removed even after uninstall of the module like they should be. Since it is now corrupted, the entries have to be removed by hand. The entries duplicate themselves every time you click "Save" at step 5 resulting in all kinds of badness. Unlike alpha_stats module, changing the underscore in the machine name for the block WILL fix this problem and essentially turns it into "deltastats" module which works perfectly. This proves that underscore is a problem not only in the machine name of the module, but also the name of the module itself.

deltastats.module
What does this module show?
Using the 6 steps above with this module's block will result in the following:

The module WILL NOT produce any errors nor will it produce any DB Corruption issues. This module is almost identical to betastats other than name and the fact that the underscore in the blocks machine name has been removed. This module works perfectly and can be used as a template of how to work around this dangerous bug.

cilefen’s picture

Title: Notice: Undefined index: demo-content-slideshow-block-1 in dashboard_page_build() (line 192 of » Certain module and block machine name combinations break the dashboard when blocks are added to it
Version: 7.23 » 7.x-dev
Assigned: mr.infinity III » Unassigned
Issue summary: View changes

I confirmed in 7.x-dev what was described in #1. Thank you for the test modules!

David_Rothstein’s picture

Status: Active » Closed (duplicate)

I'm pretty sure this is a duplicate of #936798: Dashboard uses unreliable method for identifying blocks. - reopen if I'm mistaken. We should probably raise the priority of that issue a bit though.