Hi,
I am using Umbraco version 7.12.2 and an Umbraco starter kit from uskinned.net. My project was running fine. I restarted my website from Visual Studio and now I am getting this error
The error stems from .First() not returning any results because .Where() doesn't return any results.
So it's not the websiteConfigurationNode that is missing, the node just doesn't have any children with the alias USNNavigation.
I would assume it's because of a spelling error, perhaps it should have been USNavigation, without the extra 'N'?
No, this is purely an issue regarding content on your site.
So, on the Home node on your site, it seems there is a property called websiteConfigurationNode, that is a content picker, where you should have picked a configuration node.
That configuration node is supposed to have some children, according to the code -> .Children.Where(...)
However, none of those children is apparently of document type "USNNavigation", so you get an empty list, and .First() will then throw an error.
So, you need to check the configuration node for children of that document type. If they actually do exist, try republishing them.
Sequence contains no elements
Hi, I am using Umbraco version 7.12.2 and an Umbraco starter kit from uskinned.net. My project was running fine. I restarted my website from Visual Studio and now I am getting this error
Please help me.
Qamar
Hi Qamar
It looks like "websiteConfigurationNode" is missed from the tree. Can you check that "websiteConfigurationNode" is accessible in Umbraco backend?
Alex
The error stems from .First() not returning any results because .Where() doesn't return any results. So it's not the websiteConfigurationNode that is missing, the node just doesn't have any children with the alias USNNavigation. I would assume it's because of a spelling error, perhaps it should have been USNavigation, without the extra 'N'?
No its USNNavigation, I am using starter kits from uskinned.net and this part of the code comes with the starter kit. I did not make any changes here.
Ok, but regardless, you get an error because the .Where clause returns an empty sequence.
so what should I do, should I change the umbraco version or repair my visual studio ?
No, this is purely an issue regarding content on your site.
So, on the Home node on your site, it seems there is a property called websiteConfigurationNode, that is a content picker, where you should have picked a configuration node.
That configuration node is supposed to have some children, according to the code -> .Children.Where(...) However, none of those children is apparently of document type "USNNavigation", so you get an empty list, and .First() will then throw an error. So, you need to check the configuration node for children of that document type. If they actually do exist, try republishing them.
Thanks alot. It worked.
Great to hear :)
Hi Mads
Exactly, you are right.
is working on a reply...