I am having a weird issue where the link in the shibboleth login block changes arbitrarily. The part after shib_login/ is what changes. For a long time it was node/xxx, the front page of my site. But for a while it was coming up node/yyy, so users were getting sent to a random node. Then it was back to normal. Now it is taxonomy-term/xxx. By setting a value for the redirect after login I am able to get my users to always see their account page after they sign in. But I would like to determine what is causing this behavior in the first place. Anyone else experiencing this? Any suggestions what to check?

CommentFileSizeAuthor
#8 1497524-set-block-cache.patch457 bytestcmug
Members fund testing for the Drupal project. Drupal Association Learn more

Comments

alimac’s picture

I'm having this issue as well - clicking "Log in" from the front page, successfully logging in, then redirected to a random node (although sometimes it's consistently the same random node). I wonder if it has to do with caching blocks...

svenaas’s picture

We had this problem with block caching as well. We solved it with the Block Cache Alter module which adds a field to each block allowing the block to be cached per page, per user, etc.

alimac’s picture

Thanks, svenaas. Installing Block Cache Alter (and setting caching to per-page for the shib auth block) fixed the issue for me.

heatherwoz’s picture

Title: Login block link changes arbitrarily » Login block caching causes redirection problems for users after login

Yes, Block Cache Alter solves the problem for me too. I'll let the module maintainers decide whether to change the status to fixed, or if there is something in the Shib Auth module that should be changed to prevent this problem. Seems like it should control the caching correctly so that users don't have to rely on another module.

heatherwoz’s picture

Actually, I found I need to use per role per per page.

alimac’s picture

Can you elaborate why per page per role (just curious about your use case)?

heatherwoz’s picture

When I logged out, I found that the login link would disappear from pages I had viewed while logged in. The shib login block doesn't display for authenticated users. So I'm guessing it was caching the fact that it's not being displayed. The block should cache differently for anonymous users than for authenticated users.

tcmug’s picture

Issue summary: View changes
FileSize
457 bytes

Heres a patch for setting the login block cache to be per page.