?
avatar sanek4life
sanek4life
13 Feb 2020

Steps to reproduce the issue

  1. Create any article and choose the language - All. Save and close the article.
  2. Go to this article and choose the language - English. Save and close the article.
  3. Go back to the article and click on the Associations button. Write an article in Russian language. Save the article in Russian by clicking on the Save Target button.
  4. Close the articles and you will see what is in the screenshot:

Expected result

Created Date Must Be Created

Actual result

Created Date not created

изображение

изображение

System information (as much as possible)

Joomla 3.9.15, PHP 7.2.26, MySQL 5.5.64

Additional comments

Before I turned on the multilingualism option on my website, I did not have a similar problem and a Created Date was always created for each article. Now this is not happening. I have a problem, because I made in the settings the display of materials in categories by Created Date. But since there is no Created Date, new articles appear at the very bottom of the list.

avatar sanek4life sanek4life - open - 13 Feb 2020
avatar joomla-cms-bot joomla-cms-bot - change - 13 Feb 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 13 Feb 2020
avatar sanek4life sanek4life - change - 13 Feb 2020
Title
[Created Date] is not created for categories that were created using the [multilingual] option
[Created Date] is not created for articles that were created using the [multilingual] option
avatar sanek4life sanek4life - edited - 13 Feb 2020
avatar richard67
richard67 - comment - 13 Feb 2020

@infograf768 Can you replicate this?

@sanek4life Could you switch on error reporting to maximum in Global Configuration, section "Site", for a short test, and then again create an article in English and save it, and check your PHP error log (if you have error log into a log file enabled in your PHP settings) or on your screen (if you have display errors on in PHP settings)?

avatar richard67
richard67 - comment - 13 Feb 2020

@sanek4life And could you check in database if the created date is set there? Table name is #__content (replace #__ by your database prefix), column name is created.

avatar infograf768
infograf768 - comment - 14 Feb 2020

I cannot replicate this.

  1. When using the association created when editing an article, then associations tab and create article. No problem at all here.

Screen Shot 2020-02-14 at 07 49 29

  1. No problem either when article created via the multilingual associations component

Screen Shot 2020-02-14 at 07 52 48

J 3.9.16-dev. PHP 7.3.1

avatar sanek4life
sanek4life - comment - 14 Feb 2020

I cannot replicate this.

I was able to repeat my actions on a test site on a local server.

@infograf768 @richard67 I did not write a complete procedure in my first post.

Here is the complete procedure:

  1. Create any article and choose the language - All. Save and close the article.
  2. Go to this article and choose the language - English. Save and close the article.
  3. Go back to the article and click on the Associations button. Write an article in Russian language. Save the article in Russian by clicking on the Save Target button.
  4. Close the articles and you will see what is in the screenshot:

изображение

Created Date not created

изображение

I created a lot of articles on my website before turning on the multilingual option, so all the articles had a language - All. Then I turned on the multilingualism option and set the language to Russian for all previously created articles. After that I started to create articles in English and field Created Date is not created.

avatar sanek4life
sanek4life - comment - 14 Feb 2020

@richard67 @infograf768 I was able to repeat this problem on my local server (Joomla! 3.9.15, PHP 7.3.9, MySQL 5.5.5-10.3.13-MariaDB-log) and on my VPS (Joomla 3.9.15, PHP 7.2.26, MySQL 5.5.64). I think that anyone can repeat this problem if he does everything on the points that I wrote. Perhaps if you do it in another way, then there will be no problem, but if you do it exactly as I wrote, then this problem exists.

avatar sanek4life sanek4life - change - 14 Feb 2020
The description was changed
avatar sanek4life sanek4life - edited - 14 Feb 2020
avatar infograf768
infograf768 - comment - 14 Feb 2020

No problem here.
created

avatar sanek4life
sanek4life - comment - 14 Feb 2020

No problem here.
created

I looked carefully and saw that you missed one important step in this problem.

You immediately selected the desired language for the article English and then immediately saved it.

изображение

  1. You need to select the language - All and then click Save and Close. You will see that the date has been created. (it works for me, there is no problem)

THE MOST IMPORTANT THING:
Save the article with the language - All. Next step - Close the article.
Then go back to the article.

  1. The next step is to go to the same article and choose English language. Save this article and then create an article (click on button - Associations) in another language - Russian (for example). After that, go out - click Closed and understand that the Created Date is not displayed. (this problem appears after changing the language for an article that had a language of - All)
avatar sanek4life
sanek4life - comment - 14 Feb 2020

No problem here.
created

I repeated your actions and I have no problem. I see a field - Created Date for both articles.

And now you repeat my actions and you will see the problem that I wrote about.

avatar sanek4life
sanek4life - comment - 14 Feb 2020

@infograf768 This issue only appears for articles that were originally saved without language. Only for articles in which the language was selected in the field - All.

