1. piekielko
  2. RO CSVI
  3. Wednesday, 21 October 2026
  4.  Subscribe via email
Hi,

Importing created_on with a valid date, such as 2026-10-21 18:30:00, fails with parsererror. The issue occurs in administrator/components/com_csvi/helper/importfields.php, in convertDateToUtc():


$offset = $fieldDetails->offset === '' ? $templateOffset : $fieldDetails->offset;


When $fieldDetails has no offset property, this triggers an Undefined property warning and passes null to DateTimeZone, causing date conversion to fail. Warnings printed before the JSON response also cause parsererror. Suggested fix: handle the missing property and provide a default timezone:


$templateOffset = (string) ($this->template->get('offset', '') ?? '');
$templateOffset = $templateOffset === '' ? 'UTC' : $templateOffset;

$fieldOffset = (string) ($fieldDetails->offset ?? '');
$offset = $fieldOffset === '' ? $templateOffset : $fieldOffset;


After applying this fix, the import completes successfully and the date is saved correctly.
Environment reported in the log: RO CSVI 9.13.0, Joomla 6.2.0, PHP 8.5.11.

:)

best,
Chris


There are no replies made for this post yet.
Be one of the first to reply to this post!