Author Topic: Products kicked out of category on save  (Read 223 times)

melsonmarketing

  • Beginner
  • *
  • Posts: 43
Products kicked out of category on save
« on: August 30, 2019, 15:30:27 pm »
J! 3.9.11
VM 3.6
Php 7.2.18

Hi everybody I have a problem at https://www.deko-gama.de/

The Shop was on VM 3.4.2 and suddenly the categorypicker in the productview didn't work anymore.

So we thought it was a good idea to update everything. But unfortunately the problem remains.

Opening an existing product the categoryfield is empty though the category is choosen. Saving the product after edition deletes the category-assignment. That means for the moment, that we have to assign products back to their category using "Bulk Associate".

Has anyone had this before and is able to help here?

Thanks in advance
Michael

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9037
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.4.2
Re: Products kicked out of category on save
« Reply #1 on: August 30, 2019, 15:46:13 pm »
If the cat dropdown is empty then u have a problem populating it by ajax

check the JS ajax console for corrupted returned json ( notices etc in the json)  or even that the json is correctly returned .. not an error etc

the product is removed from cats as the post when u save is empty/0 for the category id
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9918
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Products kicked out of category on save
« Reply #2 on: September 06, 2019, 20:00:39 pm »
But actually, even when the js breaks, the categories should be kept. When the ajax does not load the category tree, the value is -1 or something like that and should not executed storing of the category relation.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2316
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Products kicked out of category on save
« Reply #3 on: September 06, 2019, 20:40:05 pm »
Sorry to disagree, I saw a similar issue some versions ago where the js did not load the categories on product edit. If You are changing price or some other detail, you will just not notice that the categories for the product are not loaded so you make a save. Viola, the categories are gone. This was over a year ago, I believe, I can not remember all the details, just that it was very annoying and that it was quickly solved at the time. It could have been a clash with JCE text editor, not sure.

Jörgen @ Kreativ Fotografi
Joomla 3.9.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2943
  • VirtueMart Version: 3.6.0
Re: Products kicked out of category on save
« Reply #4 on: September 07, 2019, 12:21:43 pm »
I thought this was solved - I reported ages ago and Milbo did the fix to not save categories on failed category load

I will test - but assume it is working as I have not had issues since the fix
regards
A

Joomla 3.9.8
php 7.1

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9918
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Products kicked out of category on save
« Reply #5 on: September 09, 2019, 08:32:38 am »
This was over a year ago,

Exactly a year ago. I worked on that problem two times. vm3.6.0 got tested against this problem, as Andrew said.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/