Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am on a Omega 960 theme and could not find the search block.
I found it is being assigned to a region that does not exist as posted here.
http://drupal.org/node/992208#comment-3809758
Comments
Comment #1
jhodgdonThat is not really an issue in the search.module, but an issue in the block.module -- that if you move to a theme that is lacking regions where a block has been assigned, the block vanishes from the blocks admin page.
Comment #2
jhodgdontag not necessary
Comment #3
dcrocks CreditAttribution: dcrocks commentedPretty sure this is similar to http://drupal.org/node/1103590.
Comment #4
jhodgdonSeems like they are related, but 1103590 is talking about "hidden" regions, and this issue is talking about regions that don't even exist in the new theme, unless I am mistaken?
Comment #5
dcrocks CreditAttribution: dcrocks commentedI think it is still the same piece of code, function block_theme_initialize($theme), in the block module. When a theme is 1st enabled, blocks are set up to mimic whatever is the block configuration of the current 'default' theme. If the blocks region(from default theme) doesn't exist in the new theme it is supposed to be mapped to the 'default region' of the new theme, which appears to be the 1st region listed in the new theme .info file. 'dashboard_sidebar' is a region defined in the dashboard module and I have no idea how it got to be $region(0) when function system_default_region($theme) was called. Maybe caching? The dashboard regions are defined in the database for the 'seven' theme, the default admin theme, but 'dashboard_system_info_alter' in dashboard.module implies these regions are added on the fly to all themes when the dashboard is active, though they should be added to the end. Sorry, I'm reading code as I write here. I still think the fix goes in function block_theme_initialize($theme) but maybe function system_default_region($theme) is where the fix is needed. Was this a theme that was enabled, disabled, and then enabled again?
Comment #6
dcrocks CreditAttribution: dcrocks commentedIs it possible that 'seven' was the default theme when this occurred? Or that a theme used as an admin theme was the default theme when the new theme was enabled?
Comment #7
dcrocks CreditAttribution: dcrocks commentedExperiment shows that if you make a theme the admin theme and you open the dashboard form from the toolbar, then the dashboard.module's regions are added to that theme's block definitions in the database, apparently permanently. If I understand correctly, disabling a theme and then enabling it again does not clear those definitions, as verified by experiment. So more info as how to repeat the error would help.
Comment #8
jhodgdonRight, I'm sure they're related, but they are not exactly the same issue. Ideally the solution would fix them both.
Comment #9
dcrocks CreditAttribution: dcrocks commentedI did confirm on a new install of the latest 7.x dev that 'seven' has the dashboard regions assigned to it. This must be done during install. If the 'mystery' region that blocks are being assigned to is 'dashboard-sidebar' then either 'seven' was the default theme when the new theme was enabled or the default theme had also been set as the admin theme and the dashboard form was opened while that theme was the admin theme.
Implication is that system_region_list shouldn't return the dashboard regions, at least when a new theme is being enabled.
Comment #10
sunComment #11
Bojhan CreditAttribution: Bojhan commentedHow is this a major issue?
Comment #12
dcrocks CreditAttribution: dcrocks commentedDoes this need to be fixed? This really requires a special set of circumstances to happen. And it is recoverable by going to structure/blocks/configure in a theme where the block is visible and choosing the drop down for the theme where the block is invisible and changing it. What I am asking, is it necessary to add code to test for a case that is rare, doesn't break the site, and is recoverable thru the admin menus?
Comment #13
Bojhan CreditAttribution: Bojhan commentedThis is not a big bug.
Comment #14
benjy CreditAttribution: benjy commentedThis is no longer an issue in D8. Blocks that are assigned to undefined regions fall into the first defined region of the new theme.