Umbraco Bug - Updating Document when multiTreePicker values are the same
Hi,
A strange one here.
Umbraco version 7.6.5 assembly: 1.0.6428.37121
I am updating a docType through code.
The docType has multiple fields (indistries, locations, workTypes, keywords)
The issue is happening with MultiTreePicker fields only.
The issue happens when there has been no change to one of the multiTreePickers.
If I change all the fields, add or remove items from the MultiTreePickers then they save fine.
If for instance one of the MultiTreePickers values don't change then I run the save and publish (obviously to update other fields on the docType that have changed) then the values of the unchanged MultiTreePicker that are saved in-fact save some invalid value.
To try and get around the issue I have tried.
Only calling the SetValue() if something has changed.
so this
content.SetValue("industries",model.SelectedIndustries);
would only get called if SelectedIndustries had infact been changed.
This still had an error.
I also tried to SetValue() to a blank string first and then run the SetValue() again to see if this triggered a change and tricked Umbraco into saving this correctly.
This still didn't work.
Has anyone experienced a similar issue? Is this possibly something to do with the xml cache? Should I be doing something extra following the save and publish?
As a reminder if I change all the MultTreePicker values (industries,locations,worktypes) the save works fine. Its only if one of these 3 fields remains unchanged that the save doesn't work.
The save and publish doesn't throw and error. Its seems to save fine but when I check in Umbraco backend the nodes haven't been selected and if I try to load these in the frontend it throws an error saying
An exception of type 'System.FormatException' occurred in Umbraco.Core.dll but was not handled in user code
Additional information: String "062b3adc7dba40d6908d49b271c81823" is not a valid udi.
Umbraco Bug - Updating Document when multiTreePicker values are the same
Hi,
A strange one here. Umbraco version 7.6.5 assembly: 1.0.6428.37121
The issue happens when there has been no change to one of the multiTreePickers.
If I change all the fields, add or remove items from the MultiTreePickers then they save fine.
If for instance one of the MultiTreePickers values don't change then I run the save and publish (obviously to update other fields on the docType that have changed) then the values of the unchanged MultiTreePicker that are saved in-fact save some invalid value.
To try and get around the issue I have tried.
content.SetValue("industries",model.SelectedIndustries);
would only get called if SelectedIndustries had infact been changed.
This still had an error.
This still didn't work.
Has anyone experienced a similar issue? Is this possibly something to do with the xml cache? Should I be doing something extra following the save and publish?
Here is my exact code
As a reminder if I change all the MultTreePicker values (industries,locations,worktypes) the save works fine. Its only if one of these 3 fields remains unchanged that the save doesn't work.
The save and publish doesn't throw and error. Its seems to save fine but when I check in Umbraco backend the nodes haven't been selected and if I try to load these in the frontend it throws an error saying
Hi,
Ignore this I finally figure this out. It was related to a frontend issue. Some invalid was getting passed in to the save.
is working on a reply...