During the last weeks we have on rare ocations had a problem when a product is beeing publiched. Sometimes when the editor clicks publish, the product will loose all connection with its variants, and also loose all its categories, and end up placed in the root of the catalog. What exaclty happens I have not been able to find out, but according to logs I cant find any errors and the same workflow appears to run as on any other publish. Last night a product that had been worked on and published several times during the day. The editor removed a breakline in a Tiny field and clicked publish and the problem accured. The only thing I can see would have an inpact on this is that I a short while before the problem started was forced to do a manuall correction according to this post in the sql database. https://world.optimizely.com/forum/developer-forum/Problems-and-bugs/Thread-Container/2021/2/metadatatype-bug/
Does any fallback exist for a product to "reset" like this in the commerce code? Im out of ideas of why this would be happening. On one occation the product was compleatly deleted, leaving only the variant left in the tree and when I looked at the logs it said that the user had done a delete. But im confident that the user have not deleted the product because hes an experianced editor of many years and he told me exactly what he did and what he clicked.
Please help me get this solved
Do you by any chance have code listening on publish event? If not in your in code base, maybe in some included modules?
Yes we do have code listening on Instance_PublishingPage, we don't alter any data in it though. We load the new model and sends it of for indexing. This part of the code is tried and tested for atleast a year. And when it did have problems in the beginning it did not present itself like this. When errors occured we got the red (1) saying something went wrong. and the publish failed. Unlike now when the publish passes but the links are gone.