Keyword

Login bug

  • Webcrea
  • Webcrea's Avatar Topic Author
  • Offline
  • Junior Member
More
3 years 5 months ago #177095 by Webcrea
Login bug was created by Webcrea
Hi,

Only with firefox...
When I log in from a k2 page.
I'm effectivly logged, but I have to make F5 to see the good menu.
From another page is not k2, no problem

www.winescholarguild.org/champagne-immersion-study-trip-champagne-wine-tour

Regards
chris
Attachments:

Please Log in or Create an account to join the conversation.

More
3 years 5 months ago #177112 by JoomlaWorks
Replied by JoomlaWorks on topic Login bug
This is probably due to the recent cache changes in K2 v2.10.3. When caching is enabled, K2 items send special HTTP headers to browsers to assist in client-side caching. As such, a login page in a K2 item URL may not work as expected.

Comment out these 2 lines github.com/getk2/k2/blob/master/components/com_k2/views/item/view.html.php#L465-L468 for now and I'll make sure this is optional in the next update of K2 via a switch in the K2 Settings.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Webcrea
  • Webcrea's Avatar Topic Author
  • Offline
  • Junior Member
More
3 years 5 months ago - 3 years 5 months ago #177128 by Webcrea
Replied by Webcrea on topic Login bug
Hi fortis,

I made the change but no. this is the same thing... After login, it's like I'm not connected!

Do you want an access to our website?

Regards
Chris
Last edit: 3 years 5 months ago by Webcrea.

Please Log in or Create an account to join the conversation.

More
3 years 5 months ago - 3 years 5 months ago #177134 by webcrea
Replied by webcrea on topic Login bug
Hi Fotis,

Can you try to help us further on this? Login not working normally on K2 pages when users use Firefox is a real problem. We get requests for support all the time.

Here is a test account for you to check the issue: Username ****** and password ******.

Try to log in from Firefox on a page like this one: www.winescholarguild.org/study-programs-overview/iws-prep-course

When you log in, the top menu still says "log in". If you refresh, then it changes to "My Account" like it should.

We really hope you can help.

Chris
Last edit: 3 years 5 months ago by JoomlaWorks. Reason: Redacted credentials - remember the forum is public ;)

Please Log in or Create an account to join the conversation.

More
3 years 5 months ago #177140 by JoomlaWorks
Replied by JoomlaWorks on topic Login bug
I kept the credentials you added and redacted them afterwards...

Testing your URL, there's a "Cache-Control: must-revalidate" HTTP header sent that is probably causing these issues. See why in the MDN docs here: developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control

And since you don't (obviously) have the means to revalidate these URLs, you get these problems.

Now, this HTTP header may come from some other Joomla system plugin or it may be inserted in your site's .htaccess file (since you're using Apache as your webserver).

Dig around too see what's injecting that HTTP header and remove it.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Webcrea
  • Webcrea's Avatar Topic Author
  • Offline
  • Junior Member
More
3 years 5 months ago - 3 years 5 months ago #177146 by Webcrea
Replied by Webcrea on topic Login bug
Hello Fotis,

We don't have any instruction for the cache-control in our .htaccess. And, if it's the problem, why only pages from K2 should be affected? All pages should be infected, no?

Where can I see the cache-control effect please?

I found some code from JCH optimize in the .htaccess. I deleted all the code about cache. The issue is not solved.

Regards
Chris
Last edit: 3 years 5 months ago by Webcrea.

Please Log in or Create an account to join the conversation.

More
3 years 5 months ago - 3 years 5 months ago #177147 by webcrea
Replied by webcrea on topic Login bug
Hi Fotis,

Where can I see the cache-control effect please? I found some code from JCH optimize in the .htaccess. I deleted all the code about cache. The issue is not solved.

Also, while we thought that the problem was specific to Firefox, in fact there is also almost the exact same issue on Chrome.

On Chrome or I.E., if you login on a k2 page, it works. You are logged in. When you log out, you get redirected to the homepage and are logged out. But if you navigate back to any k2 item page that you had visited when you were logged in (not category... in category view it is fine), then the main menu still says "My Account" (vs "Login") unless you refresh the page manually. At the bottom of the K2 page, I do have the Comment box on blog articles (comments are only active for logged in users) but I can't post a comment (it shows as if I was logged in but I am not).

K2 items you had not visited while logged in show the menu correctly after logout. It is only those you had previously visited.

So it seams it is linked to a menu cache issue only on k2 item pages.

What a pain!
Last edit: 3 years 5 months ago by webcrea.

Please Log in or Create an account to join the conversation.

More
3 years 5 months ago #177150 by JoomlaWorks
Replied by JoomlaWorks on topic Login bug
This may be injected by another plugin or even the server itself (via .htaccess or a global Apache rule - although the latter is probably overkill).

What I can confirm is that "Cache-Control: must-revalidate" does not come from K2.

Ask your server's system administrator.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Webcrea
  • Webcrea's Avatar Topic Author
  • Offline
  • Junior Member
More
3 years 5 months ago #177154 by Webcrea
Replied by Webcrea on topic Login bug
Hi Fotis

Why this is only from the k2 component that the problem occurs? From other page there isn't any problem.

Chris

Please Log in or Create an account to join the conversation.

More
3 years 5 months ago #177158 by JoomlaWorks
Replied by JoomlaWorks on topic Login bug
Perhaps it's targeted by that 3rd party plugin. It's extremely easy to pinpoint on the server:
find /path/to/site/ -iname "*.php" | xargs grep "must-revalidate"

Run this via a terminal on the folder where your Joomla site is and it will reveal any extension that injects that HTTP header.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum