_umbracoHelper.ContentAtRoot() has Block List cont...
# help-with-umbraco
r
Hi all, We have migated from 7 all the way to 13. We have a API that feeds an application with data with top level nodes and their children. We are using _umbracoHelper.ContentAtRoot() to get all the data then filter based on the top level node we need. However we have noticed that some of our nodes that are using Block List are coming back with duplicate data (The block list has a "left side" property, that can have a ItemStub that has an ID for a bit of media). Break pointing on a certain node ID seems to make it so any node after that have Block List will always copy the same "left side". Its such weird behaviour I'm at a loss as to what could be causing it. I know it may be hard to understand without an example but maybe someone has some idea of what's going on?
h
I had something similar happen a few days ago working with editing content in a block list through the Umbraco api, as I was looping through the content it would always return all the blocks with the same data, like it was constantly overwriting itself as it was looping through, I was only trying to change one item in the list but it changed all of them. After a lot of googling and digging around on stackoverflow I found my code wasn't 'thread safe'. The list of items I was looping through were all a copy of a single item, with a slight change to each, but this slight change was being applied to all of them. I ended up doing a very hacky fix to stop it. Not sure if this is what is happening to you but it might be worth looking at.
10 Views