Umbraco 7.2.6 + Version 1.0.2 - DynamicPublishedContentList does not contain a definition for 'Any'
Hi guys,
I'm hoping you can help, I'm looking at adding Analytics to a couple of sites we've recently made. However when I've come to add it to the first one it immediately results in an error occurring on the main site (not in the Umbraco back end).
The error is a YSOD that reads as follows:
'Umbraco.Web.Models.DynamicPublishedContentList' does not contain a definition for 'Any'
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'Umbraco.Web.Models.DynamicPublishedContentList' does not contain a definition for 'Any'
This is happening on the last line of this block of code:
var current = CurrentPage.Id == page.Id ? "active" : null;
var subPages = ((DynamicPublishedContentList) page.Children.Where("Visible")).Where(p => p.HasProperty("includeonmenu") && p.GetPropertyValue<bool>("includeonmenu")).ToList();
var hasChildrenToShow = page.Children.Where(" visible").Any() && page.level < maxLevel && subPages.Any();
This code is part of a helper method to create our Nav bar and without this package installed it works absolutely fine. Now I've installed analytics into a blank Umbraco project with no problems (this was completely blank, no starter kit or anything).
I've seen various links about the above error such as :
Hello Nik
Do you mind trying out the latest build from the latest commit in the repo that AppVeyor builds out the Umbraco Zip package automatically to see how this compares please?
I had the same issue with this, was able to resolve by removing a couple of the DLL's that the package installs after I had configured, can't remember which ones were causing the issue but guess that isn't the desired behavior.
I am about to install this on a new project so happy to install the latest build if it helps, as this is an awesome package.
Thanks for that, I've installed the new release and it all seems to be working now. Just a thought though, it could be worth having a "De-Authorise" button which clears the connection to Google. At the moment it's not clear how you would go about it, I'm guessing you just authorise against another account.
Umbraco 7.2.6 + Version 1.0.2 - DynamicPublishedContentList does not contain a definition for 'Any'
Hi guys,
I'm hoping you can help, I'm looking at adding Analytics to a couple of sites we've recently made. However when I've come to add it to the first one it immediately results in an error occurring on the main site (not in the Umbraco back end).
The error is a YSOD that reads as follows:
This is happening on the last line of this block of code:
This code is part of a helper method to create our Nav bar and without this package installed it works absolutely fine. Now I've installed analytics into a blank Umbraco project with no problems (this was completely blank, no starter kit or anything).
I've seen various links about the above error such as :
Our umbraco forum post 1
Stack Overflow Link
The site has other packages installed such as:
AngularGoogleMaps, Archetype, Config Tree, Cultiv Search Engine Sitemap, LeBlender, Link Picker and uSync. Which are all working fine.
Uninstalling Analytics lets the site work again without any other changes.
Hopefully you can help/advise.
Hello Nik
Do you mind trying out the latest build from the latest commit in the repo that AppVeyor builds out the Umbraco Zip package automatically to see how this compares please?
https://ci.appveyor.com/project/warrenbuckley/analytics/build/1.1.0.68/artifacts
If this works & is all good then I will make this an official release.
Thanks,
Warren
Hi Warren, apologies, I haven't had a chance to try it this week. I'll look at it first thing next week and let you know my findings.
I had the same issue with this, was able to resolve by removing a couple of the DLL's that the package installs after I had configured, can't remember which ones were causing the issue but guess that isn't the desired behavior.
I am about to install this on a new project so happy to install the latest build if it helps, as this is an awesome package.
Hello Guys,
I have been able to reproduce this bug & I have released a new version of Analytics version 1.2.0 available on our.umbraco.org & NuGet.
Let me know if this fixes your problems please.
Thanks
Hey Warren,
Thanks for that, I've installed the new release and it all seems to be working now. Just a thought though, it could be worth having a "De-Authorise" button which clears the connection to Google. At the moment it's not clear how you would go about it, I'm guessing you just authorise against another account.
Cheers for the update though :-)
Hi Nik
Yes that could be done. Could you add it as a feature request to the Issue Tracker on the GitHub Repo for the project please.
So that when I manage to find time again I can pick this up.
https://github.com/warrenbuckley/Analytics/issues
is working on a reply...