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

Add a Comment

Login with GitHub to post a comment