Skip to main content

Issue with Mass Actions with PHP 7.1 and higher

More
7 years 10 months ago #300113 by Lumiga
-- HikaShop version -- : 4.0.0
-- Joomla version -- : 3.9
-- PHP version -- : 7.2

Hi Hikashop team,

There is a BUG in het Massaction in combination with PHP 7.1 or 7.2
This bug was already there in versionn 3.5.1

When you create this action (especially with the ordering function) then you get an error.


The error is:


Hope you can fix this issue.

Kind regards,
Lumiga

Kind regards,
Lumiga

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #300135 by nicolas
Hi,

Can you please activate the "error reporting" and "debug mode" settings of the Joomla configuration and try again ? That will give you an error with much more information so that we can better understand what is the problem.

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #300142 by Lumiga

Kind regards,
Lumiga

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #300151 by nicolas
Hi,

Change the line :
Code:
$query->direction = $filter['value'];
to:
Code:
$query->direction[] = $filter['value'];
in the file plugins/hikashop/massaction_product/massaction_product.php
and that should fix the problem.

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago - 7 years 10 months ago #300241 by Lumiga
I changad the line and, but it still did not fixed the issue.



Should not the rule 129 be adjusted?



Kind regards,
Lumiga

Kind regards,
Lumiga
Last edit: 7 years 10 months ago by Lumiga.

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #300244 by nicolas
Hi,

No, the lin 129 is correct. $query->direction is supposed to be an array.
The problem is that the function is called and that variable is already not an array.
So it means that something else somewhere set it as a string and it shouldn't. I looked around to try to find the cause and this line 136 was definitely not correct so I thought it might be coming from it.

Change also the line:
Code:
var $ordering = '';
to:
Code:
var $ordering = array();
in the file administrator/components/com_hikashop/classes/massaction.php and that will fix the problem for good.
The following user(s) said Thank You: Lumiga

Please Log in or Create an account to join the conversation.

Time to create page: 0.192 seconds
Powered by Kunena Forum