Hi this module is a great improvement on the user friendliness of managing and adding a block to a region.

But i don't get some things. I installed Node block (works properly), Region Manager and Region Visibility. (Also note that Admintheme.module is on and set to a specific admin_theme

1. I click on the "nice" configure button on the right sidebar. It takes me to /admin/build/region_manager/theme_name/right?destination=node
2. On the top it states, add a Block. I create a new block using node block. After submitting the node block I get the following message "The block you just created is now available on the block configuration page." There is no new block in the right region and the link from nodeblock message takes me to admin/block (standard block configuration page)
3.The the core block configuration page is also broken (In the scene that it is not showing the theme "garland" but my admin theme. The blocks set on the garland block page is also all block specific to my admin theme and if i switch to other theme blocks it keeps the admin settings and theme on that page.

And another thing, why is some blocks (Locked) and how do I unlock it?

And how do I send a block from the Left region to the right?

Thanks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vlooivlerke’s picture

Ok, I figured out some things.

When you enable this module it is best to have no previous blocks created, also no special names must be given to those block titles or they become locked and you will not be able to move them. This is what happened with me when I build blocks using nodeblock and then turned region_manager on later.

The bug with the admin theme is still there.

To test it best is to create a separate role over your user 1, and give it roles to manage regions. (NOT to manage Blocks)
Then in the Region you need to create a block click on the "configure bar" at the bottom of your sidebars. Add a nodeblock
It will give you a message that your block is created but if you click on the configure link it will give you access denied. But not to worry the block is created and if you visit the same sidebar "configure bar" you will find your block in the disabled section. Simply drag it to active for that specific page.

To move a block from one region (left) to (right) simply click on the "configure bar" in the sidebar (left) drag the nodeblock to disabled and click save. Now go to the right side bar and click on "configure bar" and drag the nodeblock from disabled to active on-page_node

Thanks
This is great.

q0rban’s picture

Status: Active » Postponed (maintainer needs more info)

Hi Paul, thanks for the feedback!

I'm not really sure how to handle the admin theme issues. Because regions are theme specific, there's not really a way to have a configure link for a region from a different theme. For instance, if your default theme is a Zen theme, and your admin theme is Garland, Zen has regions that Garland doesn't have (content-top, content-bottom, closure), and Garland has a region that Zen doesn't have (content). The role that has 'Manage Regions' should be seeing the site with the theme they want to manage the regions for.

As far as your other issues let me clarify that as of now the way this module works is by setting the block visibility to 'Show on only the listed pages'. Any block that has been set to have a visibility setting different than that will display as "Locked." Eventually, I'd like to think of a way to add more custom visibility options, but I'd rather err on the side of simple UI then advanced features.

I'm not sure why you were having that weirdness when adding a nodeblock. Can you try this out for me?

  • Navigate to a node page, ie node/1
  • Click 'configure' in one of the regions.
  • Click an "Add new" link to add a new nodeblock.
  • Add the content for the nodeblock and hit submit.
  • You should then be redirected back to 'node/1' (or whatever path you clicked configure on) and the nodeblock should be already activated in that region. The nodeblock will only display on node/1. This is by design.
vlooivlerke’s picture

Thanks James

I played till late night with this module. It is getting better the more I understand its workings.

I fully understand the admin theme problem and I turned it off when configuring blocks.

The advanced admintheme.module has the following option "Do not use administration theme on the following pages.: "
That fixes the admin theme problem.

About the weirdness when adding a node block, I have pathauto on, I go to a node called domain.com/flowers (node/1)
Click configure in the right sidebar region, add a nodeblock and destination=node/1, so I am taken back to /flowers, but the block is not created in the region, but I can find it under disabled blocks.

But I am going to play some more with it.

I used the latest nodeblock with translation options and I have translation on.

q0rban’s picture

Paul, can you download the latest version from github and test it out to see if you are still having this problem? The UI has changed considerably since your posting of this issue, so I'd like to see if this is still an issue.

q0rban’s picture

Title: Block theme switcher broken in drupal core blocks » Nodeblocks must be manually added to the region
Version: 6.x-1.0-alpha2 » 6.x-1.x-dev
vlooivlerke’s picture

Wow, love the new UI

Did run update.php and all works like it is supposed to except for the bug still in creating a new block and not populating the corresponding region.

When i create a block using the region manager "create" button, the new block is not activated, but can be found in the "disabled" section of region manager.

please note, I am still using all those other modules I mentioned in the previous comment, and did not test it in a clean install.

Thanks for the new UI

q0rban’s picture

Paul,
You know the problem may be with the translation module now that I think about it. I wonder if adding the translation actually changes what the arg() function returns. Is there a way you can test it with the translation module off, to see if that's true?

Thanks,
James

vlooivlerke’s picture

No success.

I activated the module with less modules active.
I did not install i18n and did not activate pathauto.

I do have path.module in the core active.
Any other ideas I can try?

vlooivlerke’s picture

It works with a fresh install.

I am looking into my other modules to see what is causing it to stop working
Thanks

vlooivlerke’s picture

Could this be a reason why it is not working?

I first install region manager then nodeblock, then it works.
but the other way around it does not work.

q0rban’s picture

Paul, first of all, thanks so much for spending the time to troubleshoot this. In looking through the nodeblock module, I see no reason why it would make a difference which order you install nodeblock or region_manager.

Can you copy and paste the path that you are at after clicking one of the "Create" links (on your install that isn't working)? ie, node/add/page/garland/left?destination=node/1 or something like that.

vlooivlerke’s picture

Hi James

here is a demo of your module in action.
It is on a South African server, things could take longer.
login url: http://demo.ilaaik.co.za/user
username: demo
password: demo

You will notice that it is translatable in all "11" official languages of South Africa, we are trying to present an educational tool and making Drupal easy to use.
Your module and the Taxonomy menu module is the basis of the user friendliness that I want to introduce to all South Africans. Thanks

SiteMaster.ServeLime.com’s picture

Hi there

I'm experiencing the same problems - with no Internationalization / Language

Garland is my Admin Theme & Tapestry the main theme - same Admin-theme bug + "Locked" blocks issue

q0rban’s picture

Status: Postponed (maintainer needs more info) » Active

Ok, well now we at least have more than one user with the issue so I'm setting this to active. I have a pretty strong suspicion this is due to the admin theme, so I'll have to test that out sometime and see where its coming from.

SiteMaster.ServeLime.com’s picture

I disabled the Admin Theme, which fixed the Theme displayed, but not the Locked Blocks

vlooivlerke’s picture

This could be the bug: http://drupal.org/node/554324#comment-1951660

"This module is calling init_theme. So this is a bug in this module."

Any idea?

q0rban’s picture

FileSize
852 bytes

Paul, can you try out this patch and see if it fixes the issue? Thanks

vlooivlerke’s picture

Ok it works, so, so

I installed the latest Admin theme 1.3
Applied your patch

Renault:

When i visit admin/build/blocks it shows my selected theme and not my admin theme (previous bug showed the admin theme)

When i visit the rest of the active themes in admin/build/block/list/minelli it shows the admin theme and not the minelli theme and regions.

If I make minelli my default site theme then when visiting admin/build/block I can manage the minelli theme regions

So all admin/build/block/list/* themes show the admin theme (rootcandy in my case)

About the Issue: Nodeblocks must be manually added to the region
it is still a bug

On a clean install the bug does not exist, but with admin theme module installed, bug reveals itself.
Even if you uninstall admin theme both bugs still exist.

Thanks for the patch.
Do I have to clear or rebuild a theme registry or something? - and how?

q0rban’s picture

Ok, thanks for trying that out so quick!

I think I've tracked down the bug for the admin/build/block page. The menu callback for that page sets the custom_theme, but does so after region_manager has already been called. I feel like this is a bug in block.module, that it sets $custom_theme but doesn't unset $theme (forcing to re-init the theme).

Try this patch.. I'm not crazy about this implementation because it's using preprocess_page to manually add the region_manager menus to the region variable, which feels messy to me, and could potentially break again by another module doing something similar.

q0rban’s picture

Title: Nodeblocks must be manually added to the region » Does not work when an admin theme is set
Status: Active » Needs review
FileSize
5.47 KB

Ok, I think I've tracked down all bugs associated with having an admin theme active. Try the attached patch!

vlooivlerke’s picture

Great, Region manager now works with the latest version of admin theme.

After submitting the patch I had to re save region manager settings as the admin bars in the theme regions was non existent.
There is also no need to specify in the admin theme module to disable its functionality on admin/build/blocks as it is doing it by default.

But (and here comes the sad news) this issue was not resolved. The one of manually adding blocks.
Or was this patch also intended to fix that problem, as it seems to be caused by the admin theme module.

Thanks, your coding is really impressive.

q0rban’s picture

After submitting the patch I had to re save region manager settings as the admin bars in the theme regions was non existent.

...this issue was not resolved. The one of manually adding blocks.

That's strange; I didn't run into either of those issues while testing myself. I'll do some re-testing.

Thanks, your coding is really impressive.

/me blushes.
Aww, shucks... Thanks! ;)

Thanks for your help in tracking this down!

q0rban’s picture

So I tested this patch again, and it is working well for me with an admin theme. Paul, can you try again?

q0rban’s picture

Status: Needs review » Fixed

I've committed the patch: http://drupal.org/cvs?commit=256442
I figure this way we can be sure we're both working from the same code. Drupal.org should package up a new dev version by tomorrow.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

aschiwi’s picture

I just ran into this issue with the latest stable release. Good to see you guys already worked on it. When will it be committed to the stable release?

q0rban’s picture

Hi aschiwi, you're right, it's about time for another release. Do you mind testing out the dev release to see if it fixes your issues?

aschiwi’s picture

q0rban, thanks for the super quick reply! I really like this module, it's great for clients.

I installed the dev release today. It solves the issue mentioned here and does not seem to bring up new issues. Here's what I tested:

I added new blocks (using nodeblock), configured block titles and moved blocks around. I checked and changed settings at admin/settings/region_manager (my blocks are called widgets), I changed what kinds of blocks are available at admin/settings/region_manager/regions/MYTHEME. Did not run to any kinds of problems.

I also love how you can now set visibility so I can uninstall http://drupal.org/project/region_visibility.

aschiwi’s picture

Hi q0rban,

I just ran into this again, forgetting I had already known the cause of it :D
I had the dev running without problems on a site from March until a couple of days ago, when I ran updates.

How about another release soon? :)

Thanks,
Anja