Copied to clipboard

Flag this post as spam?

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


  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Apr 30, 2018 @ 09:35
    Ismail Mayat
    0

    javascript error

    I am using umbraco 7.10.3 and umbraco forms 7.0.2 and perplex forms v1.8.3. When i try to hit the backoffice i get white screen and in the console the following error:

    enter image description here

    It seems to be trying to request url /App_Plugins/PerplexUmbracoForms/js/ and not any specific js file in that folder. This gives a 403 error as you cannot list the contents of that folder. Anyone seen this before?

    Regards

    Ismail

  • Ravi Motha 290 posts 500 karma points MVP 8x c-trib
    Apr 30, 2018 @ 09:42
    Ravi Motha
    0

    Tat looks like a routing nd path issue. i e it seems to know where to go , but not what to do..

    I've written controllers that do that.. by accident mind you...

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Apr 30, 2018 @ 09:44
  • Daniël Knippers 153 posts 1117 karma points MVP 2x c-trib
    Apr 30, 2018 @ 09:55
    Daniël Knippers
    0

    Hi Ismail,

    No idea why it would request the App_Plugins/PerplexUmbracoForms/js folder itself, rather than the files inside. The "Unknown provider" error indicates the perplexFormResource.js is not loaded at all, so perhaps indeed none of the .js files in the folder are loaded.

    If that is the case, then @Dave's suggestion cannot be the cause of this, as that decorator would also not be loaded at all. Can you verify which JS files are loaded by looking at the network tab when refreshing?

    Also, could you verify your package.manifest file (App_Plugins/PerplexUmbracoForms/package.manifest) does list all the files, i.e.:

    "propertyEditors": [{
        alias: "Perplex.UmbracoFormPicker",
        name: "Perplex - Umbraco Form Picker",
        isParameterEditor: true,
        editor: {
            view: "~/App_Plugins/PerplexUmbracoForms/propertyeditors/formpicker.html"
        }
    }],
    
    "javascript": [
        "~/App_Plugins/PerplexUmbracoForms/backoffice/common/settingtypes/perplexcheckboxlist.controller.js",
    
        "~/App_Plugins/PerplexUmbracoForms/js/perplex.routing.js",
    
        "~/App_Plugins/PerplexUmbracoForms/js/decorators/navigationservice.decorator.js",
        "~/App_Plugins/PerplexUmbracoForms/js/decorators/formresource.decorator.js",
        "~/App_Plugins/PerplexUmbracoForms/js/directives/perplex-forms-start-nodes.js",
        "~/App_Plugins/PerplexUmbracoForms/js/factories/perplex.constants.factory.js",
        "~/App_Plugins/PerplexUmbracoForms/js/resources/perplexFormResource.js",
    
        "~/App_Plugins/PerplexUmbracoForms/js/controllers/perplex.copy.controller.js",
        "~/App_Plugins/PerplexUmbracoForms/js/controllers/perplex.moveform.controller.js",
        "~/App_Plugins/PerplexUmbracoForms/js/controllers/perplex.createfolder.controller.js",
        "~/App_Plugins/PerplexUmbracoForms/js/controllers/perplex.deletefolder.controller.js",
        "~/App_Plugins/PerplexUmbracoForms/js/controllers/perplex.movefolder.controller.js",
        "~/App_Plugins/PerplexUmbracoForms/js/controllers/perplex.umbracoformpicker.controller.js",
        "~/App_Plugins/PerplexUmbracoForms/js/controllers/perplex.sort.controller.js",
        "~/App_Plugins/PerplexUmbracoForms/js/controllers/perplex.folder.controller.js",
        "~/App_Plugins/PerplexUmbracoForms/js/controllers/perplex.formssecurity.edit.controller.js"
    ],
    
    "css": [
        "~/App_Plugins/PerplexUmbracoForms/css/style.css"
    ]
    

    Regards, Daniël

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Apr 30, 2018 @ 10:28
    Ismail Mayat
    0

    Daniel,

    So i created a new umbraco 7.10.3 install and then installed forms then perplex that all works fine. Looks like something else in our setup is causing the issue. We are going to try and step through code see if we can get to the bottom of it.

    Regards

    Isamil

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Apr 30, 2018 @ 10:54
    Ismail Mayat
    0

    Daniel,

    Ok so got it working but i had to do the following:

    • Created new folder in js folder called storm
    • Copied the perplexFormResource.js to this storm folder
    • Updated the package manifest to point to this new file ie "~/App_Plugins/PerplexUmbracoForms/js/storm/perplexFormResource.js",

    Did a build and that now works. I did quick search through my solution to see if some other packages were maybe making use of that resources folder but could not find anything. This is really strange. We have it working but its a hack which is never good lol.

    Regards

    Ismail

  • Daniël Knippers 153 posts 1117 karma points MVP 2x c-trib
    Apr 30, 2018 @ 11:03
    Daniël Knippers
    0

    Hi Ismail,

    That sounds rather odd. So it's only about the PerplexUmbracoForms\js\resources folder? The other subfolders (controllers, decorators etc.) are fine? I suppose your new folder could be called anything, it does not have to be called storm does it?

    Kind of sounds like there's some redirect going on that redirects any request to \some_path\resources\*.js to \some_path\? If it's not a server redirect, perhaps some Angular $http interceptor at work..

    If you can figure it out I'd be glad to know what it was, but at least you have it working now... I don't think we are immediately renaming the resources folder in future versions (yet), we have to know what's going on first as this sounds like some solution specific issue unfortunately.

    -- Daniël

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Apr 30, 2018 @ 11:12
    Ismail Mayat
    0

    I did search my solution and could not find anything. We do use an interceptor I will try turning it off see if that works at least then I can tie it down.

    Regards

    Ismail

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Apr 30, 2018 @ 12:20
    Ismail Mayat
    101

    Right found the culprit we had urlrewrite config rule:

        <add name="LegacyResource"
        redirect="Application"
        ignoreCase="true"
        rewriteUrlParameter="ExcludeFromClientQueryString"
        virtualUrl="~/resource(.*)"
        redirectMode="Temporary"
        destinationUrl="/" />
    

    doh

  • Daniël Knippers 153 posts 1117 karma points MVP 2x c-trib
    Apr 30, 2018 @ 12:25
    Daniël Knippers
    0

    Ah I see, makes sense :-) Glad you found it!

Please Sign in or register to post replies

Write your reply to:

Draft