[Replied] Warning: Invalid argument CBTxt.php on line 469 after update to 2.0.4?!

9 years 4 months ago - 9 years 4 months ago #254485 by g4t
Hello,

I just updated from CB 2.0.3 to 2.0.4 on my joomla 2.5.27, but suddenly appears this error:

Warning: Invalid argument supplied for foreach() in /libraries/CBLib/CBLib/Language/CBTxt.php on line 469

What can I do?

Thanks!

Please Log in to join the conversation.

9 years 4 months ago - 9 years 4 months ago #254489 by beat
Looks like it could be a regression!

Please try replacing line 466 (just above):
			$mainLanguage	=	'default_language';

to:
			$mainLanguage	=	'en_GB';

and please quickly report back if that fixes your case.

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

9 years 4 months ago #254552 by beat

g4t wrote: Hello,

I just updated from CB 2.0.3 to 2.0.4 on my joomla 2.5.27, but suddenly appears this error:

Warning: Invalid argument supplied for foreach() in /libraries/CBLib/CBLib/Language/CBTxt.php on line 469

What can I do?

Thanks!


After second look, that warning comes when you have a CB 1.9 language plugin installed (which has zero effect in front-end as languages have been redone) on CB 2.0.

Please uninstall your CB 1.9 language plugin and install a CB 2.0 language plugin instead.
www.joomlapolis.com/cb-solutions/languages
E.g. for Dutch: forge.joomlapolis.com/projects/lan-cb-nl/files

Created a bug tracker item #4930 for that, which should be resolved in one of next nightlies.

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info
The following user(s) said Thank You: nant

Please Log in to join the conversation.

9 years 4 months ago #254633 by pjharley
I had this same issue after upgrading to 2.0.4.
I followed Beat's suggestion to edit the CBTTxt.php but the problem got worse. More lines of errors were displayed so I set it back.
I then uninstalled de_DE v1.9 and installed German language plug-in v2.x... problem still there, so I downloaded and installed the en_GB v2.x language plugin and the error went away.
Unfortunately all my language customizations for my CB fields are now gone.
I have a backup but it would be great to know what, if any, way to add language customizations without risking losing them.
It would be great to have the option to create a customlanguage.php for each language plugin that can be called if it exists.
Or is there already a better way. I used the documentation solution before but this clearly doesn't stop the customizations from being overwritten and lost.

Please Log in to join the conversation.

9 years 4 months ago #254634 by nant

pjharley wrote: I had this same issue after upgrading to 2.0.4.
I followed Beat's suggestion to edit the CBTTxt.php but the problem got worse. More lines of errors were displayed so I set it back.
I then uninstalled de_DE v1.9 and installed German language plug-in v2.x... problem still there, so I downloaded and installed the en_GB v2.x language plugin and the error went away.
Unfortunately all my language customizations for my CB fields are now gone.
I have a backup but it would be great to know what, if any, way to add language customizations without risking losing them.
It would be great to have the option to create a customlanguage.php for each language plugin that can be called if it exists.
Or is there already a better way. I used the documentation solution before but this clearly doesn't stop the customizations from being overwritten and lost.


Try this approach for language overrides:
www.joomlapolis.com/forum/6-news-and-publicity/227556-cb-language-override-video-tutorial-resources

Please Log in to join the conversation.

9 years 4 months ago #254642 by pjharley
Perfect, thanks Nick, this is exactly what I needed.

Thanks for the helpful video too.
The following user(s) said Thank You: nant

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.223 seconds

Facebook Twitter LinkedIn