Copied to clipboard

Flag this post as spam?

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


  • Carl Bussema 38 posts 140 karma points
    Jan 29, 2018 @ 15:31
    Carl Bussema
    0

    Error 417 saving CSS on version 7.7.2

    I have a site running U7.7.2, and when I log in with administrator privileges, or any of the editors log in, nobody can save any CSS files.

    No error is displayed to the user, but the dev console shows Error 417 Expectation Failed https://(site)/umbraco/RestServices/SaveFile/SaveStylesheet 417 (Expectation Failed)

    The trace log that I can get from the developer pane doesn't have any record or any errors related to this.

    I tested adding a comment to a JavaScript file with the backoffice editor, and that saves correctly.

    I have been out of the Umbraco world for a while (I'm only the backup support person, and nobody even TOLD me I was the backup until today). I see that there was a problem in 7.6.5 with error 417 but it was corrected in 7.6.6, so I'm assuming (perhaps incorrectly) that is also fixed in 7.7.2. It also seems like that was manifesting differently.

    I don't have the ability to deploy changes currently, but I'm working on getting that access. For now I'm limited to what I can do through the backoffice. Any ideas?

  • Steve Morgan 1349 posts 4458 karma points c-trib
    Jan 30, 2018 @ 08:52
    Steve Morgan
    1

    Hi Carl,

    Two things to test / check.

    1) Permissions on the css folder on the webserver.

    2) Length of the CSS file - I've seen some websites with huge CSS files that the post is rejected.

    Probably worth creating a test.css file on the server that's empty and and try and edit it.

  • Carl Bussema 38 posts 140 karma points
    Jan 30, 2018 @ 16:16
    Carl Bussema
    0

    It's hosted in Azure; we don't have any way to directly change file system permissions.

    I was able to use the back office to create a new, empty CSS file, but attempting to save a single-line /* hello world */ failed with the same error 417.

  • Ben 112 posts 398 karma points
    Nov 12, 2019 @ 19:26
    Ben
    0

    I upgraded from 7.6.2 to 7.15.3 and am seeing the same problem when I try to save a CSS file. I can modify the CSS file outside of the backoffice, so this is more annoying than critical for me. Would be great to be able to modify the CSS directly in the backoffice though.

    Anybody have thoughts on what to look at for this?

  • Ben 112 posts 398 karma points
    Nov 12, 2019 @ 19:39
    Ben
    0

    In case it's helpful, here is a screenshot of the Javascript error message: enter image description here

  • Ben 112 posts 398 karma points
    Nov 12, 2019 @ 19:48
    Ben
    0

    I have tested permissions by temporarily allowing Everyone full access to the CSS folder and still got the error message. So I am assuming that file permissions isn't the problem.

    I have tried creating a new CSS file like Carl did and got the same error message, so I am also assuming it isn't a file size issue.

    Looks like it is failing to load the resource /umbraco/RestServices/SaveFile/SaveStylesheet when you click into a css file to edit.

  • Gareth Stewart 14 posts 86 karma points
    Jan 07, 2020 @ 17:00
    Gareth Stewart
    0

    Just to add to this list I have the same issue going from 7.5.14 to 7.15.3.

    /umbraco/RestServices/SaveFile/SaveStylesheet 417 (Expectation Failed)

  • Gareth Stewart 14 posts 86 karma points
    Jan 08, 2020 @ 17:00
    Gareth Stewart
    0

    ...in case this helps anyone:-

    my /umbraco/RestServices/SaveFile/SaveStylesheet 417 (Expectation Failed) error was fixed by changing the value in the Config\ClientDependency.config file.

    Line 13

    to the default one in the base 7.15.3 files

  • Giampiero D'Agostino 14 posts 106 karma points
    Sep 17, 2020 @ 06:51
    Giampiero D'Agostino
    0

    I tried the above solution and did not work for me :( Did anyone find another way? Cheers, Giampiero

  • Ben 112 posts 398 karma points
    Nov 17, 2020 @ 16:01
    Ben
    0

    I just upgraded from 7.15.3 to 7.15.6 and I am still having this problem saving the css files from withing the backoffice. I have also tried deleting and replacing the Umbraco and Umbraco_Client folders.

    I do have a test site that was upgraded from 7.15.3 to 7.15.6 and it is working. Comparing the test site to the live site I can see some differences in the Request Headers:

    Live Site request header:

    accept: application/json, text/javascript, */*; q=0.01
    Accept-Encoding: gzip, deflate, br
    Accept-Language: en-US,en;q=0.9
    Connection: keep-alive
    Content-Length: 12408
    Content-Type: application/json; charset=UTF-8
    Sec-Fetch-Dest: empty
    Sec-Fetch-Mode: cors
    Sec-Fetch-Site: same-origin
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36
    X-Requested-With: XMLHttpRequest
    X-XSRF-TOKEN: undefined
    

    Test site request header:

    :method: POST
    :path: /umbraco/RestServices/SaveFile/SaveStylesheet
    :scheme: https
    accept: application/json, text/javascript, */*; q=0.01
    accept-encoding: gzip, deflate, br
    accept-language: en-US,en;q=0.9
    content-length: 789
    content-type: application/json; charset=UTF-8
    sec-fetch-dest: empty
    sec-fetch-mode: cors
    sec-fetch-site: same-origin
    user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36
    x-requested-with: XMLHttpRequest
    x-umb-xsrf-token: 2UxDpFHLh7lV-Kkt6s1ETJeAsUzovOc1iyJCFdn32bi8_3-kDYa7dtOTBP_2oMancOFG6am0FF0NafTYVW0x09fcCrcnCtiH_IJZIuYgKoD2co0w-o7bgdiV7Pli1PIo0
    

    Looks like the live site is missing the x-umb-xsrf-token cookie or is unable to set the X-XSRF-TOKEN.

  • Steve Morgan 1349 posts 4458 karma points c-trib
    Nov 17, 2020 @ 17:04
    Steve Morgan
    0

    Do you have a third party cookie policy / script thing running on the front end.

    I had a similar problem and it was killing the Umbraco auth cookies for the back end editors. Caused infinite amounts of complaining because we just couldn't work out what they were complaining about.

    https://our.umbraco.com/forum/using-umbraco-and-getting-started/85747-417-missing-token-suddenly-occurring-on-all-our-sites#comment-303957

  • Ben 112 posts 398 karma points
    Nov 17, 2020 @ 19:01
    Ben
    0

    No, I don't have a third party cookie policy running. I am able to see that there is a UMB-XSRF-TOKEN cookie set before I make the request. Here is what I see: enter image description here

  • Ben 112 posts 398 karma points
    Nov 17, 2020 @ 19:13
    Ben
    0

    @Steven Morgan, your post lead me to https://github.com/umbraco/Umbraco-CMS/issues/5509, and I think that is the problem I am seeing. No asp.net sessions cookie is set on my live site, but it is on the test site. I will have to look into this more.

  • Ben 112 posts 398 karma points
    Nov 17, 2020 @ 19:33
    Ben
    0

    the asp.net session cookie might not be the only problem. I have another test site and it has the session cookie, but it still doesn't save the css files.

    Cookies from not working test site: enter image description here Cookies from working test site: enter image description here

Please Sign in or register to post replies

Write your reply to:

Draft