Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

[#8917] No alert message when logging out from menu item.

  • bettyd
  • bettyd
  • OFFLINE
  • Posts: 4
  • Thanks: 0
  • Karma: 0
2 years 8 months ago - 2 years 8 months ago #329053 by bettyd
If a user logs out from the CB module, they are taken to the home page and an alert saying "You have successfully logged out" appears in the <jdoc:include type="message" /> area.

But if they log out from a menu item - it doesn't matter if it is a new CB logout menu item, or an alias to the logout in the CB default menu - they don't get the confirmation that they logged out. They are taken to the homepage, so at least that works.

Any idea why the discrepancy? I would love for this to be consistent.
Last edit: 2 years 8 months ago by krileon. Reason: Added [#8917] tag to subject

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48630
  • Thanks: 8307
  • Karma: 1446
2 years 8 months ago #329074 by krileon
No idea, both login module and logout menu items go to the same logout URL where the message is sent to Joomla's redirect function. Joomla message queue is entirely responsible for persisting that message across pages and rendering it. My guess is it's lost when the login session is deleted. We don't really have a way around this as we already set the message into the message queue as late as possible.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

  • bettyd
  • bettyd
  • OFFLINE
  • Posts: 4
  • Thanks: 0
  • Karma: 0
2 years 8 months ago #329079 by bettyd
This is apparently a bug?

In the file comprofiler.php line 1307 reads:
$message = trim( cbGetParam( $_POST, 'message', 0 ) );

I changed it to:
$message = trim( cbGetParam( $_POST, 'message', 1 ) );

And now the alert shows just fine when logging out using the CB User Logout menu type. It also fixed a few other alerts that were not showing when using menu items.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48630
  • Thanks: 8307
  • Karma: 1446
2 years 8 months ago - 2 years 8 months ago #329090 by krileon
I can't see why such a change would matter. The 3rd parameter just sets the default value if the data doesn't exist in POST. So if it doesn't exist it's just set to 1 instead of 0. The default probably shouldn't even be 0 but '' (empty string) or nothing for NULL.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 2 years 8 months ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48630
  • Thanks: 8307
  • Karma: 1446
2 years 8 months ago #329091 by krileon
Ok, I see why it's doing this. It's expecting message to come from POST which it won't if the logout URL is directly accessed and is why the logout message isn't passed to the redirect. Will review changing this behavior when accessing the logout URL directly.

forge.joomlapolis.com/issues/8917


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

Moderators: beatnantkrileon
Powered by Kunena Forum