-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
apply sef autocorrection #16758
apply sef autocorrection #16758
Conversation
this works as described and its great but it has other consequences which may or not be desired create two menu items to exactly the same thing eg category list to the same category Also I think that because this can change the current behaviour of a site as above then it should be disabled by default |
No it should not, as Itemid is respected. |
Ok, I've re-tested and yes, the situation is there: @brianteeman so do you think system should encourage settings that are bad for SEO by default? Or should I change joomla installation SQL so plugin is enabled on install? It will fix the issue for new sites and allow to preserve this 'bad feature' for existing installations by default? |
@alex7r just wondering if this was a PR you're going to further pursue? From experience, the need to end up with 2 urls for otherwise identical items is common enough to not apply the PR. This might be due to a need to assign different modules to different pages, or show different templates for some reason (eg main template vs a stripped back landing page) Autocorrection I know would be something I'd turn off if it was a default feature, and if I did need a redirection in place, I'd just manually add it in the Redirect component, so I'm possibly not a target audience for what you're attempting to do. Happy to discuss more what it is the PR is trying to achieve. Looking at this PR as part of a "Outstanding PR Status List" exercise to work on reducing the number of outstanding PR that have been otherwise orphaned, neglected or forgotten instead of being merged. See Glip Bugs & Fun @ Home channel for more information. |
Sorry that it has taken so long to move on with this pull request. As time was flying, Joomla evolved and new features should be ported to 4. Would you mind to rebase your pr to the latest 4.2 branch? Also update your code to use the namespaced classes. In the meantime I close the pr. When ready to be tested with Joomla 4.2, don't hesitate to reopen again. Thanks for your contribution, making Joomla 4 better. |
Summary of Changes
Add (and enable by default) SEF url auto correction by redirecting to appropriate url.
Testing Instructions
Create an article in category and use aliases like:
cagetory:
subcategory
article:
qtestucat
Correct link for the article is
/index.php/8-subcategory/2-qtestucat
You should have access only for correct urls.
And 404 or 301 at incorrect urls.
Expected result
You can't access article by
/index.php/8-subcategory/2-qtest
(?somevar=exists
)it redirects you to
/index.php/8-subcategory/2-qtestcat
(?somevar=exists
)Actual result
You can access article by
/index.php/8-subcategory/2-qtest
(?somevar=exists
)