No Code Attached Yet
avatar jweaver0312
jweaver0312
17 Aug 2021

Steps to reproduce the issue

Create article from front end while defining time stamps

Expected result

Article should be created with no issues

Actual result

Creation fails with error:

If difficulties persist, please contact the website administrator and report the error below.

0 DateTime::__construct(): Failed to parse time string (08-17-2021 16:30:00) at position 0 (0): Unexpected character

Creates a corrupted document that can be only be removed/altered from the database itself

System information (as much as possible)

Joomla 4.0 on DirectAdmin server running CloudLinux

Additional comments

This was out of a clean install

Looks to be a failure in localization and dating. The frontend is formatting time data as mm-dd-yyyy hh:mm:ss while the backend is formatting as yyyy-mm-dd hh:mm:ss. Frontend is taking localization right but not the backend, which is causing the issue.

This bug did not exist in 3.9.x nor 3.10.0

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar jweaver0312 jweaver0312 - open - 17 Aug 2021
avatar jweaver0312 jweaver0312 - change - 17 Aug 2021
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 17 Aug 2021
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 17 Aug 2021
avatar jweaver0312
jweaver0312 - comment - 17 Aug 2021

All backend written articles along with the properties are fine.


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

avatar jweaver0312
jweaver0312 - comment - 17 Aug 2021

The main cause seems to be because of that time format mismatch between frontend and backend. From my localization, I would rather have the mm:dd:yyyy hh:mm:ss format altogether as opposed to the backend format.


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

avatar brianteeman
brianteeman - comment - 17 Aug 2021

What language?

avatar jweaver0312
jweaver0312 - comment - 17 Aug 2021

English US


From: Brian Teeman @.>
Sent: Tuesday, August 17, 2021 5:03 PM
To: joomla/joomla-cms @.
>
Cc: jweaver0312 @.>; Author @.>
Subject: Re: [joomla/joomla-cms] [4.0] Cannot Create Articles from Frontend (#35204)

What language?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub#35204 (comment), or unsubscribehttps://github.com/notifications/unsubscribe-auth/AECIKFSHIUDBENIFIUEMFPTT5LFBXANCNFSM5CKURBNA.
Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.

avatar brianteeman
brianteeman - comment - 17 Aug 2021

and are you using the english us language pack

avatar jweaver0312
jweaver0312 - comment - 17 Aug 2021

Yes, and I have it set as default


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

avatar brianteeman
brianteeman - comment - 17 Aug 2021

just to confirm. This was a clean install of Joomla that you then installed the en-US language pack for

avatar jweaver0312
jweaver0312 - comment - 17 Aug 2021

Initially it was an upgrade from 3.10 to 4 (that shared the issue upon upgrade) but then I did a clean install just to eliminate most of the variables


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

avatar PhilETaylor
PhilETaylor - comment - 17 Aug 2021

Please turn on debug mode and do the same, this time the error will have a stack trace (list of files and line numbers) please post that here.

avatar PhilETaylor
PhilETaylor - comment - 17 Aug 2021

This lang pack has other issues too :( #35205

Screenshot 2021-08-17 at 22 47 35

avatar jweaver0312
jweaver0312 - comment - 17 Aug 2021
avatar PhilETaylor
PhilETaylor - comment - 17 Aug 2021

Confirmed.

Screenshot 2021-08-17 at 22 52 52

avatar jweaver0312
jweaver0312 - comment - 17 Aug 2021

Updated Link: Trace


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

avatar jweaver0312
jweaver0312 - comment - 17 Aug 2021

I noticed that other issue too. If I leave it to English GB (Bascially the main workaround for now), it works fine.


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

avatar brianteeman
brianteeman - comment - 17 Aug 2021

So this is confirmed as a language pack bug and not a joomla bug?

avatar jweaver0312
jweaver0312 - comment - 17 Aug 2021

@brianteeman that is what it appears to be (main workaround is to leave it at English GB)


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

avatar PhilETaylor
PhilETaylor - comment - 17 Aug 2021

So this is confirmed as a language pack bug and not a joomla bug

No this is a Joomla bug. The Calendar field should be able to convert the user input back to SQL yyyy-mm-dd for saving.

avatar PhilETaylor
PhilETaylor - comment - 17 Aug 2021

ok lets try this one #35208

avatar particthistle
particthistle - comment - 17 Aug 2021
  • en-GB error may have been in core string.
  • en-AU and en-US were then a copy at that specific point in time.
  • At the time I translated them, the date string did not have the code highlighting on it to indicate to translators "Don't change this one"

en-AU and en-US 4.0.0.4 versions uploaded.

New packs will fix #35204 #35205 #35208

avatar jweaver0312
jweaver0312 - comment - 18 Aug 2021

Updated to 4.0.0.4 en-US pack and it has not been fixed. Same failed to parse time string message.


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

avatar jweaver0312
jweaver0312 - comment - 18 Aug 2021

@particthistle saw your notes you wrote in #35205 that for now the date formatting stays as is (assuming that's because it might need to come from a core update)


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

avatar PhilETaylor
PhilETaylor - comment - 18 Aug 2021

New packs will fix #35204 #35205 #35208

These will only be fixed if the US changes their DATE_FORMAT_CALENDAR_DATETIME to have slashes and then Joomla -by luck - would work. See full explanation here: #35208 (comment)

avatar PhilETaylor
PhilETaylor - comment - 18 Aug 2021

Ive closed my PR. @Fedik or @dgrammatiko will probably fix this in the calendar javascript layer.

avatar jweaver0312
jweaver0312 - comment - 18 Aug 2021

I didn’t understand that all the way, do you mean in the language pack for it to use slashes. Don’t quote me on it but I believe J3 did use slashes in the format in my setup.

Sent from my iPhone

On Aug 18, 2021, at 4:13 AM, Phil E. Taylor @.***> wrote:



New packs will fix #35204#35204 #35205#35205 #35208#35208

These will only be fixed if the US changes their DATE_FORMAT_CALENDAR_DATETIME to have slashes and then Joomla -by luck - would work. See full explanation here: #35208 (comment)#35208 (comment)


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub#35204 (comment), or unsubscribehttps://github.com/notifications/unsubscribe-auth/AECIKFT572AJJDDQY7QYADTT5NTRXANCNFSM5CKURBNA.
Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.

avatar Fedik
Fedik - comment - 18 Aug 2021

please test this one #35222

avatar Fedik
Fedik - comment - 18 Aug 2021

@PhilETaylor you was very close :)
it is PHP side

avatar richard67 richard67 - change - 18 Aug 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-08-18 20:05:22
Closed_By richard67
avatar richard67 richard67 - close - 18 Aug 2021
avatar richard67
richard67 - comment - 18 Aug 2021

Closing as having a pull request. Please test #35222 . Thanks in advance.

Add a Comment

Login with GitHub to post a comment