Jump to:

3435 Posts in 1026 Topics by 866 members

Template Questions

SilverStripe Forums » Template Questions » Tutorial 2 - Date not saving

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 890 Views
  • Hildarian
    Avatar
    Community Member
    6 Posts

    Tutorial 2 - Date not saving Link to this post

    Hi, I have had a look at a lot of answers here, but can't figure out what is wrong. I am stuck trying to get the date to save to the database. It just hangs and then comes back with an error message. I can save the date into the database directly, but if I try to refresh the page it hangs again. I have followed the tutorial pretty closely (and restarted on several occasions) so it must be another setting somewhere. Can someone please help me troubleshoot this problem. Going slightly insane!

  • martimiz
    Avatar
    Forum Moderator
    1068 Posts

    Re: Tutorial 2 - Date not saving Link to this post

    could you give us the exact errormessage?

  • Hildarian
    Avatar
    Community Member
    6 Posts

    Re: Tutorial 2 - Date not saving Link to this post

    Hi there! I receive this error "java parse error" and sometimes it just hangs and returns no error (depending on what I have changed or tried to do)...

    If the field is text based then it works fine.

    I have added the Image Gallery module which has dates stored in the DB and have not had a problem with them.

    Any help would be GREATLY appreciated

  • Willr
    Avatar
    Forum Moderator
    5490 Posts

    Re: Tutorial 2 - Date not saving Link to this post

    If you have Firebug installed (or Web Inspector for Chrome / Safari) you can see the *actual* error SilverStripe returns. In firebug this is under the console tab, in Web Inspector under resources -> XHR. That error message will be useful!

  • Hildarian
    Avatar
    Community Member
    6 Posts

    Re: Tutorial 2 - Date not saving Link to this post

    Hi again! I loaded Firebug and get the following error messages:

    Error: The stylesheet http://localhost:8888/tutorial/css/layout.css was not loaded because its MIME type, "text/html", is not "text/css".
    Source File: http://localhost:8888/Security/login?BackURL=%2Fadmin%2F
    Line: 0

    Error: The stylesheet http://localhost:8888/tutorial/css/form.css was not loaded because its MIME type, "text/html", is not "text/css".
    Source File: http://localhost:8888/Security/login?BackURL=%2Fadmin%2F
    Line: 0

    Error: The stylesheet http://localhost:8888/tutorial/css/typography.css was not loaded because its MIME type, "text/html", is not "text/css".
    Source File: http://localhost:8888/Security/login?BackURL=%2Fadmin%2F
    Line: 0

    Hopefully this sheds some light on the problem!

    Everything else going fine except for this little (very annoying) problem.

    Thanks again! Hilda

  • Willr
    Avatar
    Forum Moderator
    5490 Posts

    Re: Tutorial 2 - Date not saving Link to this post

    Sadly, those are unrelated to the issue at hand. What you'll need to do is open the console tab, save the page and it should popup a new line with the XHR request which will go red once it fails.

  • Hildarian
    Avatar
    Community Member
    6 Posts

    Re: Tutorial 2 - Date not saving Link to this post

    Actually, on further investigation, I have come up with this error message which seems more relevant to the problem...

    83: missing ; before statement <br /> <b>Fatal error</b>: Maximum execution time of 30 seconds exceeded in <b>/Applications/MAMP/htdocs/sapphire/thirdparty/Zend/Locale/Format.php</b> on line <b>665</b><br />
    errorMessage(msg="Javascript Parse Error", fullMessage="83:\nmissing ; before st... line <b>665</b><br />\n")leftan...7268058 (line 367)
    Evaluator(response=undefined)base.j...7268057 (line 81)
    success(response=XMLHttpRequest { responseText="\n<br />\n<b>Fatal error<... line <b>665</b><br />\n", mozResponseArrayBuffer=ArrayBuffer, more...})leftan...7268058 (line 444)
    header()base.j...7268057 (line 67)
    processOnDemandHeaders(xml=XMLHttpRequest { responseText="\n<br />\n<b>Fatal error<... line <b>665</b><br />\n", mozResponseArrayBuffer=ArrayBuffer, more...}, status=200, _ondemandComplete=function())base.j...7268057 (line 746)
    prototypeOnDemandHandler(xml=XMLHttpRequest { responseText="\n<br />\n<b>Fatal error<... line <b>665</b><br />\n", mozResponseArrayBuffer=ArrayBuffer, more...}, status=200, callback=function())base.j...7268057 (line 749)
    header(readyState=4)base.j...7268057 (line 70)
    onStateChange()base.j...7268057 (line 66)
    bind()base.j...7268057 (line 29)
    console.error(fullMessage);}
    leftan...7268058 (line 367)
    "enabling javascript debugger to support script"

    890 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.