? Success
Referenced as Related to: # 4079

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
28 Oct 2014

Create a multilanguage site.
Set the languagefilter to
1. Items Associations: No
2. Use Automatic Language Change: Yes
3. Set a frontend registered user to use a specific language in frontend
4. Display the site in another language
5. Login with the user

before patch you will get (see #4079 ) "PHP Warning: Illegal string offset '*' etc.)

Patch and test again

avatar infograf768 infograf768 - open - 28 Oct 2014
avatar jissues-bot jissues-bot - change - 28 Oct 2014
Labels Added: ?
avatar brianteeman brianteeman - change - 28 Oct 2014
Category Multilanguage
avatar joomdonation
joomdonation - comment - 28 Oct 2014

Thanks JM. From a quick look at the code, I think we can improve the code alitle (in the file plugins/system/languagefilter/languagefilter.php). I think we don't have to definine new property $homepages of PlgSystemLanguageFilter class, just use the old $homes property would be enough. Actually, in PlgSystemLanguageFilter, I think we only need to change one line of code:

From

self::$homes        = MultilangstatusHelper::getHomes();

To

self::$homes         = MultilangstatusHelper::getHomepages();

and it should work well. No need for other changes like you did in the PR (I might be wrong, will test and review the code carefully when I got home)

avatar fontanil
fontanil - comment - 28 Oct 2014

Test on 3.3.6 : "PHP warning" in PHP error log file.
Cleaning PHP error log, patch, test: no more error in log file.
Thanks.

avatar infograf768
infograf768 - comment - 28 Oct 2014

@joomdonation
You are right. Will update

avatar joomdonation
joomdonation - comment - 28 Oct 2014

Thanks JM :).

avatar infograf768
infograf768 - comment - 28 Oct 2014

One more test to commit

avatar joomdonation
joomdonation - comment - 28 Oct 2014

@test: OK

Before patch, there are warning in error logs like this

[Tue Oct 28 19:12:28.602154 2014] [:error] [pid 1852:tid 916] [client ::1:60257] PHP Warning: Illegal string offset '*' in E:\www\testinstallation\plugins\system\languagefilter\languagefilter.php on line 535, referer: http://localhost/testinstallation/index.php/fr/
[Tue Oct 28 19:12:28.602154 2014] [:error] [pid 1852:tid 916] [client ::1:60257] PHP Notice: Trying to get property of non-object in E:\www\testinstallation\plugins\system\languagefilter\languagefilter.php on line 535, referer: http://localhost/testinstallation/index.php/fr/

After path, no warnings anymore.

avatar infograf768 infograf768 - close - 29 Oct 2014
avatar infograf768 infograf768 - change - 29 Oct 2014
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2014-10-29 06:14:06
avatar infograf768
infograf768 - comment - 29 Oct 2014

Thanks for testing.

avatar infograf768
infograf768 - comment - 29 Oct 2014

Also ported to 2.5.x

avatar Markezzz
Markezzz - comment - 4 Dec 2014

Hello all,

after the small fix i get this notices on my site:

Notice: Undefined index: language in /plugins/system/languagefilter/languagefilter.php on line 506

Notice: Undefined property: stdClass::$id in /plugins/system/languagefilter/languagefilter.php on line 535

After i log me in, the site redirect me to the english site and not back to my german site.

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

avatar infograf768
infograf768 - comment - 4 Dec 2014

@Markezzz
2.5 or staging?

avatar Markezzz
Markezzz - comment - 4 Dec 2014

We use at the moment Joomla! 3.3.6 Stable.

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

avatar infograf768
infograf768 - comment - 4 Dec 2014

You should never patch only partly a former version.
Please test locally with your database on staging, as there were other changes too.
https://github.com/joomla/joomla-cms/archive/staging.zip

Add a Comment

Login with GitHub to post a comment