Requesting changes in how multi-language content works

  • Eric vanBok
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 months 2 weeks ago #164170 by Eric vanBok
Hello.

I am finding that multi-language content in Events Booking is cumbersome in regards to one thing.  That is the date/time formats on the Translation tab of the Configuration and adding new languages to a live website.

If you decide to add a new language to Joomla, a corresponding option in the Translation tab is added for that new language.  However the date/time format codes for that new language is blank.  You would assume that if those are blank, that the date/time formats on the General tab would be used.  That isn't the case.

What happens is if you leave those fields blank and you have any pages with the Events Booking Upcoming Events module on it, those pages break.  They break with an error similar to "1054 Unknown column 'tbl.title_es' in 'where clause'".  The details of the error will change based on the the new language you just added.

Of course this is easily fixed after adding a new language by going to the Events Booking Configuration and the Translation tab and entering in the needed date/time format codes.  However within the time you added the language and make those edits any pages showing the Upcoming Events module are broken.  You can also work around this by unpublishing all Upcoming Events modules, installing the new language, adding the needed date/time formats on the Translation tab, and publishing the Upcoming Events modules.  However in doing so you are taking away functionality on the website, even temporarily, just to add a new language within Joomla.  

None of these are great solutions, just workarounds.  The fundamental issue is how this works within Events Booking.  The proper solution is to change the behavior so that if there are date/time formats missing in the Translation tab that the ones entered in the General tab are used.  That fixes everything.  Nothing breaks and nothing needs to be disabled to just install a new language pack in Joomla.  Then you can adjust the date/time format codes for that new language at your leisure.

My hope is that bringing this up will bring about a proper solution.  Does anyone else have this issue as well?

Please Log in or Create an account to join the conversation.

More
2 months 2 weeks ago #164179 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Requesting changes in how multi-language content works
Hi Eric

That's strange to me. By looking at the code, if the format in translation is blank, it will use the format from default language

So if you have away to show me the issue, I'm happy to check and get the issue sorted

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • Eric vanBok
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 months 2 weeks ago #164201 by Eric vanBok
OK.  This is interesting.  

Given that you said it is supposed to work the way I said, I went to my staging area and cleared the date/time formats for each language in the Translation tab, saved the configuration and checked the website.  It worked.  So you are indeed right if the fields on the Translation tab are empty, they are pulling the date/time format codes from the General tab.

So I set out to recreate the issue I was having and was able to.

It only occurs if you install a new language, and then activate it in the Content Languages page.  If you do that the pages with any Events Booking content breaks.  This includes pages with upcoming events modules, registrations pages, and things like a calendar page.

If I then go into Events Booking and do nothing but save the configuration, everything then works as it should with leaving the fields in the Translation tab empty.  So there is some issue with the install of a new language that requires a save of the Events Booking configuration to fix.

I have the broken website in the staging area ready and will open a ticket with the login information so that you can take a look at it.

Please Log in or Create an account to join the conversation.

More
2 months 2 weeks ago #164210 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Requesting changes in how multi-language content works
OK. Thanks Eric. Maybe you can send me screenshot which shows the error so that I can understand exactly what's the error here ?

Tuan

Please Log in or Create an account to join the conversation.

  • Eric vanBok
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 months 2 weeks ago #164211 by Eric vanBok
Here is a screenshot of the error.  In the screenshot you can see I also have debugging turned on.
I will also post this to the ticket i have open.
Attachments:

Please Log in or Create an account to join the conversation.

More
2 months 2 weeks ago #164212 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Requesting changes in how multi-language content works
Hi Eric

When you install new language like that, please access to Events Booking extension from backend (any page, not necessary to be configuration page) to have the database schema adjusted to support new language

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • Eric vanBok
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 months 2 weeks ago #164214 by Eric vanBok
I just tried that and it works. However that is no different than accessing the configuration and saving it. The reality is that adding a new language breaks the website until as you said "the database schema is adjusted to support the new language". I don't see why it should work this way. Adding a language should not break anything on the website. Why doesn't Events Booking just adjust like all other apps do?

Please also look at the ticket I created (134665). It outlines another issue with Events Booking in that it will not support more than 7 active languages. You get a DB error then and can't even open the Events Booking configuration until you disable languages to get back to 7 active languages. This is very limiting and should also be looked at.

Please Log in or Create an account to join the conversation.

More
2 months 2 weeks ago #164216 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Requesting changes in how multi-language content works
It causes by the way Events Booking database schema designed to support multilingual. It is not something which could be addressed in a backward compatible way. I know it's the limitation, but this is something I could not change because it will break sites which has override code uses in the extension

Tuan

Please Log in or Create an account to join the conversation.

  • Eric vanBok
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 months 2 weeks ago #164218 by Eric vanBok
What is the limitation you are talking about. That when you add a language that you must access Events Booking on the backend to update the database schema? Or that there is a limit to the number of languages that you can support?

Please clarify.

Please Log in or Create an account to join the conversation.

More
2 months 2 weeks ago - 2 months 2 weeks ago #164219 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Requesting changes in how multi-language content works
Hi Eric

Both of the limitations above. While the first one could be addressed by adding the follow code to the end of file administrator/components/com_eventbooking/libraries/rad/bootstrap.php :

Code:
if (Joomla\CMS\Language\Multilanguage::isEnabled() && !EventbookingHelper::isSynchronized()) { EventbookingHelper::callOverridableHelperMethod('Helper', 'setupMultilingual'); }

However, that will make these extra lines of code need to be executed on every page Events Booking is loaded, so it will cost performance (but it is not a big think)

For the second issue (error when there are too many languages), it will requires change on some part of Events Booking code, and could cause unexpected behavior on the site which has overridden Events Booking code, and something I could not make the change (at least for the time being)

Regards,

Tuan[/code]
Last edit: 2 months 2 weeks ago by Tuan Pham Ngoc.

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc