Copied to clipboard

Flag this post as spam?

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


  • Mike B 14 posts 57 karma points
    Feb 28, 2017 @ 11:11
    Mike B
    0

    @Html.RenderJsHere() Works locally but doesn't work when deployed online

    Hello,

    I try to upload my project that works locally to a host and it produces an error instead of listing the javascripts.

     <!--[Javascript:Name="StandardRenderer"]//-->
    

    This is where the script tags should be. Any ideas?

    Umbraco version 7.5.6 assembly: 1.0.6185.24083

  • Shola 65 posts 273 karma points
    Mar 03, 2017 @ 18:39
    Shola
    0

    Hey there, do you actually get an error message? If so, what is the full message?

  • Shola 65 posts 273 karma points
    Mar 07, 2017 @ 00:57
    Shola
    100

    Also, make sure you added your live domain to the bundle domains in config/ClientDependency.config

    For example:

    ...
     <fileProcessingProviders>
          <add name="CompositeFileProcessor"
                type="ClientDependency.Core.CompositeFiles.Providers.CompositeFileProcessingProvider, ClientDependency.Core" 
                enableCssMinify="false" 
                enableJsMinify="false" 
                persistFiles="true"     
                compositeFilePath="~/App_Data/ClientDependency" 
                bundleDomains="localhost:54153,mylivesite.com" 
                urlType="MappedId"
                pathUrlFormat="{dependencyId}/{version}/{type}"/>
        </fileProcessingProviders>
    ...
    
  • Mike B 14 posts 57 karma points
    Mar 16, 2017 @ 10:35
    Mike B
    0

    Hey, I mistakenly marked it as a solution.

    That's what I didn't do but after adding the domains and deleting the clientdependency items from the App_Data folder still it doesn't work. so I get the usual

    <!--[Javascript:Name="StandardRenderer"]//-->
    

    Instead of the < script> tags that I should.

    Also, if it helps, now on the folder "~/App_Data/TEMP/ClientDependency" there is only an empty generated .xml file:

    <?xml version="1.0" encoding="utf-8" standalone="yes"?>
    <map />
    
  • Shola 65 posts 273 karma points
    Mar 16, 2017 @ 18:48
    Shola
    0

    Did you increment the clientDependency version="########" number? Always increment after a major change to your site, or if you change anything that has to do with javascript or css.

    Also, make sure you have .mysite.com and mysite.com in bundle domains, since the dot will account for www.mysite.com and any other subdomain.

    If that doesn't work, you may need to post the full error message that you see.

  • Mike B 14 posts 57 karma points
    Mar 16, 2017 @ 18:53
    Mike B
    0

    Thank you for your continued attention on this.

    I did try incrementing

    I don't get an error message, just an HTML comment where the script tags should be. Any idea how to get more detailed error?

    I tried to set local config to bogus "bundleDomains" value instead of localhost and it seems to load without problems, so the setting must be a red herring for this problem after all!

Please Sign in or register to post replies

Write your reply to:

Draft