? Success

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
24 Mar 2015

Ref: http://forum.joomla.org/viewtopic.php?f=711&t=880812
Set a multilingual site with associations.
Set Remove Language Code to Yes in the languagefilter plugin
Load a page with associations in another language than the site default language.

The alternate for the site default language in source will display the sef prefix.
This is wrong.

the error comes from the code introduced in #5140:
$this->default_lang; is not the default site language but the present language in use.

Patch and test again.

NOTE: when looking at this specific issue, I remarked:
1. line 619 is also using $this->default_lang; for the site default language. I corrected it.

  1. We have another regression vs 3.3.6: Home pages were always getting alternate in source whether they were associated or not. This is not the case anymore. We need to correct this.
avatar infograf768 infograf768 - open - 24 Mar 2015
avatar joomla-cms-bot joomla-cms-bot - change - 24 Mar 2015
Labels Added: ?
7484e6d 24 Mar 2015 avatar infograf768 oops
avatar wilsonge wilsonge - change - 24 Mar 2015
Milestone Added:
avatar infograf768
infograf768 - comment - 24 Mar 2015

Added, as in 3.3.6, automatic alternate for Home Pages even when not associated.

5a07b72 24 Mar 2015 avatar infograf768 cs
3b417b4 24 Mar 2015 avatar infograf768 cs
avatar jvstratum
jvstratum - comment - 24 Mar 2015

Works like a charm! Thank you for your quick response. :-)

avatar richard67
richard67 - comment - 24 Mar 2015

@test: Tested with success.

Before patch:
1. Home pages without associations have no alternate links
2. Page in other language than the site default language with associations have alternate to default language with language prefix (directory, e.g. "en/") in the URL.

After patch:
1. Home pages without associations have all alternate links
2. Page in other language than the site default language with associations have alternate to default language without language prefix in the URL.

@infograf768 Remark:
The change made with this patch might make some code refactoring useful for performance reasons: The associations (assocs) array is not used when being on a home page, it is only used when being on a non home page and having associations switched on, and so it might be possible to move reading the associations into this "elseif ($this->params->get('item_associations'))" block which is coming after the home pages "if" block.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6569.
avatar richard67 richard67 - test_item - 24 Mar 2015 - Tested successfully
avatar richard67
richard67 - comment - 24 Mar 2015

@infograf768 Forget my remark from my test above regarding optimization of code. I have had a deeper look into it meanwhile :smile: Better leave it as it is (with this PR here applied of course).


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6569.
avatar infograf768 infograf768 - change - 24 Mar 2015
Status Pending Ready to Commit
avatar infograf768 infograf768 - change - 25 Mar 2015
Category Multilanguage
avatar infograf768
infograf768 - comment - 25 Mar 2015

@richard67
As we first check for home pages, even if someone has associated home pages, the first check takes care of it for alternate links and does not take into account the association, preventing a double alternate.

Thanks for testing.
2 good test. Setting RTC.

avatar wilsonge wilsonge - reference | ad82cd7 - 25 Mar 15
avatar wilsonge wilsonge - merge - 25 Mar 2015
avatar wilsonge wilsonge - close - 25 Mar 2015
avatar wilsonge wilsonge - change - 25 Mar 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-03-25 10:33:07
avatar wilsonge wilsonge - close - 25 Mar 2015
avatar infograf768 infograf768 - head_ref_deleted - 25 Mar 2015
avatar zero-24 zero-24 - alter_testresult - 29 Mar 2015 - jvstratum: Tested successfully

Add a Comment

Login with GitHub to post a comment