You must be logged in to reply to this topic
-
I am so sorry – I thought I sorted out all problems associated with the installation of bbpress.
Alas, I’ve just come across a very strange issue: I logged in as one of the users with moderator role. The login was fine, it redirected me to the forum after login. Then I looked at one of the forums – still logged in. Then I looked at one of the topics to which I had replied before as the very same user but now there is a message saying: You must be logged in to reply to this topic. And I find to my surprise that I am not logged in.
This is extremely frustrating. I do hope I’ll ge help with this as well.
Thank you.
-
I think I found what the problem is. I could not reply to topics even when I logged in as administrator. I cleared the cache (in FireFox and Chrome) and then the message “You must be logged in to reply to this topic” disappeared and everything went back to normal.
This is rather confusing – what can be done so that it doesn’t happen again?
Has anyone come across this issue?
Thanks.You don’t have any other cache plugins running on your wordpress, right ? Or on your providers platform ?
Pascal.
No, I don’t have any cache plugins. By provider’s platform – do you mean webhost provider or ISP?
This is a real problem.I meant webhost provider, yes.
You only have it on 1 PC/laptop, or other people on different PCs also have this issue ?
I have one PC and one netbook – both behave the same.
I am not sure if this has anything to do with the webhost provider.
How would I get around this problem?So far I have no extra ideas 🙁 You are not in an enterprise environment using proxies or so to get to your remote site, right ?
If another user switches from one role to another, he/she has the same issue ?Pascal.
No, I am not in an enterprise environment. I am at home and I am testing the bbpress on the live site. I log in as admin or another user as moderator or another user as participant. It is the same. As it is now close to midnight, I’ll continue testing tomorrow and report back. I wonder if WordPress needs flushing its cache or something – never did it before. Just a thought.
Actually,I may be getting somewhere. When I log in as admin, it gets me to the backend, then I type the address mysite.com/forums – then I see that I am not logged in. However, when I type in: mysite.com/forums/community – then I am logged in on that page.
I wonder if it has anything to do with the redirect I have in functions:function rkk_login_redirect($redirect_to, $request, $user) { return (is_array($user->roles) && in_array('administrator', $user->roles)) ? admin_url() : site_url('/forums/'); } add_filter('login_redirect', 'rkk_login_redirect', 10, 3);
You can see that discussion I had with @robkk here
I’ll do more testing tomorrow.
It is not related to that function, it is related to caching since you said you cleared your cache and it worked.
I am guessing you just do not know where to find where the caching is happening.
You said that you have no cache plugins, although if had one activated before, reactivate and see if you uninstalled it correctly or just flush the cache in the plugin.
Know that some web hosts do offer some sort of caching, it might be best to ask your hosting support to see if they have caching activated for your site somewhere and how to flush the cache and disable it.
THere are also some services like Cloudflare that have caching also so you need to check on that if you have the service.
remember if you are going to use caching it is best to only have it for guest users and not served for logged in users.
I think you may be right. I never had any caching plugins. So I would have to ask the service provider. By asking them about disabling caching, do you mean it can be done just for certain pages for logged in users only? I haven’t come across Cloudflare before. Is it used much?
I had a look at CloudFlare – it seems that they have a service for Purge Cache by tag – is this what you mean? But this is part of a plan is most expensive – it would cost more than $200 per month?
I was saying if you are using some services such as cloudflare that also cache pages, flush the cloudflare cache. If you are not using it, it is not causing the issue.
Also a plugin called WordFence security has something called falcon engine, that is basically a caching system, If you have that installed, and falcon engine activated, flush the cache, and make sure the settings for it are set up correctly.
No, I don’t use WordFence security. I never used any plugins that had anything to do with caching. Do you think I should use some plugin for the caching problem related to logins in bbpress? If so, which one? Would this be better than relying on the webhost? They may say that this is my problem.
Just making sure. It just something a user may not know at first.
I don’t think there is a caching problem during logins?? Maybe you just refreshed a page a few times and the cache recollected again.
I don’t really have a cache plugin to recommend, I guess just make sure that they are popular and have great support for any issues that may come up, other than that make sure they fit your needs.
It depends on your webhost really if you rather use their caching system, some hosts like WP engine strongly encourage users to use their system, and it is pretty good.
If you really think my login redirect code I gave you is causing the issue, you can remove it while you are trying to find this cache issue.
I don’t think this is the local caching problem because I tested it on both my laptop and netbook at home. I don’t have this problem when I test it on my site which I set up locally on my computer in xampp. This happens only on the live site.
I don’t think this is related to your redirect code. So this is a huge unexpected setback – what a shame! It doesn’t seem there is an easy solution and that I have to battle it out with the webhost provider who may not be knowledgeable about this at all.I’ve just heard from the webhost – there is no caching on the server.
They asked if I have any caching plugins in WordPress which I don’t have.
So I am really stuck.Just to let you know that I was testing it all day. I removed Robkk’s redirect code to see if there would be the same problem with Peter’s Redirect plugin and it is the same. So I am at my wits’ end.
Do you have any other users with multiple roles with the same issue? Or are you the only one?
Yes, I am testing this as myself, and two different users (one as editor, moderator and the other one just as participant). The same thing. I’ve tested this on both laptop and netbook at home in FireFox, Chrome, IE and Safari – all the same.
I have to point out that I get this on the live site but not on the site I have on my local computer – it is the same setup which I tested before I set it up on the live site as well.I would like to add that I have just now set up bbpress quickly on another live site hosted by another host to see how it would behave and there were no problems.
So it looks that the fault is on the server side? If so, how can I persuade the webhost to deal with it in more detail? All they said was that it looks that there is no caching on the server we use.OK, so it’s most probably on the server. I can try to have a quick look this weekend because I’m very curious about this one. If you want me to check there, could you send me the URL of the site and some credentials ? Check my email on http://casier.eu/wp-dev/
Pascal.
I emailed you.
I did more testing, this time I looked at response headers following instructions from this article. I am not sure if this is the right course of action but if you could bear with me could you perhaps have a look at the results below? The first part is from my good site and the second part is from the problematic site:
My good site results:
Response headers:
cache control: max-age=0
Request headers:
cache control: “max-age=0”bbpress
Response headers:
cache control: max-age=2592000, public, proxy-revalidate, public, proxy-revalidate, must-revalidate
Cache control: max-age=0After login:
Response header:
Cache control: no-cache, must-revalidate, max-age=0My bad site results:
Response headers:
Cache control: max-age=3600
Request header:
Cache control: max-age=0bbpress:
Response headers:
Cache control: max-age=2592000
Request header:
Cache control: max-age=0After successful login response header says:
Cache control: no-cache, must-revalidate, max-age=0However, clicking on page that was viewed before login,
response header says:
Cache control: max-age=3600
- You must be logged in to reply to this topic.