I have a page view
/all-authors where both (Anonymous & Authenticated) users have access to it; However, authenticated users can follow (flag) an author and Anonymous users cannot do that.
What I am facing:
- An anonymous user visit
/all-authorspage as anonymous user.
- User wants to follow authors so:
- User Create a new account/Log in to the site.
- User Visit again
- User will be automatically logged out and the anonymous look of
/all-authorsview page will be shown to the user, also the entire site will look like the user is logged out:
Loginlink will be visible.
Create new AccountLink will be visible.
- Any block for anonymous user will also be visible.
However, if the user will click on Login link (
/user/login), she will be automatically logged in back to the site.
Also if the user click on Create new Account (
/user/register), she will be a prompted with
Access Denied page.
So logically speaking, the user is not technically logged out but she is served with anonymous pages while logged in (Correct me if I am wrong).
I believe that the main problem is due of caching, so below is my caching configurations:
- Site settings is set to
Internal Dynamic Page Cachemodule which “Caches pages for any anonymous users “is uninstalled from the site.
/all-authorsview page setting for caching is set to:
- Site is connected through Cloudflare Firewall with Caching Level set to
I have tried the below:
- Clear all Caches from the site side, but the problem persist.
- Purge all caches from cloudflare side, but the problem also persist.
- Purge all caches from cPanel side (cPanel -> Cache Manager), then the problem gone and the site work as expected only for current user but after that if another user on another device logged in and visit
/all-authorsview page, she will be faced with same problem again until the caches from cPanel side is purged again
Is there anything I can do from Drupal side to fix this problem ? or it is generated from server side ?