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.

Data Model Questions /

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

HTTP 500 error when trying to define create() on a controller


Go to End


3 Posts   1257 Views

Avatar
Ryan M.

Community Member, 309 Posts

3 March 2011 at 4:10pm

What the subject says.

I'm defining this in a controller:

public function create() {
		return array(
		);
	}

And it returns a 500 error. If I rename it to something else, the 500 disappears.

What gives?

Avatar
Willr

Forum Moderator, 5523 Posts

3 March 2011 at 9:17pm

What is the specific error message? I think create() may conflict with the create function defined for making new objects in SS. You could probably name your function like create_blah() then use Director to map create/ to create_blah to avoid conflicts.

Avatar
Ryan M.

Community Member, 309 Posts

6 March 2011 at 2:38pm

I was thinking that was the problem, that it was defined somewhere else.