User tests: Successful: Unsuccessful:
Pull Request for Issue #24202
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)
Create a new Field Group. No more error after patch
Create a new Field. Look at the created date field.
Both field groups and fields are created fine.
For fields the created date is now using calendar.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_fields |
Restore unset
filter and readonly
property please. These dates should not be modifiable by user.
Why?
We do not do that in 3.x
Right, that is fine for created date. But not for modified date. Modified date should always be auto generated.
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.
@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.
@bahl24
Please test this patch and mark your test OK in https://issues.joomla.org/tracker/joomla-cms/24234
I have tested this item
I have tested this item
readonly
only provides client-side protection, I think. I was able to save a new group with custom modified date.
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.
Labels |
Added:
?
|
@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:
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.
Closing as this needs a new PR
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-04-01 08:45:42 |
Closed_By | ⇒ | infograf768 |
Note: replaces #24215