No Code Attached Yet
avatar seniooriz
seniooriz
15 Mar 2025

Steps to reproduce the issue

-Create a menu item with the alias about-joomla and ID 153.
-Ensure that SEF URLs are enabled in the Joomla Global Configuration.
-Verify that the SEF URL works correctly: https://www.joomla.org/about-joomla.html
-Now, try accessing the non-SEF URL directly: https://www.joomla.org/index.php?Itemid=153
-Observe that this URL does not get converted into its SEF equivalent.
-Enable the "System - SEF" plugin.
-Check the tag for https://www.joomla.org/index.php?Itemid=153.

Expected result

-When accessing https://www.joomla.org/index.php?Itemid=153, Joomla should automatically redirect to the SEF URL https://www.joomla.org/about-joomla.html.

-The canonical tag should point to the SEF URL, not the non-SEF URL. (very important)

Actual result

-The non-SEF URL does not get rewritten to its SEF equivalent.
-The canonical tag incorrectly points to https://www.joomla.org/index.php?Itemid=153 instead of https://www.joomla.org/about-joomla.html.

System information (as much as possible)

Joomla version: 5.2.5
PHP version: 8.3
SEF URLs: Enabled
"System - SEF" plugin: Enabled

Additional comments

avatar seniooriz seniooriz - open - 15 Mar 2025
avatar joomla-cms-bot joomla-cms-bot - change - 15 Mar 2025
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 15 Mar 2025
avatar brianteeman
brianteeman - comment - 15 Mar 2025

There is no such thing in Joomla as a canonical tag for a url

avatar seniooriz
seniooriz - comment - 15 Mar 2025

There is no such thing in Joomla as a canonical tag for a url

This was a scenario. The same scenario on my live website:

Image

avatar seniooriz
seniooriz - comment - 18 Mar 2025

any updates?

avatar Hackwar
Hackwar - comment - 18 Mar 2025

I don't want to play this game yet again: No, there is no canonical URL in Joomla. You messed up your installation by filling out the field in the SEF plugin without knowing what that field does. Clear that field. Joomla only redirects to the SEF URL if it can convert all query parts to a path equivalent and also only when you have strict routing enabled.

avatar seniooriz
seniooriz - comment - 18 Mar 2025

@Hackwar Okay, Thank you for the clarification. I have ensured that the "Canonical URL" field in the SEF plugin now is empty and that strict routing is enabled. However, the issue persists:

1- Joomla does not redirect index.php?Itemid=xxx to the SEF URL.
2- Now The canonical tag points to as Alternative TAG in all Pages!!

Image

Image

.

avatar Hackwar
Hackwar - comment - 18 Mar 2025

The tag behavior is correct that way.

Add a Comment

Login with GitHub to post a comment