There was another problem in DocManager with TV updates.
Namely - if a document had a TV value set that was different to the default, and you wanted to reset it to the default, DocManager wouldn’t update it (it’d exclude the TV from the update because the value you supplied was the default value.)
Please see
Bug #942 to which I’ve attached a patch (and patched source file) which appears to fix this issue.
What the patch does is this:
- Now checks each TV against each document (instead of the template)
- If the new value given for a TV matches the TV’s default value, it checks if the document had a previously-assigned value for the TV
- If it did, it removes this value from the site_tmplvar_contentvalues table (resetting this document’s TV to the default)
- If it didn’t, it’s ignored - nothing changes
- If the new value given for a TV does not match the TV’s default value, the TV is updated as normal
Hope this makes sense - the code in the patch is commented.
MODx developers - can you test the patch and possibly include in the 0.9.6.1 patch release?
Thanks.