User tests: Successful: Unsuccessful:
Pull Request for Issue #30343.
In short: When using a custom field of type calendar in an article and changing the category of said article, the time is changed of the custom field.
In long: When a site/user has a different timezone than UTC and has a custom field of type calendar for his articles and then, when editing such an article, changes its category, the page reloads and processes the data on that reload. In theory the filtered data should be stored to the session and we have according code in FormController around line 950. However that code only checks the first level of the $data array. Custom fields however are in a subarray, which lets this fail.
IMPORTANT: THIS ONLY FIXES THIS FOR THE FIRST LEVEL OF THE SUBARRAY! That means, when you have a form that has a fields tag inside a fields tag inside a fields tag, this issue still exists. I don't know yet how to solve this properly! Help is welcome here.
This is the fix for 3.10, but this issue is most likely also present in 4.0! For 4.0 I would actually expect the field to handle this directly, since right now this is hardcoded to the core Calendar field and thus means third party calendar fields or other fields with similar data handling have to become a lot more creative.
The time (and maybe even the date) changes by the offset to UTC.
The time and date stay the same.
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Labels |
Added:
?
|
Will take this in here as workaround for 3.10 thanks!
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-01-23 15:39:28 |
Closed_By | ⇒ | zero-24 |
I have tested this item✅ successfully on f45e54f
Tested successfully in 3.10.5-dev using PHP 8.0.13.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36327.