- Priority: 0
- Status: Closed
- Theme: Alysum
- Private: No
- Open Date: 01.06.23, 12:11
- Opened by: Piero
- Closed by: Fred
- Closed on: 08.06.23, 23:14
- Reason: Closed
- Comment: Glad to help!
Ticket #24735 - Search sidebar does not work - POST vs GET
I just migrated a website from another server; the server root location changed, and I updated it both in the database and in a json file in the theme path.
However, the search function (accessed through a magnifier icon which slides in the right sidebar titled Search) returns an error in the console when I start typing:400 (Bad Request)
This is a sample url that’s called with POST:
(no extra payload in the POST body)
which returns a 400 error; however, if I try to GET the same url, the backend returns a proper json.
Assuming it may have been due to my PHP version, I tried and reproduced the error on php 8, php 7.4, php 7.2.
I tried logging to locate the issue, but it must be high-level as nothing under /modules/pkelements is called when POST is used; and I can easily trace the code if GET is used.