lcollong
FabriKant d'applications web
Hi,
I have several Fabrik's cron tasks. The fabrik_log table contains several of these :
2,DateTime::__construct(): Failed to parse time string (SOMETHING) at position 0 (S): The timezone could not be found in the database,/home/xxxxxxx/www/libraries/fabrik/fabrik/Helpers/Worker.php,1989
I thought it was one of my scripts. But the line 1989 belong to a function "isDate" which try to check if a string is a valid date one.
It seems that users are doing interactive list search and, sometimes, while the cron script is running in background at the same time. Thus triggering the error message which, apparantly, has nothing to see with my scripts.
However I'm wondering why the search stuff is trying to check if "SOMETHING" is a valid date. I guess users are using the global list search feature which try to verify if the search string is a valid date to compare to some dateTime columns ? But the selected fields on which search should check against do not include any dateTime elt....
I've added a trace instruction in the catch part of the isDate function and here is what I catch :
So questions are : why do we check "isDate" ? Shouldn't we purge the message queue somewhere to avoid to catch the unwanted message in the cron task ?
I have several Fabrik's cron tasks. The fabrik_log table contains several of these :
2,DateTime::__construct(): Failed to parse time string (SOMETHING) at position 0 (S): The timezone could not be found in the database,/home/xxxxxxx/www/libraries/fabrik/fabrik/Helpers/Worker.php,1989
I thought it was one of my scripts. But the line 1989 belong to a function "isDate" which try to check if a string is a valid date one.
It seems that users are doing interactive list search and, sometimes, while the cron script is running in background at the same time. Thus triggering the error message which, apparantly, has nothing to see with my scripts.
However I'm wondering why the search stuff is trying to check if "SOMETHING" is a valid date. I guess users are using the global list search feature which try to verify if the search string is a valid date to compare to some dateTime columns ? But the selected fields on which search should check against do not include any dateTime elt....
I've added a trace instruction in the catch part of the isDate function and here is what I catch :
Code:
APCHEA !! --> #0 /home/xxxxxx/www/libraries/fabrik/fabrik/Helpers/Worker.php(1989): DateTime->__construct('SOMETHING') #1 /home/xxxxxx/www/plugins/fabrik_element/date/date.php(1147): Fabrik\Helpers\Worker::isDate('SOMETHING') #2 /home/xxxxxxx/www/components/com_fabrik/models/listfilter.php(632): PlgFabrik_ElementDate->includeInSearchAll(false, 'SOMETHING') #3 /home/xxxxxxxxx/www/components/com_fabrik/models/listfilter.php(365): FabrikFEModelListfilter->insertSearchAllIntoFilters(Array, 'SOMETHING') #4 /home/xxxxxxx/www/components/com_fabrik/models/listfilter.php(177): FabrikFEModelListfilter->getSearchAllFilters(Array) #5 /home/xxxxxxxx/www/components/com_fabrik/models/list.php(825): FabrikFEModelListfilter->getFilters() #6 /home/xxxxxxxx/www/components/com_fabrik/controllers/list.php(160): FabrikFEModelList->getRequestData() #7 /home/xxxxxxx/www/libraries/src/MVC/Controller/BaseController.php(710): FabrikControllerList->filter() #8 /home/xxxxxxxx/www/components/com_fabrik/fabrik.php(181): Joomla\CMS\MVC\Controller\BaseController->execute('filter') #9 /home/xxxxxxxx/www/libraries/src/Component/ComponentHelper.php(381): require_once('/home/xxxxxx...') #10 /home/xxxxxxx/www/libraries/src/Component/ComponentHelper.php(356): Joomla\CMS\Component\ComponentHelper::executeComponent('/home/xxxxxxx...') #11 /home/xxxxxxx/www/libraries/src/Application/SiteApplication.php(194): Joomla\CMS\Component\ComponentHelper::renderComponent('com_fabrik') #12 /home/xxxxxxxx/www/libraries/src/Application/SiteApplication.php(233): Joomla\CMS\Application\SiteApplication->dispatch() #13 /home/xxxxxxx/www/libraries/src/Application/CMSApplication.php(267): Joomla\CMS\Application\SiteApplication->doExecute() #14 /home/xxxxxxx/www/index.php(49): Joomla\CMS\Application\CMSApplication->execute() #15 {main}
So questions are : why do we check "isDate" ? Shouldn't we purge the message queue somewhere to avoid to catch the unwanted message in the cron task ?