Skip to content
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

Non-SEF URLs not redirecting to SEF and incorrect canonical tag in Joomla 5.2.5 #45135

Open
seniooriz opened this issue Mar 15, 2025 · 6 comments

Comments

@seniooriz
Copy link

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

@brianteeman
Copy link
Contributor

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

@seniooriz
Copy link
Author

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

@seniooriz
Copy link
Author

any updates?

@Hackwar
Copy link
Member

Hackwar commented Mar 18, 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.

@seniooriz
Copy link
Author

@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

.

@Hackwar
Copy link
Member

Hackwar commented Mar 18, 2025

The tag behavior is correct that way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants