list filter show only one element when Filter Columns is 3 or more- in backend and frontend-

mahmoodee

Member
Hello ,
I have joomla 3.8.3 and last update from github for both Fabrik and Fabrik-Joomla-alt-layouts.
I have a fabrik list with three filter dropdown elements (city , state, type)
In list setting (filter tab) , if I set Filter Columns to 1 or 2 , it show (city , state, type) correct .
but if I set Filter Columns to 3 or more , it show only the first filter element (city) and not show (state, type) .
this problem in both backend list and frontent list , and in default joomla template and in my helix template.
please help , thank you
 
If you have any PHP programming skills, your best bet might be to look at the Fabrik code on Github (most likely in /components/com_fabrik/models/list.php) and see if you can work out why it is not working.

Alternatively, please turn on Fabrik debugging, append ?fabrikdebug=1 or &fabrikdebug=1 to the URL and post here whatever is produced in the fabrik debug relating to filters.
 
Issue confirmed.
You should turn Joomla's error reporting to max to get error messages and notices.

It's the grid flipping function in libraries\fabrik\fabrik\Helpers\ArrayHelper.php
which is not working if cols >= filter array

For 3 filters and columns = 3 you'll get
Notice: Undefined offset: 3 in C:\xampp56\htdocs\jo38\libraries\fabrik\fabrik\Helpers\ArrayHelper.php on line 529
Notice: Undefined offset: 6 in C:\xampp56\htdocs\jo38\libraries\fabrik\fabrik\Helpers\ArrayHelper.php on line 529
Something like
if ($cols >= count($array)) return array_chunk($array, $cols);
is missing.

This new filter block is replacing the old filter HTML table(s) but is not displaying very well anyway.
 
Issue confirmed.
You should turn Joomla's error reporting to max to get error messages and notices.

It's the grid flipping function in libraries\fabrik\fabrik\Helpers\ArrayHelper.php
which is not working if cols >= filter array

For 3 filters and columns = 3 you'll get

Something like
if ($cols >= count($array)) return array_chunk($array, $cols);
is missing.

This new filter block is replacing the old filter HTML table(s) but is not displaying very well anyway.
thank you ,
Yes , I get this message
Notice: Undefined offset: 3 in C:\xampp\htdocs\work\turkeyestate\libraries\fabrik\fabrik\Helpers\ArrayHelper.php on line 529 Notice: Undefined offset: 6 in C:\xampp\htdocs\work\turkeyestate\libraries\fabrik\fabrik\Helpers\ArrayHelper.php on line 529
How I can solve this problem plaese ?
 
You can try editing the file libraries\fabrik\fabrik\Helpers\ArrayHelper.php and go to the area around line 529 and see where @troester's fix might fit. Try it out, get it to work and then you can edit the file on Github and turn it into a Push Request to fix it in the main Joomla code.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top