DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Site Assets fails to load if JS minification is on or debug=false in web.config

Sort:
You are not authorized to post a reply.
Page 1 of 212 > >>





New Around Here





    I've setup a new DNN instance (9.10.2) and I've performed the steps to remove Telerik and setup the new Resource module on the pages.  All went smoothly.

    But, now if I turn on JS minfication in the DNN bundling and minification settings or I set the debug attribute to false on the compilation node in the web.config, then the asset pages fail to load, nothing shows in the persona bar, and I have several javascript errors.  The 1st being one that indicates an invalid regex but it looks fine.  If I turn off JS minification or set debug to true, then the problem goes away and the pages load fine.

    I then created a brand new DNN instance, did nothing to it other than the Telerik removal (no pages, themes, or modules) and the problem does NOT occur in that instance.

    Error messages shown:
                Invalid regular express flags
                dnn is not defined
                Cannot read properties of undefined (reading 'MenuItems')

    Anyone else experienced this?  Any ideas?  I've reset the skin to the default skin and made sure there are no modules other than resource manager on the page.  I also copied all bin and non-config files from the fresh instance over to this one in case a file got overwritten that shouldn't have been, but no change.  All other pages work without issues.

    Console Errors

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Regex script error






    New Around Here





       

      Thank you.
      I was experiencing the same disappearance phenomenon. I’m hosting a dozen child-portals in one installation, currently dnn9.10.01. 

      I’ve done a few tests, thanks to you, I knew what I was looking for. In my case, the problem appears to be related only to the JS minify fonction. It makes no difference to manage the resources “Global” or just for the portal. 

      If I remember correctly, the bug appeared after I removed telerik; the installation was a dnn9.9.1 at that time. However, I upgraded to dnn9.10.0 immediately after, so it’s hard to say which procedure caused the problem. 

      I wonder if something like this can solve the problem. https://github.com/Engage...JavaScript-Libraries

       






      New Around Here





        Those libraries are already registered and I see no issues with them or anything that would explain why minifiying JS breaks it.  Since setting up a new fresh instance and ONLY doing the Telerik removal did not exhibit the problem, I'm going to try rebuilding the DNN instance from scratch and see what results.

        But, hopefully, someone will have found a cause and solution that has eluded me thus far before I go that route.  Thankfully, this is still in early development so it's not in Production yet and I still have that option available to me.






        Veteran Member





          I just tried to duplicate this issue in a clean installation of DNN Platform 09.10.02 and wasn't able to.  Everything continues to load.  

          With that being said, I'd suggest leaving this feature turned off entirely and use a website application firewall (WAF) and let that do it instead.  Providers like CloudFlare do a far better job of modification and there are the security and performance benefits that come along with it.  






          Veteran Member





            I forgot to mention I also saw a similar issue reported in GitHub though.  

            https://github.com/dnnsof...Platform/issues/4908






            New Around Here





              I did the same. In trying to figure out the issue, I setup a new instance and only removed Telerik and nothing else and had no issue. We use Cloudflare in Production but not in Dev, so I can't rely on them do the minification at this stage.

              Since the site is still in early development, I'm going to stand up a new instance, remove Telerik, verify no problems, then start rebuilding it using that new instance which should hopefully avoid the problem altogether.





              New Around Here





                I'm experienceing the same issue. I have a copy of an existing site on development, that's been upgraded to the latest version of DNN. I've followed all steps listed to remove Telerik. When JS minification is on, the assets page won't load and displays the same errors in the browser console.

                All other site pages function normally, but once the new asset module has been added to a page, that page won't load properly.

                Was anyone able to figure out a solution to this?






                New Around Here





                  I wasn't able to get rid of it. I even deleted and recreated the site from scratch, did nothing but the Telerik removal, but this time the error persisted (but when I did the same thing in my local DEV instance, the error went away). So, I'm stuck with it for now. I turned off JS minification and enabled Cloudflare for our UAT environment but I really didn't want to have our UAT environment using Cloudflare so I'd love to not need that anymore.






                  New Around Here





                    Thanks for the reply. Yeah, it's definitely not ideal. I'd rather not have to try to go in a different direction for minification also.






                    Veteran Member





                      I think this might be the same issue?
                      If not, please create one or the issue will not get fixed in a future version.

                      https://github.com/dnnsof...Platform/issues/4885

                      You are not authorized to post a reply.
                      Page 1 of 212 > >>

                      These Forums are dedicated to the discussion of DNN Platform.

                      For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

                      1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
                      2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
                      3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
                      4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
                      5. No Flaming or Trolling.
                      6. No Profanity, Racism, or Prejudice.
                      7. Site Moderators have the final word on approving / removing a thread or post or comment.
                      8. English language posting only, please.

                      Would you like to help us?

                      Awesome! Simply post in the forums using the link below and we'll get you started.

                      Get Involved