Copied to clipboard

Flag this post as spam?

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


  • Paulius Putna 78 posts 136 karma points
    Dec 16, 2015 @ 13:46
    Paulius Putna
    0

    TypeError: settingsResource.getprofile is not a function

    Hi,

    I am using Analytics 1.2.0 on Umbraco 7.3.4, but the UI is not working.

    The console shows this error:

    enter image description here While the UI looks like:

    enter image description here

    Any ideas why angular is getting an error?

    Other packages I use:

    • Link Picker 1.1
    • Merchello 1.13.2
    • Merchello Bazaar 1.13.2
    • Mr N Picker 1.0
    • Nested Content 0.2.0
    • OEmbed Picker Property Editor 2.0.1
    • SEO Checker 1.9.3
  • Ian 178 posts 750 karma points
    Dec 16, 2015 @ 19:55
    Ian
    1

    I suspect that another package has also registered an angular resource called settingsResource. As the name is a bit generic I think conflicts have arisen between one or more instances where the definitions differ. When angular is calling 'settingsResource' it is in fact somewhere within another package which does not have a get profile function and is therefore causing the error.

    In order to try and confirm this try putting a js breakpoint on the dashboardcontroller js in Analytics 1.2.0 say on line 4. If in chrome this might show in the sources tab in /App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Dashboard.Controller.js. Inspecting the settingsResource argument of the main function may give you an idea which definition of settingsResource is being picked up and to which package that belongs.

    Ultimately if that is the problem one or each of the plugin authors involved would need to rename their resource to something less generic e.g wbAnalyticsSettingsResource and issue an update

  • Paulius Putna 78 posts 136 karma points
    Dec 17, 2015 @ 10:02
    Paulius Putna
    1

    Thanks @Ian.

    I've run a Find and Replace for /App_Plugins/Analytics and changed settingsResource to AnalyticsSettingsResource and it fixed it.

    The conflict was between Merchello and Analytics.

  • Ian 178 posts 750 karma points
    Dec 17, 2015 @ 10:10
    Ian
    0

    It would be worth dropping a line or pull request to the developers of these two packages to highlight the conflict so that if they do any updates in the future it doesn't break your site and you don't have to keep hacking there code.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies