News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Bug on child product delete Vm 4.2.2

Started by niosme, September 21, 2023, 13:38:59 PM

Previous topic - Next topic

niosme

When we delete a child product it always this child product not deleted from the fields in database and always throws an error
e.g we have a product with id 1
and 4 child procuts with id's 2,3,4,5

When we go to delete the product e.g. with id 5 then everytime it throws the following error:

vmError: Empty slug product with id 5, entries exists for language? el-GR.  (or en-GB) langugage dont make any difference on that

Then we must go to edit the table from mysql by hand because
inside the
##_virtuemart_product_customfields

on the custom field params it remains like that


selectoptions=[
    {
        "voption": "clabels",
        "clabel": "\u03a7\u03c1\u03ce\u03bc\u03b1",
        "values": "\u039c\u03b1\u03cd\u03c1\u03bf\/\u0393\u03ba\u03c1\u03b9\/\u039b\u03b5\u03c5\u03ba\u03cc\r\n\u0393\u03ba\u03c1\u03b9\/\u039c\u03b1\u03cd\u03c1\u03bf\/\u03a0\u03bf\u03c1\u03c4\u03bf\u03ba\u03b1\u03bb\u03af\r\n\u039b\u03b5\u03c5\u03ba\u03cc\/\u039c\u03b1\u03cd\u03c1\u03bf\/\u039a\u03cc\u03ba\u03ba\u03b9\u03bd\u03bf\r\n\u039b\u03b5\u03c5\u03ba\u03cc\/\u0393\u03ba\u03c1\u03b9\/\u039c\u03c0\u03bb\u03b5"
    }
]|options={
    "1": [
        "\u039c\u03b1\u03cd\u03c1\u03bf\/\u0393\u03ba\u03c1\u03b9\/\u039b\u03b5\u03c5\u03ba\u03cc"
    ],
    "2": [
        "\u0393\u03ba\u03c1\u03b9\/\u039c\u03b1\u03cd\u03c1\u03bf\/\u03a0\u03bf\u03c1\u03c4\u03bf\u03ba\u03b1\u03bb\u03af"
    ],
    "3": [
        "\u039b\u03b5\u03c5\u03ba\u03cc\/\u039c\u03b1\u03cd\u03c1\u03bf\/\u039a\u03cc\u03ba\u03ba\u03b9\u03bd\u03bf"
    ],
    "4": [
        "\u039b\u03b5\u03c5\u03ba\u03cc\/\u0393\u03ba\u03c1\u03b9\/\u039c\u03c0\u03bb\u03b5"
    ],
    "5": [
        "\u039b\u03b5\u03c5\u03ba\u03cc\/\u0393\u03ba\u03c1\u03b9\/\u039c\u03c0\u03bb\u03b5"
    ]
}|


Which contains the id 5 and we should manually delete it and make it like this


selectoptions=[
    {
        "voption": "clabels",
        "clabel": "\u03a7\u03c1\u03ce\u03bc\u03b1",
        "values": "\u039c\u03b1\u03cd\u03c1\u03bf\/\u0393\u03ba\u03c1\u03b9\/\u039b\u03b5\u03c5\u03ba\u03cc\r\n\u0393\u03ba\u03c1\u03b9\/\u039c\u03b1\u03cd\u03c1\u03bf\/\u03a0\u03bf\u03c1\u03c4\u03bf\u03ba\u03b1\u03bb\u03af\r\n\u039b\u03b5\u03c5\u03ba\u03cc\/\u039c\u03b1\u03cd\u03c1\u03bf\/\u039a\u03cc\u03ba\u03ba\u03b9\u03bd\u03bf\r\n\u039b\u03b5\u03c5\u03ba\u03cc\/\u0393\u03ba\u03c1\u03b9\/\u039c\u03c0\u03bb\u03b5"
    }
]|options={
    "1": [
        "\u039c\u03b1\u03cd\u03c1\u03bf\/\u0393\u03ba\u03c1\u03b9\/\u039b\u03b5\u03c5\u03ba\u03cc"
    ],
    "2": [
        "\u0393\u03ba\u03c1\u03b9\/\u039c\u03b1\u03cd\u03c1\u03bf\/\u03a0\u03bf\u03c1\u03c4\u03bf\u03ba\u03b1\u03bb\u03af"
    ],
    "3": [
        "\u039b\u03b5\u03c5\u03ba\u03cc\/\u039c\u03b1\u03cd\u03c1\u03bf\/\u039a\u03cc\u03ba\u03ba\u03b9\u03bd\u03bf"
    ],
    "4": [
        "\u039b\u03b5\u03c5\u03ba\u03cc\/\u0393\u03ba\u03c1\u03b9\/\u039c\u03c0\u03bb\u03b5"
    ]
}|


Which is unacceptable.

Also the characters are saved in translated format. They should be in utf8 or something to be readable.

Please fix it asap!
Fullstack Developer and Joomla Expert

niosme

Any support? Also opened ticket because have passed 15 days and have no answer on bugs.
Fullstack Developer and Joomla Expert

Milbo

Just go to the parent product, and store it again, to update this. The line of the deleted product is removed. Could be better yes.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

niosme

#3
Going to the parent product and storing it again doesnt work.
The registration stays forever in the database.

It could be better or it should be right and be deleted instead of going to the db and delete it by hand?
Fullstack Developer and Joomla Expert

Milbo

No, I tested it before I wrote that. In my case it works. I remember when I wrote the whole thing, I had to write a lot stuff to store it always right. For example if a product is missing. Or if you load it.
so if you load it and the product is missing, it should not be displayed and when you store it, it overrides the old stuff, always completly!

So please test again. Maybe you used 2 tabs. you deleted on one tab, stored with the other. That cant work!
you must, if you use 2 tabs, delete it on one tab. On the tab with the parent reload the page and THEN store it. I know it is not a cooool solution. But from my point of view an acceptable workaround. This problem is quite rare in real shops. My estimation, there is a store with 5000 multivariants and they use this 1-2 times a year.

I mean, I think you know, that the whole thing is dynamic. So for example if you use stocking and one product is without stock, it wont be displayed in the dropdowns anylonger. The whole data for the dropdowns is stored and if they are created, the not available products are filtered out.

So most shops wont need it. They may just set the product on unpublished, because they may use it later anyway. Your case only happens if someone created too many options, or so.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

niosme

Problem still exists in the latest version.
If we make a product with child products and we use the multi variant, then we delete from the main list of products,when we click the parent it throws the "vmError: Empty slug product with id ##, entries exists for language el-GR" and it stays in the database.

No multiple tabs, no parallel saving, no nothing. Just delete a child product which is assign to multi variant from the parent.Then in the parent it throws that error.
Fullstack Developer and Joomla Expert

anihilator

I can agree that this problem still persist in version 4.2.14.

AlfredJK

In version 4.2.18 11050, the bug is still present. Both the parent and child record are not present in the database. Does anyone have an idea how to fix the problem?

AlfredJK

delete the cookies and it works again. Problem here was the recently viewed products