I am getting this error, it worked a few day ago and now it does not. I have two sites and tested on the second and get no error, same version.
Same code is on both sites
Error:
'Umbraco.Web.Models.DynamicPublishedContentList' does not contain a definition for 'Count'
Code
Error in Umbraco 7.43
I am getting this error, it worked a few day ago and now it does not. I have two sites and tested on the second and get no error, same version. Same code is on both sites Error: 'Umbraco.Web.Models.DynamicPublishedContentList' does not contain a definition for 'Count' Code
Thanks Matt
I would try to avoid using the Dynamic model, and use the Model.Content instead. I made some VERY quick amends to the code, and totally untested.
I would also recommend not counting the collection, but rather use the .Any() method, it makes better sense.
It might also pay to check for children before trying to iterate over the collection as well.
}
is working on a reply...