logintoboggan.module contains function logintoboggan_page_alter, which sets the access denied please login message... and which tries to remove sidebars. I only discovered this because my theme's sidebar regions aren't covered by the function, which just unsets sidebar_first and sidebar_second.

The function is already built to allow overriding by initializing logintoboggan_denied_remove_sidebars ... but it's not documented anywhere I could find, and it's not included in the admin screen. I've attached a patch to add this setting to the admin/settings page for the module, for people like me whose themes have other regions. (or who just like their sidebars).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

acidpotato’s picture

This patch works. I can use Context module to add sidebars. I tried adding custom template (page--user--register.tpl.php) and Context module to get the sidebars to appear but was stumped and couldn't figure out why normal Drupal overrides and methods were not working and this patch helped. Btw I am using Zen.

I don't understand why removing sidebars and preventing page template overrides is the default behavior. It is definitely above and beyond what this module needs to do, but all things considered, a great module. Thank you.

PieterDC’s picture

I agree with anik8z.

squarecandy’s picture

Version: 7.x-1.3 » 7.x-1.x-dev
Status: Active » Needs work

I agree - default value should be FALSE for logintoboggan_denied_remove_sidebars and option to remove them should be available in the admin, as per this patch.

ptsimard’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
1.56 KB

This bit me hard. I spent over an hour hunting around with dpms trying to find what was removing the sidebars. Then I got super angry at LoginToboggan for not documenting this setting!.

And I thoroughly agree that this should be an optional behavior and very visible in the settings screens.

So here I took ohthehugemanatee's patch, changed the text, set it to a default of FALSE (both in the form and in hook alter) and rerolled it against latest dev.

Hopefully this gets accepted.

Thanks

mchampsee’s picture

+1 Just lost a couple of hours trying to flag this down.