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

  • Posts: 9
  • Thank you received: 8
2 hours 39 minutes 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.

Time to create page: 0.057 seconds
Powered by Kunena Forum