-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[5.4] Fix condition to check request format in MenusHelper - deprecation warning #46341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 5.4-dev
Are you sure you want to change the base?
[5.4] Fix condition to check request format in MenusHelper - deprecation warning #46341
Conversation
|
I have tested this item 🔴 unsuccessfully on f8d1efd This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46341. |
Yes i see - but this is yet another bug - happens without the patch as well - only happens if you do use things like index.php/team works if you use only /team |
|
urls in the format index.php/xxx are created when you enabled SEF urls (the default) and do not enable URL rewriting (the default) |
|
Can we just pass this PR that fixes the original issue and open a new issue for the index.php/ bug. Needs to be fixed somewhere else. In the router i guess |
|
I have tested this item ✅ successfully on f8d1efd Thanks @MacJoom! This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46341. |
|
I have tested this item ✅ successfully on f8d1efd This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46341. |
@brianteeman Could you check and possibly change your test result? |
|
It fixes the deprecation but doesn't fix the URL. For me there's no point in fixing one without the other. |
@brianteeman But does that justify an unsuccessful test result? The PR doesn't claim to fix the URL. |
|
for me its all related. It might be if the url is fixed so that it works then this PR is redundant |
|
I have tested this item ✅ successfully on f8d1efd This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46341. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46341. |
|
On further investigation this PR is not needed, because entering just index.php/xzy is wrong or at least not intented behaviour. |
|
we should validate the link and warn with appropriate message |
|
Also I just tested on a site with htaccess sef enabled and it works perfectly without the / in that scenario |
Pull Request for Issue #45707
Summary of Changes
Check for index.php? instead of index.php before entering parse_url
Testing Instructions
As in described in the issue:
1/ Create a menu item "URL" type - enter just index.php
2/ Set errors report to maximum in global config
3/ A warning shows up in the menu item (backend)
Actual result BEFORE applying this Pull Request
Deprecated: parse_str(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/clients/client2/web46/web/administrator/components/com_menus/src/Helper/MenusHelper.php on line 76
Expected result AFTER applying this Pull Request
No warning
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed