DateTime::__construct(): Failed to parse time string (03-31-2021 00:00:00) at position 0

maleman

Member
I am getting this error along with an Apache log error of:
PHP Notice: Trying to access array offset on value of type null in /var/www/html/cmr/permits/administrator/components/com_fabrik/models/fields/collation.php on line 47

This occurs on the list view from the front-end and administrator site and happens when I First filter the list on a date range (that works fine) and then Second click the column heading to sort it by date. Filter works fine by itself and sorting works fine by itself. It only occurs when I do both!

Here are the settings:
MySQL table->permit_date = datetime
Fabrik->element->permit_date ->plugin is jdate
Fabrik->element->permit_date->Formatting&Time->Show Time Selector=no
Fabrik->element->permit_date->Store Date as UTC
Fabrik->element->permit_date->List & Form Format = m-d-Y
Fabrik->element->permit_date->List View Settings->Filter Type->Range
Fabrik->element->permit_date->List View Settings->Filter Type->Exact Match= yes
Fabrik->element->permit_date->List View Settings->Filter Type->Filter Data=Show All

No validations or javascript.

Is the problem because the date being fed to collation.php is NOT in Y-m-d format?

Thanks for your help!
 
I still get this error with today's github version when trying to create a new list on admin
Code:
Notice: Trying to access array offset on value of type null
in /administrator/components/com_fabrik/models/fields/collation.php on line 47
Fabrik 3.10 (trob commit of 9/17/21)
Joomla 3.10.2
PHP Version 7.4.22
5.5.5-10.4.20-MariaDB

Code:
Call Stack
#   Time   Memory   Function   Location
1   0.2126   402432   {main}( )   ...\index.php:0
2   0.2998   6142464   Joomla\CMS\Application\AdministratorApplication->execute( )   ...\index.php:51
3   0.2999   6142520   Joomla\CMS\Application\AdministratorApplication->doExecute( )   ...\CMSApplication.php:225
4   0.3991   14563344   Joomla\CMS\Application\AdministratorApplication->dispatch( )   ...\AdministratorApplication.php:159
5   0.4051   14875808   Joomla\CMS\Component\ComponentHelper::renderComponent( )   ...\AdministratorApplication.php:101
6   0.4067   15111864   Joomla\CMS\Component\ComponentHelper::executeComponent( )   ...\ComponentHelper.php:377
7   0.4069   15142712   require_once( 'C:\xampp\htdocs\businessangels\administrator\components\com_fabrik\fabrik.php' )   ...\ComponentHelper.php:402
8   0.4111   15315720   FabrikAdminController->execute( )   ...\fabrik.php:87
9   0.4111   15315720   FabrikAdminController->display( )   ...\BaseController.php:702
10   0.4111   15315720   FabrikAdminController->display( )   ...\controller.php:39
11   0.4204   16825688   FabrikAdminViewList->display( )   ...\BaseController.php:664
12   0.4204   16825688   FabrikAdminViewList->get( )   ...\view.html.php:64
13   0.4204   16825720   FabrikAdminModelList->getForm( )   ...\HtmlView.php:425
14   0.4204   16826096   FabrikAdminModelList->loadForm( )   ...\list.php:109
15   0.4611   17138120   FabrikAdminModelList->preprocessForm( )   ...\FormModel.php:244
16   0.4675   17467536   JEventDispatcher->trigger( )   ...\FormModel.php:323
17   0.4675   17467992   PlgSystemJce->update( )   ...\dispatcher.php:160
18   0.4675   17467992   PlgSystemJce->onContentPrepareForm( )   ...\event.php:70
19   0.4676   17468152   Joomla\CMS\Form\Form->getFieldset( )   ...\jce.php:157
20   0.5328   18249504   Joomla\CMS\Form\Form->loadField( )   ...\Form.php:359
21   0.5331   18250312   JFormFieldCollation->setup( )   ...\Form.php:1962

You may have a look at this old PR
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top