Issue with Mass Actions with PHP 7.1 and higher

  • Posts: 585
  • Thank you received: 23
  • Hikaserial Subscription Hikashop Multisite
6 years 2 weeks ago #300113

-- 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
Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 2 weeks ago #300135

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.

  • Posts: 585
  • Thank you received: 23
  • Hikaserial Subscription Hikashop Multisite
6 years 2 weeks ago #300142

Kind regards,
Lumiga
Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 2 weeks ago #300151

Hi,

Change the line :

$query->direction = $filter['value'];
to:
$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.

  • Posts: 585
  • Thank you received: 23
  • Hikaserial Subscription Hikashop Multisite
6 years 2 weeks ago #300241

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
Attachments:
Last edit: 6 years 2 weeks ago by Lumiga.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 2 weeks ago #300244

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:

	var $ordering = '';
to:
	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.164 seconds
Powered by Kunena Forum