CB may have a language switching bug in Joomla 4

10 months 5 days ago - 10 months 1 day ago #332586 by 4creator
Hi there,

I'm currently testing CB with Joomla 4. Since my site is an English/Japanese multilingual site, I have installed the ja-JP plugin.

I use FaLang for my multilingual site and I use its FaLang language switcher to switch languages. Also, the default language of my site is Japanese. When the site language is switched to English by the language switcher, only CB remains in Japanese.

There was no such issue in Joomla 3, so I'm guessing that CB has a bug in Joomla 4. In Joomla 4, when I go to System > Manage: Languages and set the default language to English, CB is displayed in English.

Could you please check if CB has any issues switching languages in Joomla 4?

Thanks

My test environment:
- Joomla 4.2.6
- Community Builder 2.8.0
- FaLang 4.8
- PHP 8.0.27

 [P.S.] 
CB has a database collation of latin1_swedish_ci during installation. However, with this, when I enter Japanese and save it, it becomes ????? and I cannot save it normally. So I changed latin1_swedish_ci to utf8mb4_unicode_ci via phpMyAdmin.

Please Log in to join the conversation.

10 months 4 days ago #332588 by krileon
Does it work fine using Joomla's built in language switcher module? CB only loads whatever language Joomla tells us to load using Joomla's own API to request the loaded language.

CB has a database collation of latin1_swedish_ci during installation. However, with this, when I enter Japanese and save it, it becomes ????? and I cannot save it normally. So I changed latin1_swedish_ci to utf8mb4_unicode_ci via phpMyAdmin.

We don't set the collation. The default collation for your database is wrong. Suggest fixing your database default collation to prevent this for newly created tables.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

10 months 4 days ago - 10 months 4 days ago #332594 by 4creator
Hi krileon,

Thank you for your reply.

If I were in your position, I would focus on the point that the issues I raised are ONLY in CB.
I have over 15 years experience with Joomla and have worked with multilingual sites for many years. FaLang obviously provides a language switcher on par with Joomla. Also note that Joomla 3 has no problems with CB language switching.

By the way, the Server connection collation is set to utf8mb4_unicode_ci in the General settings of our phpMyAdmin.

Thanks

Please Log in to join the conversation.

10 months 3 days ago #332606 by krileon
Was able to confirm something is not working right with Joomla's language API. We're calling the below to get the currently loaded language. This API has always worked fine, but in Joomla 4 it is only ever returning the sites default language. This seams like a regression bug in Joomla.
JFactory::getApplication()->getLanguage()->getTag()

forge.joomlapolis.com/issues/9118

By the way, the Server connection collation is set to utf8mb4_unicode_ci in the General settings of our phpMyAdmin.


phpMyAdmin default and actual database default often are not configured the same. phpMyAdmin default will apply to tables created in phpMyAdmin. Your database default will be in your database configuration file. Regardless will review forcing a default collation in a future CB release.

forge.joomlapolis.com/issues/9117


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

10 months 3 days ago #332607 by krileon
Found the cause. Something was loading CBs language files before Joomla language switcher set the language into the document. In my case it was Kunena's CB plugin loading CB extremely early. Am implementing a fix for next build release to avoid the loader cache from preventing loading in future languages.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

10 months 3 days ago #332608 by krileon
This is now fixed in latest CB build release.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: 4creator

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.243 seconds

Facebook Twitter LinkedIn