?
Related to # 4944
avatar makitso
makitso
7 Aug 2014

Joomla 3.3 with latest language FR language pack. Noticed this error in the apache log:

PHP Warning: Illegal string offset '*' in /var/www/html/we/webtrees.net/plugins/system/languagefilter/languagefilt​er.php on line 535, referer: http://www.webtrees.net/index.php/fr/forum/help-for-ver-1-5-3/29570-admi​n-user-date-registered

avatar makitso makitso - open - 7 Aug 2014
avatar zero-24
zero-24 - comment - 7 Aug 2014

Confirmed see JC Tracker: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=34047&start=0

The var self::$homes contain only the value how much home menus we have see here:

https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_languages/helpers/multilangstatus.php#L21-33

This check was introduced by @infograf768 with: 1672fcd

But i have no clue how this should work.

avatar Bakual
Bakual - comment - 7 Aug 2014

Doesn't look like correct code.
MultilangstatusHelper::getHomes() only returns the count of home menu items.
MultilangstatusHelper::getHomepages() would return the languages, but also not the ids. However it would be easy to add the ids there and use this method.

avatar infograf768
infograf768 - comment - 8 Aug 2014

I can't reproduce the error here.
can you explain your settings: multilanguage on? PHP, etc.

avatar Bakual
Bakual - comment - 8 Aug 2014

I couldn't reproduce it myself, but code is clearly wrong :smile:

The code is only reached if some conditions are met and I'm not sure what they all do. You need to get into this else: https://github.com/joomla/joomla-cms/blob/staging/plugins/system/languagefilter/languagefilter.php#L533

What I gathered is that it only happens when the user logs in and the plugin is set to automatically change the language. I think it's in the case that the language actually has changed due to the user logging in but there isn't a matching associated menu item. Then it should redirect to the language homepage and the plugin tries to find the matching Itemid to create a proper redirect. That fails because self::$homes only contains a number and isn't an array of objects as assumed by the code.

avatar makitso
makitso - comment - 8 Aug 2014

I was able to reproduce the error on my web site www.webtrees.net.

1) I selected the French language
2) Selected the Forum (Kunena) icon.
3) Entered a un/pw and then CR.
This produced the error in the apache log.

PHP version 5.4.31
In the Language Manager, I have two languages; English (UK) and French (fr-FR).

avatar makitso
makitso - comment - 8 Aug 2014

PHP version 5.4.31
No language is selected in the Extension/Install Language (FrenchCA is the only one but not selected)
We use the French Language/Package, version 3.3.3.1 from www.joomla.fr

avatar makitso makitso - close - 8 Aug 2014
avatar makitso
makitso - comment - 8 Aug 2014

Actually, I may have stated that wrong. In the Language Manager, I have two languages; English (UK) and French (fr-FR).

avatar makitso makitso - change - 8 Aug 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-08-08 18:36:15
avatar makitso makitso - close - 8 Aug 2014
avatar brianteeman brianteeman - change - 8 Aug 2014
Title
#30873 Error
#30873 Language Filter Error
avatar Bakual Bakual - reopen - 8 Aug 2014
avatar Bakual
Bakual - comment - 8 Aug 2014

Did you intend to close this one? I'm reopening because I think it's a valid issue.

avatar Bakual Bakual - change - 8 Aug 2014
Status Closed New
avatar Bakual Bakual - reopen - 8 Aug 2014
avatar brianteeman
brianteeman - comment - 14 Aug 2014

I updated the title to make it clearer
You may blame the J!Tracker Application for transmitting this comment.

avatar brianteeman brianteeman - change - 1 Sep 2014
Category Multilanguage
avatar brianteeman brianteeman - change - 11 Sep 2014
Status New Confirmed
avatar infograf768
infograf768 - comment - 28 Oct 2014

Tested when associations is off and I confirm the Warning.

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

avatar infograf768
infograf768 - comment - 28 Oct 2014

Please test

#4944

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

avatar infograf768 infograf768 - change - 28 Oct 2014
Status Confirmed Pending
avatar zero-24 zero-24 - close - 28 Oct 2014
avatar brianteeman brianteeman - change - 28 Oct 2014
Status Pending Closed
Rel_Number 4944
Relation Type Related to
avatar jissues-bot
jissues-bot - comment - 28 Oct 2014
avatar jissues-bot jissues-bot - close - 28 Oct 2014
avatar jissues-bot jissues-bot - change - 28 Oct 2014
Closed_Date 2014-08-08 18:36:15 2014-10-28 09:44:21
avatar zero-24 zero-24 - change - 7 Jul 2015
Labels Added: ?

Add a Comment

Login with GitHub to post a comment