-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[5.2] SEF: Add option to don't set Itemid to homepage by default #42989
Conversation
You need to carefully look at the previous attempts to change this which result in a clusterf*k requiring a full revert |
This should go then into 6.0, or? |
No, this can be made in a b/c way with adding a (temporary) option. This draft is here to allow us all to easily have an installable package and to test the implications. I'm not a fan of adding yet another switch, but I also don't want to throw a change like this onto everyone at once with 6.0. Adding it to 5.2 would give people a years time to give feedback and to test it and we can adjust if something unforeseen comes up. |
6012e5d
to
46654b1
Compare
its not unforseen when it has already happened |
Then please enlighten me what already has happened. |
Not sure how this is RTC as the system tests are failing |
We are aware that there is an issue here. That is the reason why it isn't merged yet. The problem most likely stems from the fact that for new installation this feature is now enabled by default and that again changes behavior which we are testing. I'm still debugging this. |
I had to fix a bug in the component routers for the no-menu-behavior. So back to pending. @robbiejackson, @SniperSister could you test this again? This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42989. |
I edited the PR description to contain a paragraph about the changed system tests. I'm still looking for tests for this PR to add it to 5.2. Thank you! |
I have tested this item ✅ successfully on b63b69b I also patched that module code so that the catid wasn't passed to getArticleRoute() and confirmed that the old code failed but the updated code worked OK. So this fixes a genuine problem as it could be argued that you shouldn't need the catid to form the article url as all the info is in the article id:alias. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42989. |
@robbiejackson Are you sure you commented the right PR? It sounds more like you meant to comment on #43992. This PR does improve some issues, but it doesn't add the right catid by looking it up in the DB. Don't get me wrong, I'm happy for every test I can get. 😉 |
Yes I'm pretty sure. In this recent version in the com_content router getArticleId you check the id is present in the query params before you use it as the catid in the database query. I just engineered a test case where it wasn't present, there were 2 articles with the same alias, and not using ids in the URLs. |
Thank you! |
I have tested this item ✅ successfully on b63b69b Two personal remarks:
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42989. |
Thanks @Hackwar ! |
This fixes issues #43154, #40991, #43104, #35570, #30818, #42686, #41897.
Summary of Changes
Somewhere before Joomla 2.5.0 a person decided that we need to force an Itemid in each and every case of building a URL, defaulting to the home menu item if none is set. This currently results in the URLs for core components never being allowed to hit the NoMenu rule. The end result is, that these URLs are sometimes not SEFed at all.
This PR is depending on the switch in #43432. (has been merged)
This PR contains a few changed system tests. These tests were either broken, tested broken behavior or with the latest changes were unnecessary.
I'd like to thank Joomla Agentur for sponsoring this change.
Testing Instructions
By using the switch, this is backwards compatible the way it is now. When Joomla 6.0 comes around, the code should be removed completely and the changed behavior would then be the new default.
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
I checked the "no documentation changes needed" for now. I understand that some documentation for this needs to happen, but I don't want to add this to the live documentation yet when the feature has not been accepted yet.