? Success

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
1 Dec 2014

While working on #5140, I noticed that we never use the language value of the article when calculating the URL for it. Basically it means that we don't care if an english article is assigned to a french menu item, etc. Long story short: If you want to get the right URL, you need to provide the article ID, the category ID and the language.

Testing instructions: See that Joomla now creates the same and right URLs everywhere. Except for the TOS in the user plugin... Can't fix that one...
This testing instructions actually mean, that this needs a code review rather than a test.

For those looking for numbers: We have 35 files where ContentHelperRoute::getArticleRoute is called. Only in 3 of those files we are using the right language parameter.

avatar Hackwar Hackwar - open - 1 Dec 2014
avatar jissues-bot jissues-bot - change - 1 Dec 2014
Labels Added: ?
avatar Hackwar
Hackwar - comment - 1 Dec 2014

BTW: actually we would have to change the methods to make the catid and language non-optional, but that would break backwards compatibility.

avatar Hackwar
Hackwar - comment - 1 Dec 2014

$article. I don't know where that $contact is coming from.

avatar smanzi
smanzi - comment - 1 Dec 2014

... methink this 3.4.0 will be something interesting ... :yum:

avatar smanzi
smanzi - comment - 1 Dec 2014

@Hackwar Travis seems to be stuck...

avatar brianteeman brianteeman - change - 3 Dec 2014
Category SEF
avatar johanjanssens
johanjanssens - comment - 3 Dec 2014

Reviewed the code. Looking good. Excellent find @Hackwar

avatar Hackwar Hackwar - reference | 0e6ca11 - 6 Dec 14
avatar Hackwar
Hackwar - comment - 7 Dec 2014

As @Bakual wrote, the stuff in /components/com_contact/helpers/icon.php most likely should go the other way around... That file most likely is still crap, but maybe its now half correct crap? I honestly would rather delete it and call it a day. That file never worked, so most likely it was never used anywhere...

avatar wilsonge
wilsonge - comment - 7 Dec 2014

PR to just remove it and be done with it #5339

It doesn't work it hasn't worked since the day it was introduced into core. It doesn't really have a proper purpose. Kill it.

avatar infograf768
infograf768 - comment - 8 Dec 2014

( ! ) Notice: Undefined property: stdClass::$catid in /Applications/MAMP/htdocs/testwindows/trunkgitnew/plugins/content/pagenavigation/pagenavigation.php on line 190
! ) Notice: Undefined property: stdClass::$language in /Applications/MAMP/htdocs/testwindows/trunkgitnew/plugins/content/pagenavigation/pagenavigation.php on line 190

Folks, this needs extensive testing in mono and multi language.

avatar Hackwar
Hackwar - comment - 8 Dec 2014

Should be fixed.

avatar infograf768
infograf768 - comment - 8 Dec 2014

Suggest to also check

    <a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catid, $item->language)); ?>">

in beez (was catslug)

avatar infograf768
infograf768 - comment - 9 Dec 2014

in fact, no incidence in that case. merging. Thanks.

avatar infograf768 infograf768 - change - 9 Dec 2014
Milestone Added:
avatar infograf768 infograf768 - close - 9 Dec 2014
avatar infograf768 infograf768 - reference | 246dce5 - 9 Dec 14
avatar infograf768 infograf768 - merge - 9 Dec 2014
avatar infograf768 infograf768 - close - 9 Dec 2014
avatar infograf768 infograf768 - change - 9 Dec 2014
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2014-12-09 09:26:29
avatar Hackwar Hackwar - head_ref_deleted - 9 Dec 2014
avatar shur shur - reference | b4b94cb - 14 Dec 14
avatar shur shur - reference | d457bb5 - 14 Dec 14

Add a Comment

Login with GitHub to post a comment