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

melsonmarketing

  • Jr. Member
  • **
  • Posts: 67
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: 9665
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
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: 10040
  • 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
  • Sr. Member
  • *
  • Posts: 2764
    • 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.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3181
  • VirtueMart Version: 3.8.2
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.18
php 7.3

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10040
  • 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/

melsonmarketing

  • Jr. Member
  • **
  • Posts: 67
Re: Products kicked out of category on save
« Reply #6 on: November 22, 2019, 11:56:10 am »
Hi Guys

Thanks for discussing this matter.

I've been caught in other projects the last months.

The client helped himself by  using the mass-assign function after editing products. This is working but absolutely NOT comfortable :-(

In the meantime we made all updates and checked / disabled third party plugins etc.

We have the following situation:

J! 3.9.13
VM 3.6.8 10197

Editing products:
Product-information Tab

- Manufacturer Dropdown is working
- Category Dropdown is not working AND on save the product is deleted from current category
- Dropdown for the buyergroup is working

Product images Tab

- Can't delete assigned images

Thank you for any help and tipps

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27742
  • Always on vacation
    • Jenkin Hill Internet
Re: Products kicked out of category on save
« Reply #7 on: November 22, 2019, 12:32:29 pm »
I fixed a similar problem for a client simply using the "Install or if necessary update tables" tool.  Obviously, test on a copy of the live site.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM 3.8.2 10325 on Joomla 3.9.18 PHP 7.3.18

melsonmarketing

  • Jr. Member
  • **
  • Posts: 67
Re: Products kicked out of category on save
« Reply #8 on: November 25, 2019, 09:30:09 am »
Thank you for your tipp jenkinhill - I tried that, unfortunately without success

Updated to 3.6.10 in the meantime - no changes

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4336
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Products kicked out of category on save
« Reply #9 on: November 25, 2019, 19:55:23 pm »
The category use JSON, check your XHR tab in google chrome, if you have PHP error reporting and have an error then categories doesn't show.

melsonmarketing

  • Jr. Member
  • **
  • Posts: 67
Re: Products kicked out of category on save
« Reply #10 on: November 26, 2019, 09:03:16 am »
This is the error I found:

Uncaught TypeError: jQuery(...).dynoTable is not a function
    at HTMLDocument.<anonymous> (index.php?option=com_virtuemart&view=product&task=edit&virtuemart_product_id=116:2871)
    at u (jquery.min.js?55933016be521ee82b4c3e3b2ca30436:2)
    at Object.fireWith [as resolveWith] (jquery.min.js?55933016be521ee82b4c3e3b2ca30436:2)
    at Function.ready (jquery.min.js?55933016be521ee82b4c3e3b2ca30436:2)
    at HTMLDocument._ (jquery.min.js?55933016be521ee82b4c3e3b2ca30436:2)
(anonymous) @ index.php?option=com_virtuemart&view=product&task=edit&virtuemart_product_id=116:2871
u @ jquery.min.js?55933016be521ee82b4c3e3b2ca30436:2
fireWith @ jquery.min.js?55933016be521ee82b4c3e3b2ca30436:2
ready @ jquery.min.js?55933016be521ee82b4c3e3b2ca30436:2
_ @ jquery.min.js?55933016be521ee82b4c3e3b2ca30436:2

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10040
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Products kicked out of category on save
« Reply #11 on: December 03, 2019, 17:41:39 pm »
Maybe a file got not correctly copied. Just install vm again.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

melsonmarketing

  • Jr. Member
  • **
  • Posts: 67
Re: Products kicked out of category on save
« Reply #12 on: December 09, 2019, 14:03:50 pm »
Hi Milbo,

I installed the latest 3.6.10 over the existing - no changes.

Even stranger:

Typing the first 3 letters the field responds with : No results match "Catname"

melsonmarketing

  • Jr. Member
  • **
  • Posts: 67
Re: Products kicked out of category on save
« Reply #13 on: May 05, 2020, 08:47:17 am »
Hi all!

I don't know what I did wrong but I'm a little confused. This topic is still hot for me.
Why am I confused?

I wanted to proceed this post and the warning message says

Quote
Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

So I started a new one and pointed to this thread here.

It was removed by Jörgen @ Kreativ Fotografi:

Quote
The text of the reply is shown below:
Please Do not start a new thread for an ongoing issue.

Hmm...  :-\

Okay, so here I am again:

Meanwhile I'm sure, that it is a VM-problem. It only happens in the backend, using only VM and core-template. There are no vm plugins or extensions in the backend

Joomla! 3.9.18 Stable
Php 7.3.15
MySQL 5.7.29
VM 3.6.10 10211

Debug Info:

1 vmdebug Show All Errors, PHP-Version 7.3.15
2 vmdebug 1 Language, default shoplanguage (VmConfig::$jDefLang): de_de de-DE
3 vmdebug vmTime: time to load config: 0.011167049407959
4 vmdebug vmTime: time to import plugins vmuserfield: 0.000101089477539062
5 vmdebug Start used Ram 2M
6 vmdebug My Memory Limit in Bytes 268435456
7 vmdebug getVendorId manager
8 vmdebug vmTime: "VirtueMartControllerProduct" Finished task product: 0.282629013061523
9 vmdebug End used Ram 12M
10 vmdebug Peak memory peak 12M

Thanks and regards
Michael

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2764
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Products kicked out of category on save
« Reply #14 on: May 05, 2020, 09:27:01 am »
Hi Milbo,

I installed the latest 3.6.10 over the existing - no changes.

Even stranger:

Typing the first 3 letters the field responds with : No results match "Catname"

If You do not have any matching category names the error message is totally correct, please show an image.

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