Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Template Questions /

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

Tutorial 2 - Date not saving


Go to End


7 Posts   1671 Views

Avatar
Hildarian

Community Member, 6 Posts

28 June 2011 at 1:43am

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!

Avatar
martimiz

Forum Moderator, 1391 Posts

28 June 2011 at 4:18am

could you give us the exact errormessage?

Avatar
Hildarian

Community Member, 6 Posts

28 June 2011 at 1:03pm

Edited: 28/06/2011 1:06pm

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 :)

Avatar
Willr

Forum Moderator, 5523 Posts

28 June 2011 at 7:54pm

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!

Avatar
Hildarian

Community Member, 6 Posts

29 June 2011 at 3:28pm

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

Avatar
Willr

Forum Moderator, 5523 Posts

29 June 2011 at 3:44pm

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.

Avatar
Hildarian

Community Member, 6 Posts

29 June 2011 at 3:45pm

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"