The LoginToboggan module handles 403 errors by displaying the login form. However, the approach taken by Context Error to detect 403 is not compatible with LoginToboggan. Attached is a simple patch to support LoginToboggan.

Comments

infojunkie’s picture

Status: Active » Needs review
snufkin’s picture

Could you also roll a patch for the 7.x version by any chance? I am happy to commit this one to the 6.x branch, but i think it would be awesome to have it in the 7.x version too.

infojunkie’s picture

I am not using D7 at the moment, and although the patch applies to Context Error D7, it seems that LoginToboggan has changed the way it handles the access denied condition. So the patch would not work there. I don't think I'll be able to work on that though. Sorry!

jyee’s picture

I've got D7 and haven't needed to make any changes for logintoboggan support. In my use case, I'm using context_error to display a block (in the content region) with access denied information. The logintoboggan login and registration information appears normally on the same 403 page. I haven't tried any other context reactions, but I suspect they'll work as well.

snufkin’s picture

Status: Needs review » Fixed

committed, thanks

Status: Fixed » Closed (fixed)

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

thedavidmeister’s picture

Status: Closed (fixed) » Active
StatusFileSize
new741 bytes

The LoginToboggan module handles 403 errors by displaying the login form

This is only half right. The LoginToboggan module provides the *option* of displaying the login form on 403 errors page.

As well as detecting $logintoboggan_denied you need to check that the $site_403 variable is actually set to 'toboggan/denied'.

See my patch attached for an example.

thedavidmeister’s picture

Status: Active » Needs review

sorry, needs review.

thedavidmeister’s picture

Ah, that's a *bad* patch in #7, it does the complete opposite of what I was trying to do :P. Hopefully this one is better.

thedavidmeister’s picture

StatusFileSize
new1.11 KB

patch