This problem does not exist if the article was originally created with a certain language (for example, English). Joomla did not always have the option of multilingualism and many did not change the meaning in the language field when they made articles on the website, many have a value in this field - All (as language).

изображение

avatar sanek4life
sanek4life - comment - 14 Feb 2020

@richard67 This problem only if the article was saved with the language - All. If the article was saved with any language (for example, English), then I do not see this problem.

avatar sanek4life
sanek4life - comment - 14 Feb 2020

This problem is absolutely for all articles that have been saved with the language - All.

For example:

  1. You saved 2 articles on the site and forgot to specify the language (both articles were saved with language - All).
  2. After that, you go into one article and specify the language - English.
  3. Then go to another article and specify the language - Russian.
  4. After that, you combine these articles through Associations, and you see that field Created Date does not show the date.

I don’t know why such an error occurs, but it happens absolutely for every article that was originally saved with the language - All.

@richard67 @infograf768 @Bakual @zikkuratvk @b2z @Septdir You can confirm this, I know.

avatar infograf768
infograf768 - comment - 15 Feb 2020

I still can't reproduce, whatever the method used to associate the items: Associations tab select, Redirect to com_associations via the the Associations button, or directly in com_associations.
Screen Shot 2020-02-15 at 07 09 34
Screen Shot 2020-02-15 at 07 10 35

avatar sanek4life
sanek4life - comment - 15 Feb 2020

I still can't reproduce, whatever the method used to associate the items: Associations tab select, Redirect to com_associations via the the Associations button, or directly in com_associations.
Screen Shot 2020-02-15 at 07 09 34
Screen Shot 2020-02-15 at 07 10 35

@richard67 @infograf768 You are right, this error does not happen when you use the Control Panel in English, I checked it and the error does not occur with the Created Date.

But then I checked my actions when using the control panel in Russian and this error happens.

I recorded a video on how to get this error with a Created Date. In the first half of the video, I showed how this error happens with the Created Date if you use the Control Panel in Russian and in the second part of the video I showed that this error does not happen if you use the Control Panel in English.

I don’t know why this error happens, it is connected with language files, translation or something else, but this error occurs for all websites that use Russian in the Control Panel.

https://www.youtube.com/watch?v=hD8-71d050A

You can also see this error if you install Russian (Русский) and enter the Control Panel using the Russian language, repeating my actions from this video.

@zikkuratvk @b2z @Septdir Russian community, help me. I know you can also confirm this error with Created Date.

avatar richard67
richard67 - comment - 15 Feb 2020

@infograf768 Could it be a problem with the date format specified in the Russian language pack's manifest file? Maybe that is special somehow and so causes an erro in our code which is not caused when using other formats? Just an idea.

avatar richard67
richard67 - comment - 15 Feb 2020

@sanek4life Be patient, don't panic ... I will test in Russian soon. We don't think you are wrong, we only try to reproduce the problem and nobody of us is perfect, so maybe we ask a few questions to much or a 2nd or 3rd time. We are all trying to help, it just is not easy to reproduce things sometimes. The more we find out, the better we can find the error. Good to know that it could be related to a particular language.

Thanks for reporting the issue and being responsive, answering our questions, making screen shots and videos and providing all that information. This is really a help for us. We have other people who just post an issue and then disappear. So your activity is really appreciated.

avatar sanek4life
sanek4life - comment - 15 Feb 2020

@richard67 Thanks for the answer! I took screenshots using English in Control Panel so that you can understand. But I used the Control Panel in Russian all this time. I did not even know that this problem does not exist if I use the English version of the Control Panel.

I recorded a video so that you can click on the Russian buttons to reproduce this problem. I just realized today that this problem does not exist for the English version, when I wanted to make a video and went into the Control Panel in English and saw that this problem did not exist. Then I decided to go into the Control Panel in Russian and saw that this problem is specific to the Russian language.

I now began to actively use the option for multilingualism, the first time I saw some flaws. I hope @joomla will be better and better for multilingual websites.

avatar sanek4life
sanek4life - comment - 15 Feb 2020

@richard67 I will soon start translating 5,000 articles on my website, so this error is very critical for me. I want to start translating articles on my website using the multilingual function and not have such errors. It is very difficult when you have 5000 articles and you need to work hard every day and see these problems every day. And my website has more than 200 categories, more than 600 tags. I translate all this into another language.

avatar richard67
richard67 - comment - 15 Feb 2020

