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

Routing for Single Article Associations Broken in Language Module #15498

Closed
mbabker opened this issue Apr 23, 2017 · 10 comments
Closed

Routing for Single Article Associations Broken in Language Module #15498

mbabker opened this issue Apr 23, 2017 · 10 comments

Comments

@mbabker
Copy link
Contributor

mbabker commented Apr 23, 2017

Steps to reproduce the issue

Haven't done this on a fresh staging install, but myself and @Sandra97 could confirm this with the downloads site and 3.7 landing page. Set up your site with internationalized content, especially articles associated with one another, and on the front end navigate to those articles and check the URLs being generated by the module.

Expected result

The generated URLs should look similar to these:

https://downloads.joomla.org/us/
https://www.joomla.org/3/id/

Actual result

The generated URLs are these:

https://downloads.joomla.org/us/16-category-en-us/36-homepage-us
https://www.joomla.org/3/id/40-joomla-37-id/523-37-homepage-id

System information (as much as possible)

3.7 RC 4

Additional comments

The correct URLs are still working, and in the case of the downloads site the link for the menu items is correct. Also with the downloads site, the correct URLs are still being generated for the downloads repo (com_ars) so the issue seems isolated to either the module or some goofy thing in com_content.

The URLs are correctly generated for the <link rel="alternate"> elements in the page head.

Also, apparently disassociating the articles but leaving the menu items associated seems to resolve the issue but this looks to be a B/C break if that's a required action.

@Sandra97
Copy link

Sandra97 commented Apr 23, 2017

I've tested also on a copy of a live site.
Same issue happens with Category blog where I need to keep articles associated.
Instead of
http://www.mysite.com/en/activities/nautical-activities/tubing.html
it becomes
http://localhost/mysite/en/activities/nautical-activities/tubing/26-category-en/activities/nautical-activities/56-tubing.html

@infograf768
Copy link
Member

Could please be more precise on the testing conditions to be able to reproduce?

@infograf768
Copy link
Member

Correct me if I am wrong:
It looks to me the issue is unrelated to the module and to associations but rather router modifications...

Create a blog (or featured) containing articles.
One of the article can also be displayed by a menu item.

Here, if I hover the title of the article in the blog, I get
http://localhost:8888/testwindows/trunkgitnew/fr/guillaume-apollinaire/7-cat%C3%A9gories-en-fran%C3%A7ais/poetes-francais/1-guillaume-apollinaire.html

( same link in the language switcher module btw when the concerned language flag is displayed)

but the menu item is
http://localhost:8888/testwindows/trunkgitnew/fr/guillaume-apollinaire.html

@infograf768
Copy link
Member

I confirm my findings.
Installed a clean multingual test site.
Un-associate all items created by default (articles, home menu items, categories).
Disable associations in the language filter.

Make sure that the default home featured menu item is set to show article title and title link
Create a second article in one language as featured.
Create a single article menu item to display this single article.

We do have now 2 articles set as featured (in French in my example).

This is the Home page I get:

screen shot 2017-04-24 at 09 33 56

Now hover the second article in the home page (otherarticle french):
its link is http://localhost:8888/testnew/trunkgitnew/fr/article-french-2/9-categorie-fr-fr/3-otherarticle-french.html

Hover the single article menu item (article french 2) which displays the same article:
http://localhost:8888/testnew/trunkgitnew/fr/article-french-2.html

The module as well as associations are not concerned. It is a routing issue.

@infograf768
Copy link
Member

Tested with a 3.6.5 with exactly the same settings and it works fine. Title link is the same as menu item link.

@infograf768
Copy link
Member

Now tested without multingual and we DO have the original issue on 3.7

@wilsonge
Copy link
Contributor

This is an issue from @mbabker 's PR here: #13073 as https://github.com/joomla/joomla-cms/blob/staging/components/com_content/helpers/legacyrouter.php#L94 this typehint check breaks

@Sandra97
Copy link

I confirm. I did a quick test with a copy of joomla.org
For an article of the Category Blog, I created also a menu item to display this single article.
The link to the article in the category blog view in 3.6.5 is:
https://www.joomla.org/myarticle.html
But with 3.7.0, it becomes:
https://www.joomlaorg/myarticle/7-joomla-official-news/general-news/5691-joomla-downloads-website.html

@infograf768
Copy link
Member

Closing as we have 2 patches:

#15500

#15499


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

@csthomas
Copy link
Contributor

Routing for Tags also have some issue at #15336 but it existed before 3.7.0

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

6 participants