Copied to clipboard

Flag this post as spam?

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


  • Amna Butt 20 posts 140 karma points
    Apr 11, 2017 @ 16:20
    Amna Butt
    0

    Package.manifest is not injecting JS files

    I am trying to add some js and css files in default.cshtml of Umbraco to load my plugin html. But it is somehow not working

    my package.manifest looks like this:

    {   "css": [
    "~/App_Plugins/myplugin/style.css" ], "javascript": [
    "~/App_Plugins/myplugin/file1.js",
    "~/App_Plugins/myplugin/file2.js",
    "~/App_Plugins/myplugin/file3.js"
     ]}
    
  • Rune Hem Strand 147 posts 911 karma points hq c-trib
    Apr 11, 2017 @ 22:16
    Rune Hem Strand
    100

    Hi Amna

    Your package manifest looks fine so the js files should be loaded.

    First of try to recycle the app pool and with developer tools open (in chrome) Empty Cache and Hard Reload by right clicking the browser refresh button.

    If that doesn't work...

    • What are you trying to achieve?
    • Is it controllers for a custom property editor?
    • How are you running the code in the files?
    • How have you verified that they are not loaded?

    All the best

    Rune

  • Amna Butt 20 posts 140 karma points
    Apr 12, 2017 @ 05:47
    Amna Butt
    0

    Dear Rune Hem Strand

    Thank you so much for your quick response. You saved my day.

    I have recycled the pool and run site in incognito mode.

    It start working.

  • Rune Hem Strand 147 posts 911 karma points hq c-trib
    Apr 12, 2017 @ 05:58
    Rune Hem Strand
    0

    Woohoo!! That's great to hear :)

    If you make changes to the package manifest you need to restart the application, otherwise the changes will not get picked up.

    If you are making changes to CSS, js and views simply disabling caching and running with dev tools (chrome) usually does the trick but sometimes the Empty Cache & Hard Reload seems to be needed. All this is with debug set to true in web.config.

    Happy coding #h5yr

  • Amna Butt 20 posts 140 karma points
    Apr 25, 2017 @ 10:15
    Amna Butt
    0

    Is there any way of loading all my files after CMS js files. because sometimes i get this issue of tinymce undefined. May be the reason of my js files loading first.

Please Sign in or register to post replies

Write your reply to:

Draft