Warning and notice even when no debbug

creanet

New Member
Hi,
I had this warning :
Warning: count(): Parameter must be an array or an object that implements Countable in /home/toursinnei/www/components/com_fabrik/models/element.php on line 4352
I update from github just in case but now I have still the warning plus this notice :
Notice: Array to string conversion in /home/toursinnei/www/components/com_fabrik/views/list/view.base.php on line 71
Joomla! and Fabrik debug is off but I still got the message.
exemple : https://tours-in-normandy.fr/fr/cir...-seine-entre-le-havre-et-rouen-normandie.html at the bottom of the page.
Thx for your help
 
It seems there's still a spot which needs to be updated for php7.2
Do you have custom query strings definded in your list's CSV settings?

You should not see these warnings/notices with Joomla's error reporting off.
 
No I don't have custom query in my list's CSV sttings.
But I call a layout from another template with this code :
{fabrik view=list id=5 fk_voyages___id[value]=<?php echo $voyage_id->value;?> fk_voyages___id[condition]=&lt;&gt; fk_voyages___category[value]=<?php echo $voyage_cat;?> fk_voyages___category[condition]=IN fk_voyages___status=1 limit=4 resetfilters=1 clearfilters=1 layout=related-voyages}
Maybe that's the reason why I see the messages even whith Joomla's error reporting off.
 
Hi, I change my PHP version to php 7.1. The warning for the count() is gone but I still have the Notice: Array to string conversion in /home/toursinnei/www/components/com_fabrik/views/list/view.base.php on line 71
when I add
var_dump($val);
var_dump($key);
after the line 71, I have :
Notice: Array to string conversion in /home/toursinnei/www/components/com_fabrik/views/list/view.base.php on line 71
array(2) { ["value"]=> string(2) "11" ["condition"]=> string(2) "<>" } string(15) "fk_voyages___id"
Notice: Array to string conversion in /home/toursinnei/www/components/com_fabrik/views/list/view.base.php on line 71
array(2) { ["value"]=> string(7) "Circuit" ["condition"]=> string(2) "IN" } string(21) "fk_voyages___category" string(1) "1" string(19) "fk_voyages___status"
wich correspond to the filter on the call to the other template :
{fabrik view=list id=5 fk_voyages___id[value]=<?php echo $voyage_id->value;?> fk_voyages___id[condition]=&lt;&gt; fk_voyages___category[value]=<?php echo $voyage_cat;?> fk_voyages___category[condition]=IN fk_voyages___status=1 limit=4 resetfilters=1 clearfilters=1 layout=related-voyages}
What did I do wrong ?
Thx for your help
 
Hi,
No, in components/com_fabrik/views/details/tmpl i have a bunch of custom template. In one of the php files there is a call to another with this request :
{fabrik view=list id=5 fk_voyages___id[value]=<?php echo $voyage_id->value;?> fk_voyages___id[condition]=&lt;&gt; fk_voyages___category[value]=<?php echo $voyage_cat;?> fk_voyages___category[condition]=IN fk_voyages___status=1 limit=4 resetfilters=1 clearfilters=1 layout=related-voyages}

In $voyage_id->value and $voyage_cat->value I have strings but with the var_dump I see that it's not just the value that is taken, it's an array with the value and the condition.

Thx for your help
 
Issue confirmed:
In
protected function csvJS
it seems it can only handle simple filters like table___element=foo.

No idea why it is running this on all list displays (even if csv export is disabled).

The list itself is filtered correctly and also (filtered) csv export is working.

But with Joomla error reporting set to "simple"or "none" the notice won't show.
 
Ah, I think I might be able to remove that entire chunk of code. That was an early attempt at fixing filtering in CSV output, which I don't think is needed any more.

I'll test it now.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top