ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

HTTP 501 Not Implemented/HTTP 505 Version Not Supported

August 17, 2011 2:35am

Subscribe [3]
  • #1 / Aug 17, 2011 2:35am

    togs

    9 posts

    Hello,

    I am having an issue when saving a template as a JavaScript type.

    Essentially, when saving the template with the following:

    function setCookie(NameOfCookie, value) {
      var exdate=new Date();
      exdate.setDate(exdate.getDate() + 1);
      var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
      [removed] = NameOfCookie + "=" + c_value;
    }

    I get “HTTP 501 Not Implemented/HTTP 505 Version Not Supported”

    However, if I just strip it down to:

    function setCookie(NameOfCookie, value) {
    }

    It saves just fine.

    Any ideas?

    My My ExpressionEngine build is 2.2.1

  • #2 / Aug 17, 2011 12:00pm

    Kyle Cotter

    730 posts

    Hey togs,

    Something seems to have gone wonky when you tried to post, can you let me know what was in place of [removed]?

    Thanks!

  • #3 / Aug 17, 2011 10:46pm

    togs

    9 posts

    Hello Kyle,

    The removed part should be document[period]cookie

    Every time I try to save this post with an actual . it seems to substitute [removed] instead.

    Thanks for the response.

  • #4 / Aug 18, 2011 10:52am

    Kevin Smith

    4784 posts

    Hi togs,

    Just trying to get a hold of the problem you’re having: does the error you’re seeing happen when you’re trying to save the template? Or when you’re trying to view it on the front-end? Walk me through exactly the steps I need to take to recreate the issue.

    Just to make sure we’re working with the same code you are, could you post your entire template into something like pastebin.com and post the link back here? That way nothing will get stripped out of your code.

  • #5 / Aug 18, 2011 9:12pm

    togs

    9 posts

    Hello Michael,

    Here is the code snippet.

    http://pastebin.com/hiNb769e

    Essentially, I create a template and define its type as javascript.

    When I push the update button or update and finished button, the page says “The website is unable to display the webpage”. HTTP 501/HTTP 505.

    HTTP 501 Not Implemented/HTTP 505 Version Not Supported

    When I hit the back button on the browser, I can see that the information has not been saved to the templte. Trying again displays the same error.

    When I save the template again, this time with an empty function, it saves just fine:

    function setCookie(NameOfCookie, value) {
    }

    Mindboggling.

  • #6 / Aug 21, 2011 11:32pm

    Lisa Wess

    20502 posts

    Hi, togs -

    If you put that same code into a file on the server and save it, does it work?  You might even try with it saved as a template file.

    What I suspect is that the server is erroring in some way when submitting that content via POSTing it in a form.  That’s why I’d like to go straight to FTP to troubleshoot; if so, we know to ask the host and see if they have any ideas. 

    Let us know what that testing turns up.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases