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:
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.
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.
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.
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.
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
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:
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?
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?
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.
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.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?
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!!
is working on a reply...