Skip to Content Skip to Menu

list Search expired after pressing back buttons

  • HogeRaad
  • HogeRaad
  • OFFLINE
  • Posts: 22
  • Thanks: 0
  • Karma: 0
4 years 3 months ago - 4 years 2 months ago #320050 by HogeRaad
It would be nice if we could go back to the search results without an error.

current situation
  1. Search for a user
  2. Click on one user in the results
  3. Go back to results
Result Page expired error. click twice on again an our back but that is not very friendly

Explanation: stackoverflow.com/questions/36644176/document-expired-after-pressing-back-button
Last edit: 4 years 2 months ago by krileon. Reason: Added [#8139] tag to subject

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
4 years 3 months ago #320054 by krileon
The ability to go back depends on the size of the resulting URL after a search. If the URL is longer than 2083 characters it won't convert to a GET usage and will still be a form POST. The reason for this limit is due to default server URL length limits and browser limits. All of this is noted in the below ticket, which we will be improving with further research to ensure we respect server and browser limits.

forge.joomlapolis.com/issues/8048

So for example if your userlist has say just 5 fields it should work fine as shown below.

demo.cbdemosites.com/demos/community-builder/user-lists/grid-layout

If it has too many fields resulting in too large of a URL then it will stay a POST like shown below.

demo.cbdemosites.com/profiles/userslist/4-members-list


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.

  • HogeRaad
  • HogeRaad
  • OFFLINE
  • Posts: 22
  • Thanks: 0
  • Karma: 0
4 years 2 months ago - 4 years 2 months ago #320096 by HogeRaad
At my installation i do not see anything like "?firstname=andrea" in the url.
I have 3 search fields, all textfields.

[strike]In your example it also is not working at this page:
demo.cbdemosites.com/profiles/userslist/4-members-list [/strike] Thats what you already mentioned :whistle:

edit: if i specify only one text field for search i also get the error.

edit2: if i use place this "?name=theo" behind url of the search page and hit enter to load the page then it gives the search results and can i go back from the user profile to search without an error.
Last edit: 4 years 2 months ago by HogeRaad.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
4 years 2 months ago #320106 by krileon
I don't know what to tell you. The only reason for it to not do the search redirect to GET is due to URL length. The code for this is directly found below.

IN: components/com_comprofiler/comprofiler.html.php
ON: Lines 530 - 538

You're welcome to remove the IF check if you think it's calculating in error or adding a var_dump of strlen( $pagingUrl ) to see what the URL length is. This calculation is against the non-SEF version of your URL.


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.

  • HogeRaad
  • HogeRaad
  • OFFLINE
  • Posts: 22
  • Thanks: 0
  • Karma: 0
4 years 2 months ago #320127 by HogeRaad
strlen( $pagingUrl ) returns 52 so that is not the problem.

If i hit search i do not see a parameter like ?firstname=andrea appear in the adressbar.
i upload the zip version 2.4.6+build.2020.08.21.19.59.41.9eda046cd again but no different.

other ideas?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
4 years 2 months ago #320139 by krileon
My best guess is the below checks are failing for whatever reason.

Code:
if ( $isSearching && Application::Input()->get( 'post/listid', 0, GetterInterface::INT ) && $urlParts ) {

The first one makes sure it's actually a search. The second ensures a list id exists in the POST data. The third ensures there's even parts being added to the URL. Just above that IF statement you could var dump those 3 like the following.

Code:
var_dump( $isSearching ); var_dump( Application::Input()->get( 'post/listid', 0, GetterInterface::INT ) ); var_dump( $urlParts );


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