Copied to clipboard

Flag this post as spam?

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


  • Lucio 24 posts 142 karma points
    Oct 30, 2018 @ 16:23
    Lucio
    0

    Archetype custom JS not working on Azure

    Hi there,

    I modified the getNativeLabel() function on archetype.js file into App_Plugins so I can show Related Links properly into the Label.

    On Local is working fine but when this is deployed into Azure it looks like the file is not being called from the site, having just the archetype.css loaded into the page.

    This is what is loaded in the browser for each environment:

    enter image description here

    The same problem is happening for the other plugin I have installed (RB.MultiDatePicker).

    I have already check that all the files are on the Azure environment so I can't understand why that archetype.js file is not being called when I am in the backoffice.

    Any ideas?

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Oct 30, 2018 @ 16:40
    Nicholas Westby
    1

    Only thing that comes to mind is the client dependency framework. I believe it should be bundling the JavaScript and serving it up with a single file.

    Maybe that's the DependencyHandler.axd files I see in your second screenshot?

    I think it handles things differently when in debug mode, which I would guess is the reason you are seeing it appear differently on your local.

    Not sure though; haven't had a chance to use Umbraco on Azure recently.

    BTW, are you using Umbraco Cloud, or are you using Azure manually? And if you're using Azure manually, which type of Azure setup are you using?

  • Lucio 24 posts 142 karma points
    Oct 30, 2018 @ 16:52
    Lucio
    0

    Thanks for the reply Nicholas,

    I believe you are right with the Dependency Handler. When I check the code inside I manage to find the archetype.js code but with my custom bits missing. I have the feeling I need to do something into the ClientDependency.config file, but not sure what :s

    About the Azure set up. I have just created an "Umbraco CMS" App Service and an empty SQL database, then pushed from my local.

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Oct 30, 2018 @ 17:42
    Nicholas Westby
    100

    How are you including your custom JavaScript in the back office? I'm assuming it's in some package.manifest file, right? Be sure that file exists on Azure.

    Also, you may want to delete your ClientDependency and PluginCache folders (in App_Data/TEMP/), restart your website, and clear your browser cache.

  • Lucio 24 posts 142 karma points
    Oct 31, 2018 @ 09:36
    Lucio
    0

    You are absolutely right. The manifest was missing for both Archetype and RB.MultiDatePicker plugins.

    As soon as I referenced the js files they started to be added as dependencies, BUT now I found another problem :s Looks like the archetype.js file is already added through packages\Archetype.1.18.0\content\App_Plugins\Archetype\js

    This means that there are duplicate functions and the Archetype data types are broken.

    I am trying to find if there is any way to change the reference from packages to App_Plugins but not luck yet.

    Any ideas?

  • Lucio 24 posts 142 karma points
    Oct 31, 2018 @ 10:49
    Lucio
    1

    Forget about the last thing I said. Looks like I don't need manifest for Archetype not sure why. As soon as I removed the reference of archetype.js and clean all the cache on Azure it started working. I believe I just needed to clean the ClientDependency since the beginning as you said. But was helpful to fix the issue I had with the other plugin :D

    Thanks for your help Nicholas, you are a star!!

Please Sign in or register to post replies

Write your reply to:

Draft