@sanek4life The funny thing is that my own website is J 3.9.15 multilingual with 3 languages, German, English and Russian (even if I don't speak Russian, but I had some readers from such Russian speaking countries). But of course I am using the backend not in Russian ;-)

avatar Bakual
Bakual - comment - 15 Feb 2020

Could it be a problem with the date format specified in the Russian language pack's

That's an interesting point
The relevant english language strings are:

DATE_FORMAT_CALENDAR_DATE="%Y-%m-%d"
DATE_FORMAT_CALENDAR_DATETIME="%Y-%m-%d %H:%M:%S"
DATE_FORMAT_FILTER_DATE="Y-m-d"
DATE_FORMAT_FILTER_DATETIME="Y-m-d H:i:s"

in russian they look like this:

DATE_FORMAT_CALENDAR_DATE="%d-%m-%Y"
DATE_FORMAT_CALENDAR_DATETIME="%d-%m-%Y %H:%M:%S"
DATE_FORMAT_FILTER_DATE="d.m.Y"
DATE_FORMAT_FILTER_DATETIME="d-m-Y H:i:s"

For background, the calendar one has to match the filter one. They are just written in different code formats. The one for the datetime looks like it should work, but the one which only holds the date certainly doesn't work as one uses "-" and the other ".".

avatar richard67
richard67 - comment - 15 Feb 2020

@sanek4life What is the correct date separator in Russian? A dot "." like in German? Or an hyphen "-" like in English?

avatar sanek4life
sanek4life - comment - 15 Feb 2020

@sanek4life What is the correct date separator in Russian? A dot "." like in German? Or an hyphen "-" like in English?

In Russia, the date is usually indicated as follows: 15 сентября 2020 (15.09.2020)

In the USA, it looks like this: September 15, 2020 (09/15/2020)

avatar richard67
richard67 - comment - 15 Feb 2020

@Bakual I think the filter is the problem. You found it. Filter has to fit to format.

avatar sanek4life
sanek4life - comment - 15 Feb 2020

@Bakual I think the filter is the problem. You found it. Filter has to fit to format.

Then perhaps this is a problem not only for the Russian language. Then this problem is for any language when the date format is different?

avatar richard67
richard67 - comment - 15 Feb 2020

@sanek4life No, It is not a problem with different format, it is only not consistently formatted for display and filtered on validation, and so it becomes filtered out.

So for Russian, files ru-RU.ini in admin and frontend it should be:

DATE_FORMAT_CALENDAR_DATE="%d.%m.%Y"
DATE_FORMAT_CALENDAR_DATETIME="%d.%m.%Y %H:%M:%S"
DATE_FORMAT_FILTER_DATE="d.m.Y"
DATE_FORMAT_FILTER_DATETIME="d.m.Y H:i:s"

It's like in Germany by the way ;-)

Could you change your ru-RU.ini files in that way and then do the sequence of processing again from the beginning, i.e. have an article in language all, save it, then change language to russian, save it and so on? Then report back the result.

avatar richard67
richard67 - comment - 15 Feb 2020

@Bakual Maybe in addition to that we have the problem that we don't reinitialize the calendar field in edit views when someone changes language of the edited item?

avatar sanek4life
sanek4life - comment - 15 Feb 2020

@sanek4life No, It is not a problem with different format, it is only not consistently formatted for display and filtered on validation, and so it becomes filtered out.

So for Russian, files ru-RU.ini in admin and frontend it should be:

DATE_FORMAT_CALENDAR_DATE="%d.%m.%Y"
DATE_FORMAT_CALENDAR_DATETIME="%d.%m.%Y %H:%M:%S"
DATE_FORMAT_FILTER_DATE="d.m.Y"
DATE_FORMAT_FILTER_DATETIME="d.m.Y H:i:s"

It's like in Germany by the way ;-)

Could you change your ru-RU.ini files in that way and then do the sequence of processing again from the beginning, i.e. have an article in language all, save it, then change language to russian, save it and so on? Then report back the result.

I replaced the value as you wrote:

изображение

After I created an article with a language - All. And then I changed the language to Russian - I received a field without a Created Date:

изображение

avatar richard67
richard67 - comment - 15 Feb 2020

Ok, so we still have the issue.

avatar richard67 richard67 - change - 15 Feb 2020
Status New Confirmed
avatar richard67
richard67 - comment - 15 Feb 2020

I can confirm the issue with a copy of my multilingual private website.

When using the backend in Russian language and proceeding as described in section "Steps to reproduce the issue" of this issue's description, the created date is empty for the English article. In database it is '0000-00-00 00:00:00'.

Same when using the backend in German language and proceeding as described, replacing "Russian" with "German" language.

Setting status to "Confirmed".


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

avatar richard67
richard67 - comment - 15 Feb 2020

Be patient. Will see if I can find the reason and make a fix. But it may take a day or 2.

avatar richard67
richard67 - comment - 15 Feb 2020

Maybe @Bakual or @infograf768 can help ?

avatar Bakual
Bakual - comment - 15 Feb 2020

Can't reproduce it when backend in German.

The created date for new articles (no ID set yet) is set automatically in the table, if no value is given from the fromfield. See

if ($this->id)
{
// Existing item
$this->modified_by = $user->get('id');
}
else
{
// New article. An article created and created_by field can be set by the user,
// so we don't touch either of these if they are set.
if (!(int) $this->created)
{
$this->created = $date->toSql();
}
if (empty($this->created_by))
{
$this->created_by = $user->get('id');
}
}

So imho it would be interesting what value there is for you. For me, I get no value at all from the association forms, so it falls back to current date there.

avatar richard67
richard67 - comment - 15 Feb 2020

@Bakual The problems seems to happen if later going to the multilanguage assiciations comparison view and create a new article in German language to be associated to the previously changed English article. It seems not to happen in the "normal" article edit view of com_content.

avatar Bakual
Bakual - comment - 15 Feb 2020

That's what I tried. I associated an article once with the article manager by clicking the create button in the association tab and once for the other language from the association manager. Both ways did deliver an empty "created" value and then the above code in the table populated the field as expected.

avatar richard67
richard67 - comment - 15 Feb 2020

Ok, will try later.

avatar sanek4life
sanek4life - comment - 15 Feb 2020

That's what I tried. I associated an article once with the article manager by clicking the create button in the association tab and once for the other language from the association manager. Both ways did deliver an empty "created" value and then the above code in the table populated the field as expected.

https://www.youtube.com/watch?v=hD8-71d050A

Try to take exactly the same steps as I did in this video (the first half of the video, where I use Russian language in the Control Panel) and then you will see how this error occurs with the Created Date.

if you do it differently from the video, then you won’t see the Created Date error. THIS IS BIG MEANING.

avatar richard67
richard67 - comment - 15 Feb 2020

@Bakual Maybe the difference between your and my installation could be following:
In my installation, the German language has lang_id=1 in my #__languages table in database, and the English language has lang_id=2. This has historic reasons on my site: Long time ago I had started with a German installation package. Normally you install and then have en-GB with lang_id=1 and other languages with lang_ids greater than that. Could you check how IDs are in your #__languages table? @sanek4life Could you check that, too?

avatar sanek4life
sanek4life - comment - 15 Feb 2020

@Bakual Maybe the difference between your and my installation could be following:
In my installation, the German language has lang_id=1 in my #__languages table in database, and the English language has lang_id=2. This has historic reasons on my site: Long time ago I had started with a German installation package. Normally you install and then have en-GB with lang_id=1 and other languages with lang_ids greater than that. Could you check how IDs are in your #__languages table? @sanek4life Could you check that, too?

I think it doesn’t matter what number the language has. English was the first installed language on my website and Russian was the second installed language.

@Bakual simply did not correctly reproduce the actions that I wrote about (I even think he didn’t see the video that I recorded), so he did not see this error with the Created Date. This is an inattention to details, because this error does not always appear, but only with a certain sequence of actions.

изображение

avatar infograf768
infograf768 - comment - 15 Feb 2020

Just tested again, this time with Russian language. I can confirm the issue in certain conditions.

A. Admin language set to Russian
What happened here is that the reference article first set to All and then to Russian (and saved) had a Created date BEFORE being displayed as reference in the side by side in com_associations.
I.e the process made it lose its created date which was reflected in the db by a 0000-00-00 00:00:00

When using the Associations tab and creating the article, no problem.
If the reference article is tagged to English, and later on being associated via com_associations to a new Russian article, no problem at all.

Tested changing the date format and using the French ones. Same issue

B. Admin language set to English
No problem at all both for English and Russian article.

I have no idea why this happens.

avatar infograf768
infograf768 - comment - 15 Feb 2020

Screenshot of Russian Refernce article in side by side when admin language set to Russian.
Before even choosing a target and creating an associated article.

Screen Shot 2020-02-15 at 18 22 36

avatar infograf768
infograf768 - comment - 15 Feb 2020

ALSO.
It does not matter here if the article is first tagged to ALL and then modified to Russian.
The problem also appears when the article is originally created in Russian.
The only date which remains in the db is for "checked out time"

avatar Bakual
Bakual - comment - 15 Feb 2020

The problem is just that Associations button in the article edit form
image

If you that one to go to the Associations Manager, then it kills the date for the source article. That happens in German and Russian, not in English backend. The language of the article doesn't matter at all.

If you do the association in the article editor itself or when you manually go to the Associations Manager and open the article there, then it doesn't happen.

Now to find out what that button does. Now that I can reproduce it and narrowed it down to a specific button, I'm sure I can track down the rest.

avatar Bakual
Bakual - comment - 15 Feb 2020

Please test #27941

I'm closing this issue since we have a PR.

avatar Bakual Bakual - change - 15 Feb 2020
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2020-02-15 19:56:22
Closed_By Bakual
avatar Bakual Bakual - close - 15 Feb 2020

Add a Comment

Login with GitHub to post a comment