Copied to clipboard

Flag this post as spam?

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


  • mike_h 25 posts 49 karma points
    Mar 13, 2012 @ 10:26
    mike_h
    2

    Not working correctly in 4.7.1

    Hi,

    The map doesn't render in the admin area in version 4.7.1 if the compilation debug setting in web.config is set to false as it would be in a production environment. Somehow seems to be related to a Client Dependency issue, when compilation debug is set to false I get a Javascript error 'Uncaught ReferenceError: UmbracoGoogleMapMapDataType is not defined'

    For example this web.config setting works :

    <compilation defaultLanguage="c#" debug="true" batch="false" targetFramework="4.0">

    This does not work:

    <compilation defaultLanguage="c#" debug="false" batch="false" targetFramework="4.0">

    Thanks,

    Mike

  • David Conlisk 432 posts 1008 karma points
    Mar 29, 2012 @ 12:09
    David Conlisk
    0

    Hi all,

    Mike - thanks for posting this, I couldn't work out what the difference was on the server that caused the google map to cease rendering in the admin (it works fine locally). I realised that it stopped working after going through the uGoLive process and that sets debug="false". I'm also using the latest v4.7.1.

    Setting debug back to true in the web.config sorts it.

    Cheers,

    David

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Mar 29, 2012 @ 12:17
    Lee Kelleher
    0

    Hi Mike, David,

    Enabling the debug means turning off ClientDependency, which means that there must be an issue with how we are embedding CSS/JS resources from the Google Maps data-type.  I know some people have had this issue in the past ... but they've either accepted that debug=true, or done another workaround.

    Either way, it's not good... and I'd like the data-type to work correctly with debug=false.  I'm tempted to remove our dependency on ClientDependency - by injecting the CSS/JS directly.

    I'd need help testing this though, would you guys be willing to test?

    Thanks, Lee.

  • mike_h 25 posts 49 karma points
    Mar 29, 2012 @ 12:43
    mike_h
    0

    Hi Lee,

    No problem, I'd be happy to test for you, let me know when you're ready.

    Cheers,

    Mike

  • David Conlisk 432 posts 1008 karma points
    Mar 29, 2012 @ 13:12
    David Conlisk
    0

    Of course - happy to test whatever you can throw at me ;)

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Mar 29, 2012 @ 15:19
    Lee Kelleher
    0

    Before I make any code changes to the data-type, it might be worth seeing if an upgrade of CD (to v1.4) might work first?

    http://clientdependency.codeplex.com/releases/view/72284 (Upgrade instructions are on that page)

    I haven't been able to reproduce the same problem locally.  Not sure if it's to do with my set-up (tried with using both IIS7 and IISExpress).

    Thanks, Lee.

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Mar 29, 2012 @ 15:37
    Lee Kelleher
    0

    ... and still in my pursuit to figure this out, stumbled on Damiaan Peeters's blog post: http://blog.dampee.be/post/2011/10/10/Umbraco-deployment-issues-ClientDependency-error-gone-with-debug3dtrue-on-IIS7-(SOLVED).aspx

    Check if the <handlers ... > section is missing from <system.webServer> in your Web.config.

    Worth a try.

    Cheers, Lee.

  • mike_h 25 posts 49 karma points
    Mar 30, 2012 @ 09:07
    mike_h
    0

    Hi Lee,

    I had already tried upgrading the CD to latest version but it had no effect, I've also just checked and the <handlers> section is not missing.

    Cheers,

    Mike

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Mar 30, 2012 @ 10:35
    Lee Kelleher
    0

    Hi Mike,

    Thanks for trying that out!  I'll make some code alterations and upload a beta/test package - see if that resolves it.

    Cheers, Lee

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Apr 04, 2012 @ 10:45
    Lee Kelleher
    1

    As always, there never seems to be enough hours in the day... (and client work pays the bills!) :-)

    Since there seems to be a bug with ClientDependency in certain situations where embedded resources are not being cominbed - (I have no idea what is causing this) ... it does seem to work for a lot of other people (e.g. it works on all the websites that I've used it on), (also if it didn't work across the board, I'd have had a lot of people screaming at me!)

    How's about this for a proposed solution... to get the best of both worlds, we introduce an AppSettings key to disable the use of ClientDependency?

    <add key="GoogleMaps:DisableClientDependency" value="true"/>

    I have already written a provisional patch for this... just need to know if you guys think it is a suitable fix?

    Cheers, Lee.

  • David Conlisk 432 posts 1008 karma points
    Apr 04, 2012 @ 10:55
    David Conlisk
    0

    Hi Lee,

    Seems sensible to me, although obviously a shame it's required. Better than leaving debug mode true on a live site.

    David

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Apr 04, 2012 @ 10:58
    Lee Kelleher
    0

    Thanks David. I agree, seems a little overkill.  However this wont be needed for all installs of the data-type (as in it wont auto-add the AppSettings key) ... it's more of a hidden feature if ClientDependency doesn't work for them.  The logic being - always use ClientDependency, unless the AppSettings key is there AND set to 'true'.

    Cheers, Lee.

  • David Conlisk 432 posts 1008 karma points
    Apr 04, 2012 @ 11:00
    David Conlisk
    0

    Yeah it's a good solution for the rare situations where there's an issue with CD - nice work!

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Apr 04, 2012 @ 11:27
    Lee Kelleher
    0

    Hi David, Mike,

    I have added a 'beta' download if you guys would like to test this before I release it "into the wild" ... that would be very much appreciated.

    https://bitbucket.org/vertino/google-maps-for-umbraco/downloads#download-80538 (The download is "Google_Maps_for_Umbraco_2.0.4_BETA.zip")

    Remember to add the:

    <add key="GoogleMaps:DisableClientDependency" value="true"/>

    Thanks, Lee.

  • David Conlisk 432 posts 1008 karma points
    Apr 04, 2012 @ 21:35
    David Conlisk
    0

    Hi Lee,

    Sorry about this but I'm afraid I can't test it properly for you because the site I was working on has gone live and there is no dev version on the server. My local version doesn't have the issue at all unfortunately.

    If it's of any use to you, I downloaded and installed it over the top of the existing package on my local machine anyway and it works fine, with or without the web.config setting, and with it set to true and to false.

    Sorry about that and thanks for getting back with a fix so quickly!

    David

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Apr 05, 2012 @ 10:13
    Lee Kelleher
    0

    No worries David, many thanks for testing it locally... there were no other changes to the code-base, so I'll most likely release it once Mike has got back to me.

    Cheers, Lee.

  • David Conlisk 432 posts 1008 karma points
    May 21, 2012 @ 11:32
    David Conlisk
    0

    Hi Lee,

    Has there been any progress with this? My client has come back with some change requests for the site in question, so I might have a chance to test this on the server where I had the issue before.

    Cheers,

    David

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    May 21, 2012 @ 11:36
    Lee Kelleher
    0

    Hi David,

    Nope, Mike never got back to me, so the 2.0.4 beta I uploaded is still in place - ready for testing.

    If it works for you, then I'll push out a new release (basically dropping the "beta" label, as there are no other changes).

    Cheers, Lee.

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Jun 21, 2012 @ 18:12
    Lee Kelleher
    0

    Quick update to say v2.0.4 is now released, which contains the AppSettings key for disabling the use of ClientDependecy.

    http://our.umbraco.org/projects/backoffice-extensions/google-maps-datatype

    Cheers, Lee.

Please Sign in or register to post replies

Write your reply to:

Draft