Error when saving new product with images and missing required custom fields
4 months 3 weeks ago #372235
by senioriz
Joomla & Hikashop Dev - JoomlaMax.com
Error when saving new product with images and missing required custom fields was created by senioriz
-- 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:
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 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:
Code:
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
Please Log in or Create an account to join the conversation.
4 months 3 weeks ago #372238
by nicolas
Replied by nicolas on topic Error when saving new product with images and missing required custom fields
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.
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.084 seconds