Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Route the redirect in the menu logout #42473

Merged
merged 7 commits into from
Jan 17, 2024
Merged

Conversation

laoneo
Copy link
Member

@laoneo laoneo commented Dec 6, 2023

Summary of Changes

The logout via a menu item should route the redirect to logout task. This error happens on one of my production site but not on a fresh Joomla. So it is probably a configuration issue. Neverthless, all controller actions in this class are routing the requests, so should the menu logout as well.

Testing Instructions

  • Create a logout menu item
  • Log in on the front end
  • Click on the logout menu item
  • Additionally this can also be tested with the htaccess redirect

Actual result BEFORE applying this Pull Request

Logout doesn't work on some sites.

Expected result AFTER applying this Pull Request

Logout through a menu item works direct.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@brianteeman
Copy link
Contributor

See #37763

@laoneo
Copy link
Member Author

laoneo commented Dec 14, 2023

Thanks @brianteeman for the reference. Can you give it a test? So we can ship with the next release.

@brianteeman
Copy link
Contributor

I have tested this item 🔴 unsuccessfully on 501ae72


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42473.

@brianteeman
Copy link
Contributor

Sorry for the delay in responding - I had to set up a j4 dev again

Using the detailed test instructions that I wrote in #37763

Before this PR I can no longer replicate the issue in that pr so it must have been solved elsewhere and I have closed it.

With this PR both tests for logging out with the menu item FAIL

Warning
The security token did not match. The request was cancelled to prevent any security breach. Please try again.

@laoneo
Copy link
Member Author

laoneo commented Dec 19, 2023

Can you test again by clearing the cookies first. This error comes mostly from the situation where the session has expired before doing the action.

@brianteeman
Copy link
Contributor

That was done at the time. Here is a recording

menu

@laoneo
Copy link
Member Author

laoneo commented Jan 10, 2024

@brianteeman found the issue, can you test again?

@brianteeman
Copy link
Contributor

Sorry for the delay in responding - I had to set up a j4 dev again

Using the detailed test instructions that I wrote in #37763

Before this PR I can no longer replicate the issue in that pr so it must have been solved elsewhere and I have closed it.

With this PR both tests for logging out with the menu item FAIL

Warning
The security token did not match. The request was cancelled to prevent any security breach. Please try again.

Repeated the tests.
Still can't replicate the original error
Still can confirm the new error with the earlier version of this pr
Applied the current version of this pr and got no errors

@laoneo
Copy link
Member Author

laoneo commented Jan 11, 2024

Thanks for the test, I could also only reproduce the issue on one of my sites I'm maintaining.

@sandewt
Copy link
Contributor

sandewt commented Jan 11, 2024

Thanks for the test, I could also only reproduce the issue on one of my sites I'm maintaining.

Does the error also occur when you add a new logout menu item to that site?

@laoneo
Copy link
Member Author

laoneo commented Jan 11, 2024

It happens only then.

@sandewt
Copy link
Contributor

sandewt commented Jan 14, 2024

It happens only then.

What kind of message do you see when this error occurs? Or does nothing just happen?

@laoneo
Copy link
Member Author

laoneo commented Jan 15, 2024

No message, it just doesn't log out.

@sandewt
Copy link
Contributor

sandewt commented Jan 15, 2024

No message, it just doesn't log out.

I remember having the same issue with a site in the past. I can no longer reproduce it now.

@MacJoom MacJoom self-assigned this Jan 17, 2024
@MacJoom MacJoom added this to the Joomla 4.4.3 milestone Jan 17, 2024
@MacJoom MacJoom enabled auto-merge (squash) January 17, 2024 10:45
@MacJoom MacJoom merged commit 32ba5bf into joomla:4.4-dev Jan 17, 2024
3 checks passed
@laoneo laoneo deleted the menu/logout branch January 17, 2024 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants