Impossible to save a product when editing the variant details

  • Posts: 71
  • Thank you received: 5
  • Hikamarket Multivendor Hikashop Business
2 years 11 months ago #332206

-- HikaShop version -- : 4.4.2
-- Joomla version -- : 3.9.26
-- PHP version -- : 7.3.27
-- Browser(s) name and version -- : Firefox developer Edition 88.0b9 (64 bits)
-- Error-message(debug-mod must be tuned on) -- : 404 View not found [name, type, prefix]: product, 1, productView

Hi,
When trying to edit the variant details of a product (quantity, price), it becomes impossible to save the product. Please see the enclosed video.
When I don't touch the variant there's no problem anymore...
Thanks in forward for your help.
Best regards.


Adishatz, erix
www.agerix.fr
Attachments:
Last edit: 2 years 11 months ago by erix.

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
2 years 11 months ago #332208

Hi,

That's strange. I'm not able to reproduce the issue.
First thing strange is that when I edit a variant of a product on my end and click on the save button of the variant, the variant edit interface appears again, while on your video, that interface just closes.
So I'm wondering if maybe you have a javascript error when you do the saving of the variant, which would then result in the main save breaking for some reason.
Can you check your browser's console log while you do all this to see if you have any errors ?
Otherwise, I think we'll need a backend and FTP access to check on the situation directly to understand what's going on.

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

  • Posts: 71
  • Thank you received: 5
  • Hikamarket Multivendor Hikashop Business
2 years 11 months ago #332214

Hey Nicolas,
Thanks for your quick answer. Unfortunately I didn’t notice anything in the JS console even if it’s probably javascript related… I recorded a video to demonstrate that.
It’s even not related to variants, we deleted them all and the problem remains. Something strange happens when an Ajax request is executed on the page before saving…
www.dropbox.com/sh/8jtknyakxzixpzw/AAAWG...HO57AWrU31fQqma?dl=0
We ceated an access for you on our development server. I send you the details in PM.
Best regards.


Adishatz, erix
www.agerix.fr

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
2 years 11 months ago #332232

Hi,

I checked the situation a bit and I think it's linked to some kind of customization on your end.
If you click on the + icon of the prices area, the system will load in AJAX the URL /administrator/index.php?option=com_hikashop&ctrl=product&task=form_price_edit&price_id=0&formkey=price&tmpl=component
You can check the HTML of that URL on your browser and you'll see that there is an extra part added which shouldn't be there usually:
i.imgur.com/kJMwfGL.png
It's the whole div with the id resizeModal which is added to pages called with tmpl=component
For example, I get that extra HTML even on the backend homepage:
i.imgur.com/5sIxPu8.png
And the big problem with that HTML is that it has a hidden input with the name "task" and the value "formats.createPdf" which overrides the hidden input task of the product edit form.

I would recommend to review the code adding that HTML and add some extra condition to run it only on the page where you need it by checking the option / ctrl / task / view / layout parameters of the URL.

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

  • Posts: 71
  • Thank you received: 5
  • Hikamarket Multivendor Hikashop Business
2 years 11 months ago #332261

Very sorry Nicolas it was my mistake indeed. I forgot to reduce the scope of my plugin :( Thus, it was generating a modal containing a form on every page instead of only the orders list view. Problem is now solved, thanks for your help.
Manu.


Adishatz, erix
www.agerix.fr

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
2 years 11 months ago #332262

No worries !

The following user(s) said Thank You: erix

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

Time to create page: 0.066 seconds
Powered by Kunena Forum