Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nik 1593 posts 7151 karma points MVP 6x c-trib
    Jul 01, 2015 @ 14:05
    Nik
    0

    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 :

    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.

  • Warren Buckley 2106 posts 4836 karma points MVP ∞ admin hq c-trib
    Jul 07, 2015 @ 14:11
    Warren Buckley
    0

    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

  • Nik 1593 posts 7151 karma points MVP 6x c-trib
    Jul 10, 2015 @ 12:23
    Nik
    0

    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.

  • Chris Lord 58 posts 211 karma points
    Jul 07, 2015 @ 15:06
    Chris Lord
    0

    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.

  • Warren Buckley 2106 posts 4836 karma points MVP ∞ admin hq c-trib
    Jul 13, 2015 @ 09:37
    Warren Buckley
    100

    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

  • Nik 1593 posts 7151 karma points MVP 6x c-trib
    Jul 13, 2015 @ 11:16
    Nik
    0

    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 :-)

  • Warren Buckley 2106 posts 4836 karma points MVP ∞ admin hq c-trib
    Jul 13, 2015 @ 11:50
    Warren Buckley
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft