Copied to clipboard

Flag this post as spam?

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


  • Connie DeCinko 931 posts 1160 karma points
    Apr 20, 2016 @ 14:49
    Connie DeCinko
    0

    Unable to save script tag in master template

    I am updating a template via the back office. I can save most changes to my template, but if I try and add a script tag, the changes never save, and eventually the server spikes and takes several minutes to recover. This simple script should not cause a problem!

    <script>
        $(function() {
            $(".videoPreview img").addClass("img-responsive");
        });
    </script>
    
  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 20, 2016 @ 18:09
    Jan Skovgaard
    0

    Hi Connie

    That's a weird issue indeed - Don't know if it's somehow conflicting with jQuery inside Umbraco somehow when saving it like that.

    I'm wondering if it's possible for you to simply save the code using another editor outside of Umbraco's built in editor? Then perhaps that is the best way to go in this case. And perhaps even adding the code snippet in a javascript file rather than the template perhaps?

    Otherwise it might be worth trying out this longshot to see if it makes any kind of difference at all - It would be weird though since it's primarily used to avoid older browsers from trying to read the javascript code...but perhaps it can be used to circumvent the issue you're dealing with here...

    <script>
    //<![CDATA[
        $(function() {
            $(".videoPreview img").addClass("img-responsive");
        });
    //]]>
    </script>

    Hope this helps.

    /Jan

  • Elenia Tumandao 1 post 71 karma points
    Apr 25, 2019 @ 05:36
    Elenia Tumandao
    0

    Hi! I'm currently experiencing this issue too. I'm not able to save simple script tag in master page. may I know what is causing this issue? Thanks

Please Sign in or register to post replies

Write your reply to:

Draft