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.

Archive /

Our old forums are still available as a read-only archive.

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

Page with File Upload doesn't work (Error saving content or Error in Ajax Evaluator). Please help.


Go to End


3 Posts   1515 Views

Avatar
bummzack

Community Member, 904 Posts

26 February 2008 at 7:14am

Edited: 26/02/2008 8:39pm

Hi forum

I created a new Page-Type and added the following fields to the DB

static $has_one = array(
	'MyFile' => 'File',
	'Preview' => 'Image'
);

I added the appropriate Form Fields to the Tabs in getCMSFields.
Whenever i try to save such a Page, i get a Error: Error saving content.

It works fine when i remove the 'File' field.
The 'Image' upload always works, what could be the Problem with 'File'?

Edit
Rephrased Topic Title for clarity.

Avatar
bummzack

Community Member, 904 Posts

26 February 2008 at 8:34pm

I changed the FileField to FileIFrameField, now the upload works, but whenever i try to save the page i get:
Error in Ajax evaluator on line 974: invalid flag after regular expression

The document is actually being saved, but the error message is really annoying.
Could somebody please help me resolve this? Or maybe tell me where this error comes from? Is there some sort of Error-Log with a more detailed description, since i really don't have a clue where to start debugging.

Thanks a ton

Avatar
bummzack

Community Member, 904 Posts

28 February 2008 at 9:38pm

Anybody?
Is there a workaround for this?