-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Saving article throws an error when trying to change the Start and Finish Publishing dates on a multilingual site #40364
Comments
@FlorianGeorgiev I think that the error is in the Bulgarian language pack (and possibly also others). The date formats are defined in file The format "DATE_FORMAT_CALENDAR_DATE" has to be consistent with "DATE_FORMAT_FILTER_DATE", and the format "DATE_FORMAT_CALENDAR_DATETIME" has to be consistent with "DATE_FORMAT_FILTER_DATETIME". Consistent means they should have the same order of parts and the same separator. Correct in the en-GB core file:
Correct in the latest German language pack:
Incorrect in the latest Bulgarian language pack:
As you can see, the "DATE_FORMAT_CALENDAR_..." strings use the right Bulgarian format, which is the same as in German by the way, but the "DATE_FORMAT_FILTER_..." strings use the wrong date separators "-". Could you change the "DATE_FORMAT_FILTER_DATE" and "DATE_FORMAT_FILTER_DATETIME" so they are the same as in the German example above, then test if that helped and then report back the result here? If I'm right, then it's not an issue with the CMS core but with the translation, then it should be reported to the Bulgarian translation team coordinator, which can be found here https://downloads.joomla.org/language-packs/translations-joomla4 . |
Wooow, this is just amazing! @richard67, thank you for helping me out. Since we use fullstops for separators of the date elements, I put fullstops. As you can see, they use dashes instead of fullstops. Should I edit them accordingly as well and put fullstops instead of dashes? Thanks in advance. Once we finish here, I'll report it to the coordinator of the Bulgarian language (if there is one). I even could provide the joomla.ini file. Thanks again. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40364. |
@FlorianGeorgiev Yes, those can be changed, too. They are only used for formatting output so not cause such an error like it was with the calendar formats, but they should of course fit to your country. As far as I can see, the only difference between Bulgarian and German is that we use also a dot with the long month names, e.g. "13. Mai", while you do not use the dots in the these formats. And these formats are already correct in the Bulgarian language file, so with my suggested change and the additional change mentioned by you it would be completely ok.
That would be great. You find the coordinator for each language here: https://downloads.joomla.org/language-packs/translations-joomla4 . |
I was talking about /language/bg-BG/joomla.ini Now I found another file with mixed (I think so) date formats. It is /api/language/bg-BG/joomla.ini This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40364. |
Sorry for the multiple replies. p.s. I already found the coordinator and send him a message. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40364. |
@FlorianGeorgiev Yes, the other files might need to be fixed, too. Thanks for notifying the coordinator. I close the issue here because it's not an issue with the CMS core. |
Steps to reproduce the issue
Vanilla J 4.2.9 (i spotted it in 4.3.2 as well).
Install a second language (Bulgarian in my case).
Make the needed steps, so the second language becomes available.
Log on with the second language (Bulgarian).
Make a new article.
Change the Start or Finish Publishing date.
Then try to save the article.
Expected result
The article should be saved.
Actual result
Trying saving it, it throws an error: 0 Call to a member function format() on bool
System information (as much as possible)
Vanilla Joomla 4.2.9.
PHP 8.2
Second Language installed (Bulgarian).
Additional comments
When the date format for a given language is different than the format of the British English (the default) language, trying to change Start or Finish publishing throw an error: 0 Call to a member function format() on bool. I think this comes from the different date formats of the different languages. For British English is YYYY-MM-DD, for Bulgarian is DD.MM.YYYY.
I tried to use the British English date formatting while I'm logged with Bulgarian language, but it still throws an error.
The text was updated successfully, but these errors were encountered: