No Code Attached Yet
avatar stutteringp0et
stutteringp0et
12 Sep 2025

Steps to reproduce the issue

  • Fresh install 5.3.3
  • install sample data
  • modify search menu item to decrease displayed item count to 5 (to force pagination)
  • global configuration - enable sef rewriting "Use URL Rewriting"
  • in frontend - search for "joomla" (easy target, 12 results force pagination)

Expected result

pagination links that work
http://j5c/search?q=joomla&d1=&d2=&w1=before&w2=before&start=5

Actual result

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

System information (as much as possible)

J5.3.3, PHP 8.3.6, MariaDB 10.11.13

vanilla install - all configuration changes to recreate this issue are listed above.

Additional comments

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.

avatar stutteringp0et stutteringp0et - open - 12 Sep 2025
avatar joomla-cms-bot joomla-cms-bot - change - 12 Sep 2025
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 12 Sep 2025
avatar stutteringp0et stutteringp0et - change - 12 Sep 2025
Title
com_finder + sef rewrite urls = nonfunctional pagination
[5] com_finder + sef rewrite urls = nonfunctional pagination
avatar stutteringp0et stutteringp0et - edited - 12 Sep 2025
avatar brianteeman
brianteeman - comment - 13 Sep 2025

Unable to confirm

chrome_6TrJPqHVez.mp4
avatar stutteringp0et
stutteringp0et - comment - 13 Sep 2025

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.

avatar brianteeman
brianteeman - comment - 13 Sep 2025

No idea

avatar stutteringp0et
stutteringp0et - comment - 13 Sep 2025

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.

avatar brianteeman
brianteeman - comment - 13 Sep 2025

So why does it work perfectly for me

avatar stutteringp0et stutteringp0et - change - 13 Sep 2025
Status New Closed
Closed_Date 0000-00-00 00:00:00 2025-09-13 13:14:14
Closed_By stutteringp0et
avatar stutteringp0et stutteringp0et - close - 13 Sep 2025
avatar stutteringp0et
stutteringp0et - comment - 13 Sep 2025

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.

  1. is it Joomla? (No, thanks for confirming that @brianteeman )
  2. is it PHP? I thought so, but followed the breadcrumbs backwards to determine that it was...
  3. NGINX configuration!

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.

Add a Comment

Login with GitHub to post a comment