Create article from front end while defining time stamps
Article should be created with no issues
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
Joomla 4.0 on DirectAdmin server running CloudLinux
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
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
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.
What language?
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.
and are you using the english us language pack
Yes, and I have it set as default
just to confirm. This was a clean install of Joomla that you then installed the en-US language pack for
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
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.
I noticed that other issue too. If I leave it to English GB (Bascially the main workaround for now), it works fine.
So this is confirmed as a language pack bug and not a joomla bug?
@brianteeman that is what it appears to be (main workaround is to leave it at English GB)
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.
en-AU and en-US 4.0.0.4 versions uploaded.
Updated to 4.0.0.4 en-US pack and it has not been fixed. Same failed to parse time string message.
@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)
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)
Ive closed my PR. @Fedik or @dgrammatiko will probably fix this in the calendar javascript layer.
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.
@PhilETaylor you was very close :)
it is PHP side
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-08-18 20:05:22 |
Closed_By | ⇒ | richard67 |
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.