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:

Archive /

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

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

Can't Debug - Fatal Error


Go to End


2 Posts   1842 Views

Avatar
Josh

SilverStripe Developer, 65 Posts

19 March 2008 at 5:46pm

Edited: 19/03/2008 5:47pm

Hey,

Trying to create my first SS plugin - A competition system.

Followed the doku for debugging but can't seem to debug my subclasses/functions

I am going to http://localhost:8888/mysilverstripesite/CompetitionPage_Controller/TestFunction and getting the error (I get this same error for any page controllers)

FATAL ERROR: Missing argument 1 for ContentController::__construct(), called in /Applications/MAMP/localhost/tearaway_ss/sapphire/core/control/Director.php on line 167 and defined
At line 23 in /Applications/MAMP/localhost/tearaway_ss/sapphire/core/control/ContentController.php

ContentController->__construct()
line 167 of Director.php

Director::getControllerForURL(/CompetitionPage_Controller/GetPageID)
line 67 of Director.php

Director::direct(/CompetitionPage_Controller/GetPageID)
line 104 of main.php
Context
Debug (Debug::showError() in line 149 of Debug.php)

Am I doing something wrong?

Avatar
Josh

SilverStripe Developer, 65 Posts

20 March 2008 at 8:55am

In the above example i've created a function as follows

function GetPageID() {
Debug::message("Echo from inside get page id");
}

I'm just trying to echo some text to see if it's even working.