Hi @sandyalexc, you’ve tried a bunch of things already, which is great.
What I would try next is to switch off all your plugins temporarily to see what happens then. This way you can eliminate any plugins causing this behaviour.
Also, I would temporarily switch to a default WordPress theme, just to make sure this is not theme related (although I don’t think it is).
Caching can be tricky. It’s great for speeding up your site, but can cause ‘weird’ things too.
The 302 status code you mentioned in your initial post means ‘redirect’; so it doesn’t mean anything is loaded from cache (just wanted to clarify that).
And the 200 status codes that follow mean ‘ok’; found the resource.
I’ve ran the same sequence with the same discussion settings you have on a test-site and after logging in the following happens:
- A 302 redirect back to the original post I wanted to comment on (no cache)
- A 200 load of the document (the post), indicating it was found (no cache)
- A set of stylesheets, fonts, scripts and images, all loading with a status of 200 (so found), and all loaded from memory cache or disk cache. These cache files come from my local browser or computer, so they are not loaded fresh from the server. The time to load for all of them is almost instant (0 to 2 ms).
- A single file loads with a 304 status code (my gravatar image), which means the browser checked if there was a newer version of that file on the server, and received the answer back that there isn’t.
My test-page showed me immediately that I was logged in, and I was able to comment right away without having to reload the page in any way.
I’m just sharing this to indicate that this is the way it should work, and that your case in indeed not how it would normally work.
More things to try:
Could you try this in a different browser and in a private/incognito browser window?
Could you re-save your permalinks and try again?
I’m also wondering if this might have anything to do with your browser’s cookie settings. I’ve seen similar behaviour on the main WordPress login page, where you login, but then get presented with the login page again (with a message that you need to allow cookies in the browser). When you then refresh the page without filling in the login credentials again, you go to the dashboard. Does that happen on your site by any chance?
Finally, there could be a something in your .htaccess file causing this. Could you try deleting what’s in your .htaccess file now and replace it with the default code WordPress normally has in there, which is:
# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
I hope this helps and look forward to hearing how it goes.
Good luck!
-
This reply was modified 2 years, 6 months ago by
Dave.