Ajax upload not working on Joomla 4 / PHP 8

  • Posts: 507
  • Thank you received: 21
  • Hikashop Business
2 years 2 months ago #344547

-- HikaShop version -- : 4.6.1
-- Joomla version -- : 4.2.2
-- PHP version -- : 8.0
-- Browser(s) name and version -- : chrome

Hi,

We planned the upgrade for our livesite to Joomla 4 / PHP 8.0.

On the testsite I found a smal bug with the Ajax upload field. On PHP 8 it doesn't add the order to the shoppingbasket. With PHP 7.4 it's working fine. Tried both Ivee template as the default Cassiopeia.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 2 months ago #344588

Hi,

I'm not able to reproduce the issue nor on my end nor on your website.
Are you able to reproduce the issue on the link you provided ? Or maybe you switched back to PHP 7.4 ?

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

  • Posts: 507
  • Thank you received: 21
  • Hikashop Business
2 years 2 months ago #344632

Hi,

Yes, just tested again on 3 different computers/Mac/iPhone, same issue. Don't know if I provided the right testlink:

herinneringsbord.nl/naambord-wit-aluminium-met-eigen-foto-1

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 2 months ago #344638

Hi,

Thank you for the URL. I had tried another product and didn't had the problem there but I do see it on this link.
And I even got the error message when looking at the AJAX request for the add to cart:
i.imgur.com/D5rsX2r.png
Change the line:

$oldfiles = explode('|',$oldvalue);
to:
if(is_string($oldvalue))
						$oldfiles = explode('|',$oldvalue);
					else
						$oldfiles = $oldvalue;
in the file administrator/components/com_hikashop/classes/field.php and it will fix the problem.

We'll add the patch on our end too.

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

  • Posts: 507
  • Thank you received: 21
  • Hikashop Business
2 years 2 months ago #344659

Hi,

Thanks Nicolas, that indeed solved the problem.

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

Time to create page: 0.060 seconds
Powered by Kunena Forum