Use of sections module effects block visibility
| Project: | Sections |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Bèr Kessels |
| Status: | postponed (maintainer needs more info) |
Jump to:
I've got the sections module up and running on a site which is the current CVS Head version. It seems like that when I have sections running (which works just fine) that I have trouble controlling visibility of blocks.
For example I have an "admin" section setup that shows the blue marine theme based on these criteria:
admin*
user*
node/add*
node/*/edit
node/*/track
That all seems to work fine. Now I wanted to add the "who is online" block only for viewing in the admin sections of the site in the left sidebar.
For that block I activated it and put this in the block visibility settings:
admin*
That block then only shows up on the blocks admin page, nowhere else within the admin section.
This seems to be some kind of strange problem related to sections, any ideas?

#1
My guess is : since 4.7, blocks settings are "per theme" you have one block page per active theme (see the name of the themes at the beginning of the page ?)
#2
rbrooks00, can you confirm this?
In 4.7 we have per theme blocks. So this might be the problem here.
#3
I'm not sure I know how to check that.
There is only one theme that is enabled on the site. Through the use of the sections module I'm able to specify that the admin pages (described above) should be rendered using the Blue Marine theme. I don't see anything in the block config that allows you to tag a block to a given theme though.
What am I missing?
#4
rbrooks00,
can you confirm that without sections enabled or in action, your blocks *do* appear *everywhere*, if the *only* active theme is the theme you wish to use for 'admin' ?
#5
Ok so here's what I did.
I went to the modules page and I turned off the sections module. I did not delete the items in the settings page for the sections module. The admin site of my site still appeared in Blue Marine which was unexpected but fine I guess.
However, when this module was off the "who is online" block displayed everywhere that it should according to what I described above.
I turned the sections module back on and the block went away again as described above.
Does that help out?
The site is now at RC4 by the way, I upgraded to that before testing this.
#6
Experienced problems of similar type:
enabling / disabling of blocks does not always seem to have effect.
I mean: disabling a block does not always mean it won't be visible anymore. Whereas enabling a block does not always mean it will become visible.
After playing a bit around, I think there's a relationshop with the default theme. If a theme is set to default, the enabling / disabling of blocks seem to have effect. However, if another theme is set to default it doesn't.
#7
#8
I tried to repro this on D5, but cannot follow... are you able to help me a bit, please?
1. i activated the "who is online" block on admin/build/block/list/minelli (default theme)
2. added "display only on listed pages" and added the "admin*" as pages value
3. i activated the "who is online" block on admin/build/block/list/garland
4. added "display only on listed pages" and added the "admin*" as pages value, too
5. added a section "Settings" with path "admin/settings*"
6. i clicked to "admin" and "who is online" is displayed - (correct behavior)
7. i clicked to "admin/content" and "who is online" is displayed - (correct behavior)
8. i clicked to "node/5" and "who is online" is not displayed - (correct behavior)
9. i clicked to "admin/settings" and "who is online" is displayed - (correct behavior)
So, what is wrong?
Possibly this is the block change in 4.7.x, that i'm no more able to have a global block config? D4.7 and D5 have no global config any more :-(((. And to make things confusing the people - older global settings are kept, but newer block settings are not set global, what have many people confused (me too)...
So i would say WORKSFORME and close this case.
#9
i can confirm this as well - dev version of section is busted for Dr 5.3 as well
was confusing the hell out of me... when you go to block admin page and select different themes it wouldnt flip theme..
went to last offical rel.. working fine now
#10
Please write a repro plan. Sections is working well for me.
#11
ok, i believe that it is working...
it did appear as though it was messing with the block admin but i have a few views issues with fused view and union view and was clearing some cache entries to get around them.. and somehow that combined with sections was causing my issues... stilll havent quiet sorted it out... but i have created (better) workarounds for these issues (i.e. no more deleting of cache entires and sections now appears to be working fine...
no idea how sections was being affected by what i was doing... but i hope i have seenthe last of these odd issues.
#12
This is the way Drupal's theme system works wrt blocks.
A block is configured icw a theme.
module + block + block config + theme == block visibility
I very much dislike this concept in core, but untill that is fixed, this is how things work. Basically this 'feature' in core makes a module such as sections useless.
But not broken.