? Pending

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
18 Mar 2019

Pull Request for Issue #24202

Summary of Changes

Correcting error when creating a new fieldgroup
Error Save failed with the following error: Incorrect datetime value: '' for column 'modified' at row 1

Normalize date fields for Field groups and Fields to use calendar and therefore allow translate format and user_utc, jalali date, etc. , on the model of 3.x
Corrected missing code in GroupTable.php (which created the original error)

Testing Instructions

Create a new Field Group. No more error after patch
Create a new Field. Look at the created date field.

Expected result

Both field groups and fields are created fine.
For fields the created date is now using calendar.
Screen Shot 2019-03-18 at 17 44 01

@bahl24
@SharkyKZ
@nitesh-solanki

avatar infograf768 infograf768 - open - 18 Mar 2019
avatar infograf768 infograf768 - change - 18 Mar 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 Mar 2019
Category Administration com_fields
avatar infograf768
infograf768 - comment - 18 Mar 2019

Note: replaces #24215

avatar SharkyKZ
SharkyKZ - comment - 18 Mar 2019

Restore unset filter and readonly property please. These dates should not be modifiable by user.

avatar infograf768
infograf768 - comment - 18 Mar 2019

Why?
We do not do that in 3.x

avatar SharkyKZ
SharkyKZ - comment - 19 Mar 2019

Right, that is fine for created date. But not for modified date. Modified date should always be auto generated.

avatar infograf768
infograf768 - comment - 19 Mar 2019

I am confused.
All similar "modified" fields are set with filter="user_utc" in core.
They also are set as readonly in this patch (as elsewhere) which makes them impossible to modify. They are auto generated OK like that.

avatar bahl24
bahl24 - comment - 19 Mar 2019

@infograf768 Yes, you are right. I was facing the same issue in #24215 . The value being passed is '' which is not NULL or datetime, therefore default value is not being used.

avatar infograf768
infograf768 - comment - 19 Mar 2019

@bahl24
Please test this patch and mark your test OK in https://issues.joomla.org/tracker/joomla-cms/24234

avatar bahl24
bahl24 - comment - 19 Mar 2019

I have tested this item successfully on 7396aee


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

avatar bahl24
bahl24 - comment - 19 Mar 2019

I have tested this item successfully on 7396aee


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

avatar bahl24 bahl24 - test_item - 19 Mar 2019 - Tested successfully
avatar SharkyKZ
SharkyKZ - comment - 19 Mar 2019

readonly only provides client-side protection, I think. I was able to save a new group with custom modified date.

avatar infograf768
infograf768 - comment - 19 Mar 2019

readonly only provides client-side protection, I think. I was able to save a new group with custom modified date.

How did you do that?
If you are right, then ALL occurences of modified or modified_time fields should be changed in core.
This is out of this PR scope.

avatar infograf768 infograf768 - change - 19 Mar 2019
Labels Added: ?
avatar Quy
Quy - comment - 29 Mar 2019

I don't get the error message assuming due to the merge of PR #21901.

avatar infograf768
infograf768 - comment - 1 Apr 2019

@Quy
Indeed solved for the error but still true for the xmls.
If the xmls are not modified we do not get the translateformat
In French we have for example:
Screen Shot 2019-04-01 at 10 40 40

Where the calendar field type exists for the Creation date but not for the Modified date, therefore displaying there the default sql (english format) date.

Will create a new PR just for that.

avatar infograf768
infograf768 - comment - 1 Apr 2019

Closing as this needs a new PR

avatar infograf768 infograf768 - change - 1 Apr 2019
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2019-04-01 08:45:42
Closed_By infograf768
avatar infograf768 infograf768 - close - 1 Apr 2019

Add a Comment

Login with GitHub to post a comment