DNN Forums

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

DNN v9.10.02 HTML Module issue

Sort:
You are not authorized to post a reply.





New Around Here





    Team,

     

     I am unable to add script code in html module i.e. While adding <script>test</script> and click save getting below error

    Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 403

    I am able to add anything but when try to put word <script> then started getting error and this is happening even html module Header part as well

    Please guide how to overcome on this. this is urgent.

    Awaiting for your reply.






    Veteran Member





      HTML module is designed to filter scripts from its content.
      However, you may enter a script in module header (in module settings).
      HTH





      New Around Here





        everywhere i.e. HTML Module,Module Header(in module settings),Page Header(in Page seo settings) I am trying to add start with <script> not getting save
        getting below error, is there anthing changed at global level, Please guide
        Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. 
        The status code returned from the server was: 403






        Veteran Member





          Hello: 

          First, please know that I moved this forum thread to another forum category to make it easier for everyone to find in the future.  

          Now, the HTML module is not meant to be used for advance HTML scenarios like this one.  It's not completely a limitation of the module itself, but really a commentary on the WYSIWYG HTML editors and how they handle things.  In your case, it's also a borderline security protection to some degree.  

          If you wish to inject HTML into the page that isn't content-related, you're really left with 5 options.  

          1. If you must use the HTML module, you still can, but know it comes with some usability issues. You'll need to use the Basic Textbox Editor feature (dropdown on the bottom), and then selecting HTML.  This will give you a textarea where you can freely enter any HTML you want, but it's not easy to train non-technical people on how to use it and when, and it will end up being completely wiped out if you accidentally edit this content using another method.  
          2. I've long used a content injection module that helps manage HTML elements like this, while giving a usable UI for individuals to use. 
          3. Use structured content to inject the content. This can be done multiple ways, including using OpenContent and 2sxc.  
          4. Add the script to your theme and have it load either with each page load, or add some conditional logic to only load it sometimes.  
          5. Add the script using another module that needs it (but only if your scenario involves a custom module already).  





          New Around Here





            Thanks for your prompt response,

            My issue is I am not able to add javascript code in either any module Header or Page Header but earlier it was working fine but suddenly it stopped working, I could not recall what kind of changes I did so that this type of issue is coming. This is a global issue.
            Please guide.
             






            Veteran Member





              Posted By shyamal majumder on 11/9/2022 9:07 PM

              Thanks for your prompt response,

              My issue is I am not able to add javascript code in either any module Header or Page Header but earlier it was working fine but suddenly it stopped working, I could not recall what kind of changes I did so that this type of issue is coming. This is a global issue.
              Please guide.
               

              Well, I just gave you five options to add scripts to your website.  If a script stops working without any edits, then there needs to be a bunch of troubleshooting.  Unfortunately, you need to just follow the path of the script to determine why it didn't load.  It might be a caching issue, browser issue, file availability, file path, antivirus, CDN, and a number of other potential causes.  Without a clear condition that can be reproduced, we'll be very limited in how we can help and most things would literally be a guess.  Sorry.  :( 

               

              You are not authorized to post a reply.

              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