J3 Issue ?
avatar CEWebDesign
CEWebDesign
13 Mar 2018

Steps to reproduce the issue

create category with 2 articles + menu-item category-blog
Articles: Options: Integration: Turn on URL Routing + Remove IDs from URLs

Expected result

1 URL (or 2 url's with canonical links)

Actual result

2 URL's without canonical links, duplicate content:
http://j5877y100.demojoomla.com/index.php/cat
http://j5877y100.demojoomla.com/index.php/cat/

System information (as much as possible)

PHP Built On Linux jm100.siteground.biz 2.6.32-642.6.2.el6.x86_64 #1 SMP Wed Oct 26 06:52:09 UTC 2016 x86_64
Database Type mysql
Database Version 5.5.39-36.0-log
Database Collation utf8_general_ci
Database Connection Collation utf8mb4_general_ci
PHP Version 5.5.38
Web Server Apache
WebServer to PHP Interface cgi-fcgi
Joomla! Version Joomla! 3.8.6 Stable [ Amani ] 13-March-2018 14:00 GMT
Joomla! Platform Version Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT

and local j3.8.5, php 7.2

Additional comments

avatar CEWebDesign CEWebDesign - open - 13 Mar 2018
avatar joomla-cms-bot joomla-cms-bot - change - 13 Mar 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 13 Mar 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 13 Mar 2018
Category Router / SEF
avatar ReLater
ReLater - comment - 14 Mar 2018

I don't understand where and when you see 2 different URLs that could be interpreted as DC. Does Joomla display them somewhere or is your issue just a theoretical one?

avatar CEWebDesign
CEWebDesign - comment - 14 Mar 2018

I found this issue on 2 live sites in google search console and reproduced it as described local and on https://demo.joomla.org "Launch Test Drive". Unfortunately it is not theoretical. Do you need more information or can you please test or try to reproduce it?

avatar ReLater
ReLater - comment - 14 Mar 2018

I don't know how to test it. I haven't recognized similiar issues. Maybe others can confirm it.

avatar tonypartridge
tonypartridge - comment - 15 Mar 2018

So you have a trailing and a no. Trailing slash causing the issue.

Is Joomla! Generating both of these urls? If so where? Since we shouldn’t be building with a trailing slash. You listed two categories but talked about articles?

avatar CEWebDesign
CEWebDesign - comment - 15 Mar 2018

Yes, the trailing slash is causing the issue. Joomla! is generating both of these urls. You need just one category. Steps to reproduce the issue:

Create one category named "myblog" with some articles in it and one menu-item named "blog" with type category-blog.
Then go to "Articles -> Options -> Integration" and turn on "URL Routing" and "Remove IDs from URLs". Now in FE klick on new menu-item "blog".

Actual result: mydomain.com/blog
Now add the trailing slash: mydomain.com/blog/

I don't know what makes the crawler index this, but it finds it somehow. It would be great, if this url results in a 404 or if a canonical can be added. Please post if you need more information. Thank you.

avatar franz-wohlkoenig franz-wohlkoenig - change - 15 Mar 2018
Status New Discussion
avatar csthomas
csthomas - comment - 15 Mar 2018

Temporary you can (add a rule) to remove the last slash from URL in .htaccess file if the path in link does not exists. I mean if this is not real file / directory.

avatar CEWebDesign
CEWebDesign - comment - 15 Mar 2018

@csthomas Thank you for your suggestion. There are articles in the category with urls like mydomain.com/blog/article1.html etc.

avatar brianteeman brianteeman - change - 25 Mar 2018
Labels Added: J3 Issue
avatar brianteeman brianteeman - labeled - 25 Mar 2018
avatar proweb365
proweb365 - comment - 10 Apr 2018

@CEWebDesign I saw 2 URLs exactly the same. I am not sure that It will be better if you can remove last slash on .htaccess. In my point of view, it's better to have 1 Url instead of 2 url's with canonical links.


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

avatar Hackwar
Hackwar - comment - 22 May 2018

Joomla does not generate these. Joomla generates the URLs without the slash, so unless you can show us core code where this is happening, this is not a bug.

If you really have a problem with the trailing slash, then you can create a plugin with a routing rule/behaviour that changes that the way you want.

avatar carlitorweb
carlitorweb - comment - 22 May 2018

Go to the plugin System - SEF and fill the field "Site Domain"

screenshot_20180522084614

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 22 May 2018

so this Issue can be closed as expected Behaviour?

avatar carlitorweb
carlitorweb - comment - 22 May 2018

IMO yes

avatar brianteeman brianteeman - change - 22 May 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-05-22 16:07:56
Closed_By brianteeman
avatar brianteeman brianteeman - close - 22 May 2018

Add a Comment

Login with GitHub to post a comment