Copied to clipboard

Flag this post as spam?

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


  • Jan Vanuytrecht 32 posts 80 karma points
    Sep 11, 2014 @ 10:04
    Jan Vanuytrecht
    0

    When saving a Stylesheet that is too big, we get a permission Error in the back office

    Hello,

     

    We have a stylesheet of over 6000 lines (not rules, lines of code).

    This renders well on the front end, but when editing it via the Umbraco Back Office we get a "Stylesheet not saved: Please make sure that you have permissions set correctly" warning. When we cut it down to less than 3967 lines, it saves as expected.

     

     

     

     

     

     

     

     

    When looking for signs of what might be wrong in the developer toolbar, the call "http://xxxxxxxx.umbraco.io/umbraco/webservices/codeEditorSave.asmx/SaveCss"  responds with a 500 (Internal Server Error).

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

  • Marvin Varela 14 posts 35 karma points
    Jan 08, 2015 @ 23:27
    Marvin Varela
    0

    Did you ever figure out what was causing this issue? I am currently having the same issue and I was interested in finding out if you were able to solve it.

    Thanks!

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jan 09, 2015 @ 05:44
    Jan Skovgaard
    0

    Hi guys

    What browser are you using when trying to save the stylesheets? And are there any particular reason that you're editing it through the stylesheet editor in Umbraco? Usually that's not a best practice and should be done using a proper editor outside the Umbraco environment in my humble opinion. That will keep you out of these weird trouble as well :)

    /Jan

  • Jan Vanuytrecht 32 posts 80 karma points
    Jan 09, 2015 @ 09:18
    Jan Vanuytrecht
    2

    Yup, we did.

    Apparently for jsonserialization there is a limit of x characters (Unicode).

    We added the following line in the Web.config file:

     <system.web.extensions xdt:Transform="Insert">
        <scripting>
          <webServices>
            <jsonSerialization maxJsonLength="2147483647" />
          </webServices>
        </scripting>
      </system.web.extensions>

      

    So it wasn't malformed css or something like that, the file (json) was too big.

    The property maxJsonLength is an Int32 with a default value of 2097152 (which stand for 2097152 characters). 

    We have set it to the max of an int, which is 2147483647. That did the trick.

  • Marvin Varela 14 posts 35 karma points
    Jan 12, 2015 @ 15:49
    Marvin Varela
    0

    Thanks a lot for sharing, I will make the adjustments!

Please Sign in or register to post replies

Write your reply to:

Draft