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.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | 1196022-detect-logintobbogan-403-9.patch | 1.11 KB | thedavidmeister |
| #7 | 1196022-detect-logintobbogan-403-7.patch | 741 bytes | thedavidmeister |
| context_error-login_toboggan.patch | 654 bytes | infojunkie |
Comments
Comment #1
infojunkieComment #2
snufkin commentedCould 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.
Comment #3
infojunkieI 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!
Comment #4
jyee commentedI'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.
Comment #5
snufkin commentedcommitted, thanks
Comment #7
thedavidmeister commentedThis 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.
Comment #8
thedavidmeister commentedsorry, needs review.
Comment #9
thedavidmeister commentedAh, 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.
Comment #10
thedavidmeister commentedpatch