No Code Attached Yet
avatar david-fores
david-fores
17 Oct 2024

Steps to reproduce the issue

With the latest changes to the SEF plugin, many scenarios have been improved to avoid duplicate content and erroneously indexing canonical URLs that are not canonical.

However, I have found a case where the redirect does not occur and ends up showing the content of an article with a URL that should not, and also marks it as canonical.

  1. Content > Categories
    Create a category called “category-1”.

  2. Content > Articles
    Create an article “article-1” associated to the category “category-1”, and any text to the article.

  3. Menus > Manage
    Create a menu called "Junk Menu".

  4. Menus > Junk Menu
    Create a menu item of type “Articles > Single Article”.
    Then select the article “article-1”.

  5. Menus > Main Menu
    Create a menu item of type “System Links > Menu Heading” with title "Blog".

  6. Menus > Main Menu
    Create a menu item of type “System Links > Menu Item Alias” with title "alias-to-article-1".
    Then select the article “article-1”.

Expected result

If someone were to access the URL by following the menu path (by typing it manually in the browser for example):
https://www.example.com/blog/alias-to-article-1

He/she should be redirected to the URL of the article:
https://www.example.com/article-1

Actual result

The content of "article-1" is currently displayed without redirecting.
The URL remains at https://www.example.com/blog/alias-to-article-1.
And also in the source code you can see that this URL is marked as canonical.

<link href="https://www.example.com/blog/alias-to-article-1" rel="canonical">

Search engines would be interpreting duplicate content between these 2 URLs, since the 2 would have been marked as canonical but with the same content.
https://www.example.com/article-1
https://www.example.com/blog/alias-to-article-1

System information (as much as possible)

PHP Version: 8.3.6
Database Version: 10.6.17-MariaDB
Web Server: Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.3.6
WebServer to PHP Interface: apache2handler
Joomla! Version: Joomla! 5.2.0 Stable [ Uthabiti ] 15-October-2024 16:00 GMT

No external plugins installed.

Additional comments

As I mentioned before, this scenario would occur if the user manually entered that path in the browser.

From the HTML code that Joomla generates, I think it would not be possible to access that path, because when creating the link in the menu, it correctly assigns the URL of the article.

But I don't know if any sitemap generator or the crawlers themselves would be able to access it.

I think it is better to have all the possibilities covered.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar david-fores david-fores - open - 17 Oct 2024
avatar david-fores david-fores - change - 17 Oct 2024
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 17 Oct 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 17 Oct 2024
avatar david-fores david-fores - change - 17 Oct 2024
The description was changed
avatar david-fores david-fores - edited - 17 Oct 2024
avatar Hackwar Hackwar - change - 21 Oct 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-10-21 06:30:50
Closed_By Hackwar
avatar Hackwar Hackwar - close - 21 Oct 2024
avatar Hackwar
Hackwar - comment - 21 Oct 2024

Hello @david-fores, thank you for your report. Yes, Joomla still can encounter duplicate content despite the improvements in 5.2, however this is a very complex problem and we will not be able to solve it for everything. It will be a continuous process to improve this. Since we already have a different feature request with #44310 covering this, I'm closing this issue.

Add a Comment

Login with GitHub to post a comment