SAVE Bug When Creating Variants

  • Posts: 284
  • Thank you received: 6
5 years 7 months ago #297055

-- HikaShop version -- : 3.5.1
-- Joomla version -- : 3.8.11
-- Error-message(debug-mod must be tuned on) -- : n/a

I have just added 40 Courses to HikaShop as products and can verify that this bug is repeatable.

Steps:
Create a new product.
Add text to the Description area, etc.
Save the product.
Create a new Characteristic.
Go back into the product and ADD that Characteristic.
Go to the Variants page and add the variants, add cost, etc.

[Now, here is where the bug hits:]
Go back to the product tab again. MAKE ANY CHANGE YOU WANT, like changes to the Description.
HIT SAVE.
When you go back into the product, the VERY LAST changes that you made were NOT saved. Even though you hit Save.

If I did the above, the changes will NOT be saved each and every time. But, go back into the product and make changes, the SAVE works fine. It is only after CREATING a variant the first time that there is an issue.

Variation to the bug that I have seen:
I made several changes and flipped backwards and forwards between the PRODUCT tab and VARIANTS tab before hitting save.
The editor's javascript started freaking out. I am using JCE Pro (latest update).
The editor pallets started floating in the top-left hand corner. Had to hit cancel and go into the product again.
This happened only one time.

Last edit: 5 years 7 months ago by MSTACE.

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
5 years 7 months ago #297064

Hi,

If the issue with the editor happened only once, it could something like some data not being fetched by the editor with the different ajax requests or some issue with the DOM refreshing or even some session or cache issue. It will be hard to reproduce I guess and I think that as a rare issue which would be hard to reproduce.

Now regarding the main issue with the saving of the main data not working properly, could you please provide a screenshot of all the options in both tabs before you hit save and you get the problem so that we could better understand the situation in order to reproduce it ? Also, can you confirm that you have the issue with other things than the description ? Because an issue with the description might be linked to the editor going haywire too. If you have the issue only with the description, could you try with the default editor of Joomla and see how that goes ?

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

  • Posts: 284
  • Thank you received: 6
5 years 7 months ago #297115

The issue seems to only be with making changes to the Description field on the main product tab AFTER adding a Variant.
The only changes to the Variant I am making is: CODE, QUANTITY, PRICE

Yes, this issue is with the JCE Pro editor only.
Setting the default editor to TinyMCE does not produce the problem.

I suspect there is a Javascript conflict somewhere, yet nothing is showing in the console.

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
5 years 7 months ago #297180

Hi,

I was able to reproduce the issue on my end with the free version of JCE. The problem is that JCE doesn't handle properly being initialized a second time on a page. When HikaShop loads the variants edition form, it calls Joomla's editor interface so that the editors can provide their javascript to initiliase the editors. Then, when the browser displays the form, the javascript from the editor is triggered and the editors are initialized.
However, in the case of JCE, the initialize process doesn't handle properly the editors already initialized on the page (the ones from the main product). And because of that, when Joomla calls the editor's javascript code when you click on the save of the main product, it gives back the content from before the variant form was loaded in AJAX.
So it would be good if the init function of JCE could better handle the JCE editors already initialized on the page when it is called.

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

  • Posts: 284
  • Thank you received: 6
5 years 7 months ago #297183

Thank you.

I have posted a Bug Report with the JCE people.

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

  • Posts: 284
  • Thank you received: 6
5 years 7 months ago #297256

The JCE programmers have fixed this issue quickly.
JCE Pro 2.6.33 Beta 3 works with Hikashop and the issue as described does not occur.

JCE said that this fix will be in the next release of JCE Pro.

Thanks again for finding what the issue was so that they could fix it!

Last edit: 5 years 7 months ago by MSTACE.
The following user(s) said Thank You: nicolas

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

Time to create page: 0.064 seconds
Powered by Kunena Forum