Closed spleen1981 closed 9 months ago
@herrvigg better "Rebase and merge" for this PR in case, for cleaner history.
HI,
this solution resolves 2 reported BUGS:
Thank you.
This fixed an instance of #1358 for me (CRITICAL Uncaught TypeError: Argument 1 passed to QTX_Module_Slugs::get_page_by_path() must be of the type string, null given, called .../slugs.php on line 438 and defined in .../slugs.php:1039
).
Thanks.
Great with a lot of fixes, but the review and follow-up is made difficult by "squashing" all in a single commit. Since it's very different topics I would prefer separate fixes and merge them one by one. Let's go for a merge.
Bunch of fixes for slugs module:
Slugs: fix possible null passed to filter_request functions Fixes #1358
Slugs: filter_request() reformatting and cleanup
Slugs: use 'Locale at front-end' if available as hreflang Fixes #1359
Slugs: remove reference to obsolete hook
Slugs: fix home_url to handle 'rest' and 'relative' schemes This is needed to fix wrong result in case of 'relative' scheme argument request, being currently returned the entire 'http/https' anyways. Fixes #1373 Fixes #1273
Slugs: restore original query if filter_request() fails In case filter_request is not able to identify an handling function, original query needs to be provided (including the 404 flag previously stripped)