News:

Looking for documentation? Take a look on our wiki

Main Menu

Products kicked out of category on save

Started by melsonmarketing, August 30, 2019, 15:30:27 PM

Previous topic - Next topic

melsonmarketing

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

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 https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 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
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Milbo

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.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Jörgen

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)
This reflects current status when viewing old post.

AH

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 4.4.5
php 8.1

Milbo

Quote from: Jörgen on September 06, 2019, 20:40:05 PM
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.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

melsonmarketing

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

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
Lowestoft, Suffolk, UK

Retired from forum life November 2023

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

melsonmarketing

Thank you for your tipp jenkinhill - I tried that, unfortunately without success

Updated to 3.6.10 in the meantime - no changes

Studio 42

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

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

Maybe a file got not correctly copied. Just install vm again.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

melsonmarketing

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

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

QuoteWarning: 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:

QuoteThe 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

Quote from: melsonmarketing 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"

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)
This reflects current status when viewing old post.