Error when saving new product with images and missing required custom fields

  • Posts: 9
  • Thank you received: 8
2 weeks 3 days ago #372235

-- HikaShop version -- : 6.5.0
-- Joomla version -- : 6
-- PHP version -- : 8.3
-- Error-message(debug-mod must be tuned on) -- : An error has occurred.

0 Attempt to assign property "product_id" on int
JROOT/administrator/components/com_hikashop/views/product/tmpl/form_image.php:54

Hello HikaShop Team,

We found a bug when creating a new product in the Joomla administrator.

Issue:
When we add a new product, fill in the product name, add product images, but forget to complete required custom fields, then click Save, the product form breaks and shows a fatal error page.

Steps to reproduce:

1-Go to HikaShop → Products Click New
2-Enter a product name
3-Add one or more product images
4-Leave some required custom fields empty, for example on our website:Year,Make,Vehicle Location
5-Click Save

Actual result:
Instead of returning to the product form with validation messages, Joomla shows this error:

An error has occurred.
0 Attempt to assign property "product_id" on int
JROOT/administrator/components/com_hikashop/views/product/tmpl/form_image.php:54

The page becomes broken after save.

Expected result:
HikaShop should keep the user on the product edit form and show the required-field validation messages only, without triggering a fatal PHP error.

I have attached a screenshot showing the validation messages and the fatal error.

Could you please check this issue and provide a fix or patch?


Joomla & Hikashop Dev - JoomlaMax.com
Attachments:

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

  • Posts: 85796
  • Thank you received: 14089
  • MODERATOR
2 weeks 3 days ago #372238

Hi,

Thank you for your detailed feedback.
I was able to reproduce the issue and fixed it.
The patch is included on our end.
Download the install package of HikaShop on our website and install it on yours in order to get the patch.

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

Time to create page: 0.056 seconds
Powered by Kunena Forum