Quote from: rthrash at Dec 19, 2007, 02:18 PM
What is different about how Quickedit saves TVs and how the manager saves ... seems like we could solve a lot of pain by adopting the QE code... ?
In 0.9.6.1 there probably isn’t any difference, although I don’t use QE myself so I haven’t looked at its code at all. But the manager used to have a JavaScript check to determine which TVs had been changed when the document was saved, and it was not triggered by the browser entering autotext (so these TVs were not registered as changed by the script, and thus were not saved). But that part of the "dirty document" script is no longer in the current release, so it should no longer be a problem.
Instead of determining which TVs had been modified client-side using JavaScript, sirlancelot changed that code to use a REPLACE INTO SQL query. So now as I understand it MySQL is determining whether the POSTed TV values are different from the previously saved ones and updating, inserting, or ignoring them accordingly. So to me it seems that if people are still experiencing a problem similar to the autotext issue in older versions then this may have to do with the way that query is being executed on their server, or it might indicate that they didn’t update all of their manager files.
Some of these people have reported that disabling strict mode fixes the issue, but at least one person (fruitwerks) still seems to have the problem. Fruitwerks did you reupload all of your manager files when you upgraded? I wonder if you might have some legacy files in there, especially given that you started from Etomite and upgraded.
I’m not confident enough in my understanding of how REPLACE queries are executed to know for sure whether it might be the wrong thing to use in this case. It looks to me as if it might update (= delete and reinsert) a row when only one of the key values is matched instead of both the TV and document ids. It seems as if that would be causing all sorts of havoc for most users if it were the case, however, and so far it seems as if that’s not happening.