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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

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   1030 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.