pagination links that work
http://j5c/search?q=joomla&d1=&d2=&w1=before&w2=before&start=5
pagination links do NOT contain the "q=joomla" query parameter.
http://j5c/search?d1=&d2=&w1=before&w2=before&start=5
If you turn off "Use URL Rewriting" and SEF URLs, all of the pagination links contain the parameter.
http://j5c/index.php?option=com_finder&view=search&Itemid=115&q=joomla&limitstart=5
J5.3.3, PHP 8.3.6, MariaDB 10.11.13
vanilla install - all configuration changes to recreate this issue are listed above.
If I modify /components/com_finder/src/View/Search/HtmlView.php line 161, removing "->get" from the end. pagination URLs now contain the missing query parameter.
Labels |
Added:
No Code Attached Yet
|
Title |
|
I don't know what I'm doing wrong then. I'll investigate for a bit before I close this - maybe it's something stupid I've done and upon discovering it I can help someone else with the explanation.
No idea
OK, just some basic testing of the _GET array reveals that the q variable is being stored with a leading "?". So if I were to alter the $queryParameterList to include "?q"=>'string' - everything works fine (but with a double ?? in the resulting URL)
If I drop into /components/com_finder/src/View/Search/HtmlView.php - where the pagination URL parameters are set and check out the outputs of various elements at the point in the script where the inputs are retrieved, this is what I get:
$i = $app->getInput()->get;
print_r('q:'.$i->get('q')); // outout - q:
print_r('q:'.$i->get('?q')); // output - q:joomla
print_r($_GET); // output Array ( [?q] => joomla )
So, it's php capturing the query parameter incorrectly.
So why does it work perfectly for me
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2025-09-13 13:14:14 |
Closed_By | ⇒ | stutteringp0et |
Because...
https://media1.tenor.com/m/Dmvk0iei-i8AAAAC/liar-liar-guilty.gif
I just needed someone to confirm it was actually working to encourage myself to figure out what I did wrong - and figure it out I did.
Solving a problem I had experienced years ago where the "?" was being stripped from the query string, I started using:
try_files $uri $uri/ /index.php?$is_args$args;
That injects a "?" before the arguments - this is the first time it has ever bit me. Removing it in favor of the Joomla recommended config (exactly the same, but without $is_args) and it works fine. So going forward, I won't be using that special configuration on Joomla sites.
Thanks for the confirmation Brian.
Unable to confirm
chrome_6TrJPqHVez.mp4