date filter issue with php 8

Hello,

When I set the PHP version of the site to 8.1, and filter the list by date (range), I get the following error message:

Error 0 stripslashes(): Argument #1 ($string) must be of type string, array given

Does anyone encounter the same issue?

Joomla version is 3.10.11, and Fabrik 3.10
 
Can you enable Joomla System Debug and post the error stack?

Running php8 you should update from GitHub before going on.
Fabrik3.10 is not php8 ready
 
Last edited:
Thank you for your reply and sorry for my late return.

I have already updated it from Github. I have set the Joomla debug and below are the error messages I get

Deprecated: Joomla\Input\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home/accademi/public_html/j4/libraries/vendor/joomla/input/src/Input.php on line 41

Deprecated: Return type of Joomla\Input\Input::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/accademi/public_html/j4/libraries/vendor/joomla/input/src/Input.php on line 170

Deprecated: Joomla\CMS\Input\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home/accademi/public_html/j4/libraries/src/Input/Input.php on line 31

Warning: session_name(): Session name cannot be changed after headers have already been sent in /home/accademi/public_html/j4/libraries/joomla/session/handler/native.php on line 128

Deprecated: Joomla\CMS\Input\Cookie implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home/accademi/public_html/j4/libraries/src/Input/Cookie.php on line 21

Warning: session_cache_limiter(): Session cache limiter cannot be changed after headers have already been sent in /home/accademi/public_html/j4/libraries/joomla/session/handler/native.php on line 235
Error: Failed to start application: Failed to start the session because headers have already been sent by "/home/accademi/public_html/j4/libraries/vendor/joomla/input/src/Input.php" at line 41.
 
Hello,

When I enable Joomla System Debug, I have no error. The filter works well. Which part of the Joomla Debug Console report would you like to see?

upload_2023-1-4_17-58-23.png
 
If you get
Error 0 stripslashes(): Argument #1 ($string) must be of type string, array given
with J! system debug enabled it should give you an error stack in addition to this error.

Something like (I just added a typo to force an error)
upload_2023-1-7_17-45-17.png

Strange, if you say the error doesn't show up with system debug on.
 
Thank you for your reply.

Below is the report I get when I enable both J! System Debug and Fabrik Debug. However, when I refresh the browser, the requested data is displayed without error. I also notice that when I refresh the browser, the date range displays as follows: 10/01/2023 00:00:00 - 11/01/2023 00:00:00 - It also displays in English and then in Italian.

upload_2023-1-9_18-6-46.png
0 stripslashes(): Argument #1 ($string) must be of type string, array given
/home/accademi/public_html/components/com_fabrik/models/element.php:3658
Call stack
#
Function Location
1 () JROOT/components/com_fabrik/models/element.php:3658
2 stripslashes() JROOT/components/com_fabrik/models/element.php:3658
3 PlgFabrik_Element->autoCompleteFilter() JROOT/components/com_fabrik/models/element.php:3435
4 PlgFabrik_Element->getFilter() JROOT/components/com_fabrik/models/list-advanced-search.php:126
5 FabrikFEModelAdvancedSearch->getAdvancedSearchElementList() JROOT/components/com_fabrik/models/list-advanced-search.php:72
6 FabrikFEModelAdvancedSearch->opts() JROOT/components/com_fabrik/models/list.php:6695
7 FabrikFEModelList->makeFilters() JROOT/components/com_fabrik/models/list.php:6647
8 FabrikFEModelList->getFilters() JROOT/components/com_fabrik/models/list.php:7246
9 FabrikFEModelList->actionHeading() JROOT/components/com_fabrik/models/list.php:7122
10 FabrikFEModelList->getHeadings() JROOT/components/com_fabrik/views/list/view.base.php:597
11 FabrikViewListBase->display() JROOT/components/com_fabrik/views/list/view.html.php:41
12 FabrikViewList->display() JROOT/components/com_fabrik/controllers/list.php:99
13 FabrikControllerList->display() JROOT/components/com_fabrik/controllers/list.php:181
14 FabrikControllerList->filter() JROOT/libraries/src/MVC/Controller/BaseController.php:702
15 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/components/com_fabrik/fabrik.php:181
16 require_once() JROOT/libraries/src/Component/ComponentHelper.php:402
17 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377
18 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:194
19 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:233
20 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:225
21 Joomla\CMS\Application\CMSApplication->execute() JROOT/index.php:49

upload_2023-1-9_17-55-39.png
upload_2023-1-9_17-56-11.png
 
Last edited:
You are not running the current code. The stripslashes call is not at that line in beta2b. Please install the most current beta and report back.
 
beta2b is Fabrik4/Joomla4.

This is Fabrik3.1/J!3 forum, what do you need exactly?

https://fabrikar.com/forums/index.php?threads/fabrik4-beta4-now-available-for-downloading.53573/

Thank you for your reply.
Currently, my issue is not concerning Fabrik 4 for Joomla 4 but Fabrik 3 with PHP 8. I get the following error message when I try to filter a list by date (range)
0 stripslashes(): Argument #1 ($string) must be of type string, array given
/home/accademi/public_html/components/com_fabrik/models/element.php:3658
 
The error is in autoCompleteFilter()

Do you have an other filter element set to "auto-complete"?
Is this in Advanced Search?

Is your date element a date or jdate plugin?
 
I have four other filter elements set to "auto-complete".
  • two are time plugins
  • one is an internal id plugin
  • one a database join plugin to the user table.
That is not an Advanced Search. The date element is a date plugin. I couldn't use the jdate plugin as this list is an old list.
 
I tried to replicate but didn't get an error.

Is any of these elements in a repeat group or is the dbjoin checkbox/multiselect?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top