RTC Language Change PR-5.1-dev Pending

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
23 Jan 2024

Summary of Changes

Joomla has been improving its SEO performance constantly and one issue which is still open is the behavior of index.php in URLs. In some rare cases, the URL might end with index.php, even though that is not needed anymore, resulting in duplicate content, since the same URL without index.php gets the same result. A common case is the URL for the homepage, which often enough contains that reference. Another case is sites which switch from non-rewrite to rewrite the URLs.

This PR introduces one new setting in the SEF system plugin. This setting enforces removing the index.php from the URL with a redirect when the URL starts or ends with index.php. This setting only takes effect if URL rewriting is enabled.

This PR depends on #42692.

I'd like to thank ithelps Digital for sponsoring this feature.

Testing Instructions

  1. Apply the PR
  2. Enable the option in the SEF system plugin.
  3. Open a URL with /index.php/ at the beginning and see that the site is redirected to the version without.
  4. Open a URL with /index.php at the end and see that the site is redirected to the version without.

Link to documentations

Please select:

avatar Hackwar Hackwar - open - 23 Jan 2024
avatar Hackwar Hackwar - change - 23 Jan 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 Jan 2024
Category Administration Language & Strings Front End Plugins
avatar brianteeman
brianteeman - comment - 23 Jan 2024
  1. Instead of adding another option which a large % of users will never use why not simply do this in the htaccess.
  2. the description is confusing "Remove unneeded index.php from URLs" because it sounds the same as the existing option which removes index.php
  3. If accepted dont you need to update the installation and the configuration.php.dist
  4. What happened to the requirement for all new "features" to be accompanied with documentation
avatar Hackwar
Hackwar - comment - 23 Jan 2024

To the other points: see other PR

To 2.: I will reword that.

avatar brianteeman
brianteeman - comment - 24 Jan 2024

I'm misunderstanding something

Why would you have the first option enabled but not have the second option enabled

avatar Hackwar
Hackwar - comment - 24 Jan 2024

The first option modifies how URLs are created. The second one modifies how URLs are parsed. Since people are doing awful things in routing, we can't be sure that their changes don't break this feature, this the 2 options can be enabled separately.

avatar brianteeman
brianteeman - comment - 24 Jan 2024

Honestly I cant see the value for core of adding 4 extra options (this PR and the other one) to address issues in other peoples code. Thats a maintainability nightmare and a usability issue for all those people that wonder what these options do etc. If, as you say, core does not create these urls then it should be for the extension dev to fix their own problem. And if they wont the site owner can easily create an htaccess rule.

avatar Hackwar Hackwar - change - 29 Jan 2024
Labels Added: Language Change PR-5.1-dev
avatar ot2sen
ot2sen - comment - 29 Jan 2024

Brian got quite a few valid points here. Why?
The instruction for test even tells why not. "Unfortunately for testing, core Joomla does not produce such URLs anymore, so we need to do some trickery to trigger the problem." Then why is it a core issue?

Wouldn´t it better go into a checking feature for the official extension JED Checker, for it to teach third-party devs how not to do awful things in routing? IE, do this and you won´t get approved for fame and showcase. Fix it and get in.
https://extensions.joomla.org/extension/jedchecker/

avatar Hackwar
Hackwar - comment - 30 Jan 2024

And at the same time, our users are complaining about sub-par behavior of Joomla. So, should we shift the blame and force users to be stuck in that situation or provide a solution for now to get around that?

I'm happy to add this to the JED checker as soon as you solved the Halting problem.

avatar brianteeman
brianteeman - comment - 30 Jan 2024

Adding more options is never a solution. Those same users will still complain as they dont know about the options (unless they ask). If its such a real problem (I have no idea) then make the changes without options

avatar brianteeman
brianteeman - comment - 30 Jan 2024

Confusing with the existing option

image

avatar Hackwar Hackwar - change - 10 Feb 2024
The description was changed
avatar Hackwar Hackwar - edited - 10 Feb 2024
avatar Hackwar
Hackwar - comment - 10 Feb 2024

I changed the feature and description above.

avatar SniperSister SniperSister - test_item - 13 Feb 2024 - Tested successfully
avatar SniperSister
SniperSister - comment - 13 Feb 2024

I have tested this item ✅ successfully on 4e471b0

Works as described!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42704.

avatar viocassel viocassel - test_item - 14 Feb 2024 - Tested successfully
avatar viocassel
viocassel - comment - 14 Feb 2024

I have tested this item ✅ successfully on 4e471b0


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42704.

avatar richard67 richard67 - change - 14 Feb 2024
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 14 Feb 2024

Setting RTC as it has 2 good tests, but setting also the RMDG (release manager decision queue) label because this PR is subject of discussion among maintainers.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42704.

avatar richard67
richard67 - comment - 14 Feb 2024

Code style fixes and strict comparison should be done. After that, I think it just needs a review but not new human tests.

avatar Hackwar Hackwar - change - 15 Feb 2024
Labels Added: RTC Updates Requested
avatar Hackwar Hackwar - change - 20 Feb 2024
Labels Removed: Updates Requested
avatar Hackwar
Hackwar - comment - 20 Feb 2024

After some discussions, we decided to switch this to use 301 redirects instead of 303s.

avatar richard67 richard67 - change - 20 Feb 2024
Status Ready to Commit Pending
avatar richard67
richard67 - comment - 20 Feb 2024

Back to pending as there have been made changes.
@SniperSister @viocassel Could you test again? Thanks in advance.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42704.

avatar SniperSister SniperSister - test_item - 20 Feb 2024 - Tested successfully
avatar SniperSister
SniperSister - comment - 20 Feb 2024

I have tested this item ✅ successfully on c35a3a0


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42704.

avatar viocassel viocassel - test_item - 20 Feb 2024 - Tested successfully
avatar viocassel
viocassel - comment - 20 Feb 2024

I have tested this item ✅ successfully on c35a3a0


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42704.

avatar richard67 richard67 - change - 20 Feb 2024
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 20 Feb 2024

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42704.

avatar Hackwar Hackwar - change - 24 Feb 2024
The description was changed
avatar Hackwar Hackwar - edited - 24 Feb 2024
avatar Hackwar
Hackwar - comment - 24 Feb 2024

Link to documentation has been added.

avatar bembelimen bembelimen - change - 29 Feb 2024
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2024-02-29 15:46:21
Closed_By bembelimen
avatar bembelimen bembelimen - close - 29 Feb 2024
avatar bembelimen bembelimen - merge - 29 Feb 2024
avatar bembelimen
bembelimen - comment - 29 Feb 2024

Thx

Add a Comment

Login with GitHub to post a comment