Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advanced search produces an error #500

Closed
EricdeWaal opened this issue Nov 6, 2022 · 7 comments
Closed

Advanced search produces an error #500

EricdeWaal opened this issue Nov 6, 2022 · 7 comments
Assignees

Comments

@EricdeWaal
Copy link

To Reproduce
Use the Advanced Search on a list; try to filter on
Name > Contains > a
or Name > ends with > c
or Name > notEmpty
etc

Expected behavior
The list is filtered on names

Actual behavior
Error: array_key_exists(): Argument #2 ($array) must be of type array, null given

Screenshots

Additional context

@skurvish
Copy link
Collaborator

skurvish commented Nov 6, 2022

Can you enable maximum debug and provide the call stack please?

@EricdeWaal
Copy link
Author

With max debug, an extra error appeared at the top of the screen:
Deprecated
: mb_strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in
/usr/www/users/prachta/dtc/libraries/vendor/joomla/string/src/phputf8/mbstring/core.php
on line
114

Below the Page not found screen the same error:
0 array_key_exists(): Argument #2 ($array) must be of type array, null given

Call stack

| Function | Location

1 | () | JROOT/components/com_fabrik/models/element.php:8248
2 | PlgFabrik_Element->swapValuesForLabels() | JROOT/plugins/fabrik_element/calc/calc.php:99
3 | PlgFabrik_ElementCalc->_getV() | JROOT/plugins/fabrik_element/calc/calc.php:197
4 | PlgFabrik_ElementCalc->getValue() | JROOT/plugins/fabrik_element/calc/calc.php:369
5 | PlgFabrik_ElementCalc->render() | JROOT/components/com_fabrik/models/element.php:2549
6 | PlgFabrik_Element->getROElement() | JROOT/components/com_fabrik/models/element.php:4236
7 | PlgFabrik_Element->getFilterRO() | JROOT/components/com_fabrik/models/list.php:5788
8 | FabrikFEModelList->getFilterArray() | JROOT/components/com_fabrik/models/list.php:729
9 | FabrikFEModelList->render() | JROOT/components/com_fabrik/views/list/view.base.php:437
10 | FabrikViewListBase->display() | JROOT/components/com_fabrik/views/list/view.html.php:44
11 | FabrikViewList->display() | JROOT/libraries/src/Cache/Controller/ViewController.php:102
12 | Joomla\CMS\Cache\Controller\ViewController->get() | JROOT/components/com_fabrik/controllers/list.php:114
13 | FabrikControllerList->display() | JROOT/components/com_fabrik/controllers/list.php:186
14 | FabrikControllerList->filter() | JROOT/libraries/src/MVC/Controller/BaseController.php:672
15 | Joomla\CMS\MVC\Controller\BaseController->execute() | JROOT/components/com_fabrik/fabrik.php:191
16 | require_once() | JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
17 | Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher{closure}() | JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73
18 | Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() | JROOT/libraries/src/Component/ComponentHelper.php:355
19 | Joomla\CMS\Component\ComponentHelper::renderComponent() | JROOT/libraries/src/Application/SiteApplication.php:200
20 | Joomla\CMS\Application\SiteApplication->dispatch() | JROOT/libraries/src/Application/SiteApplication.php:241
21 | Joomla\CMS\Application\SiteApplication->doExecute() | JROOT/libraries/src/Application/CMSApplication.php:294
22 | Joomla\CMS\Application\CMSApplication->execute() | JROOT/includes/app.php:61
23 | require_once() | JROOT/index.php:32

@skurvish
Copy link
Collaborator

skurvish commented Nov 7, 2022

I see what the problem is with the array_key_exists. The value produced by the calc element is null. I need to determine the best way to solve this.

@skurvish skurvish self-assigned this Nov 7, 2022
@EricdeWaal
Copy link
Author

Hi Alex,

As far as I can see this was not solved, or did I miss it?

@skurvish
Copy link
Collaborator

Not yet, on my list.

@skurvish
Copy link
Collaborator

@EricdeWaal would you unzip the attached into your joomla root and test for me. It is working now on my site with this change.
calc.zip

@EricdeWaal
Copy link
Author

@skurvish Yes, I can confirm this works.
Closing it now.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants