This is a regression since Joomla 4.0.0 Beta 2 as beta 2 was working.
Install Joomal 4.0-dev
Login to super admin
Click Install next to Blog Sample Data
Click ok in JS popup
Click Components -> Smart Search -> Index
Click Index button
Click Menus -> + next to Main Menu
Click Select (Menu Item Type)
Click Smart Search
Click Search
Enter menu Title "Search"
Click Save and close
Go to front end and navigate to new menu Search item
Search for "blog"
Search results!
Page refreshes, no search results, no refilled input box with search query
PHP 7.4.7 Safari on Mac
Now go and hack your DOM and change the method="get" to method="post" in the search form and then click search - TADA!!!
However, it should, and was working with a GET request until recently.
Labels |
Added:
?
|
Tested with official Joomla 3 docker images (APACHE) (using Joomla 4.0-dev code) and it works as expected with and without SEF and with and without .htaccess, so this is a nginx specific issue...
Finally got to the bottom of this
ok this problem is with the nginx configuration provided by @nikosdion in #29303 - sorry Nic :)
When you have
/index.php?\$args
in your try_files
in nginx location blocks and then go to a url of
http://127.0.0.1/index.php/search?q=blog
you get an Input object of
as soon as I remove the \
I get the expected result input of the below and search works again.
Therefore the problem is that the advice for nginx users in #29303 is slightly wrong :)
Title |
|
Also going to post https://docs.joomla.org/Nginx here, as that documents nginx config with Joomla, and has no \
before the $args
:)
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-07-05 13:52:51 |
Closed_By | ⇒ | PhilETaylor |
@PhilETaylor Thanks for the heads up! I had copied the code from Admin Tools... forgetting that since it was a PHP heredoc I had escaped dollar signs. I updated the comment in #29303 by removing the backslashes. Can you please give it another try?
Without the slashes it works as expected and search works again as per the debug in #29985 (comment)
Thanks Nik - I just did not want others to fall over the same issue I had :)
No problem. I totally fat fingered that copy and paste
Could be worse, it could have been in the htaccess.txt and not in some Nginx config that not many people will use ;-)
/me goes hunting in the htaccess.txt next hahahaha
This is related to SEF Urls.
Disable SEF Urls and it works fine.
Therefore I'll offer up my nginx configuration (as per #29303) of