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:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Job Portal from book not working in SS 3.0.3

Go to End

4 Posts   892 Views


Community Member, 3 Posts

2 January 2013 at 11:58am

I am using SS 3.0.3 on Ubuntu with Apache2 and Php 5.3

I only copied the Job php files from the Wiley site:,descCd-DOWNLOAD.html




and the ss files to:


Then ran the dev/build


and it worked without any errors, created the tables etc.

I created a main Job page and assign it a "Job Category Overview" type and that worked.

I created 2 pages under the Job page and tried assigning them with the "Job Category" type but it just returns a blank page after I click on Save and Publish. From that point on, non of the Admin menu works and all returning blank page. If I refresh the admin page everything returns to normal but the sub pages have not been assigned the new type.

No errors in the Apache2 logs.

Any idea what is going on?


Community Member, 3 Posts

2 January 2013 at 3:20pm

I re-installed SS3, just in case it was screwed up, took the Job files from the book, modified them to fit my needs and the error I get is the following:

Error at line 1043 of SS3/framework/model/DataObject.php

after I do a dev/build (no errors) and try to assign a new type to a page.

Attached are the 3 php files I am using (had to rename to .txt for the upload to work).

Any idea?

Attached Files

Community Member, 3 Posts

2 January 2013 at 3:52pm

Doing the 3.0 tutorial here:

I get the same error as above:

Error at line 1043 of SS3/framework/model/DataObject.php

when I try to assign a Project type to a page.

Is there a bug in SS3 or am I doing it wrong?


Community Member, 545 Posts

8 January 2013 at 5:23pm

There is a lot of legacy code in that if you're working in 3. Try updating the reuests and replacing the ComplexTable field with a GridField to start. Also put the site into devmode to get better error reporting. I suspect in the backend the ComplexTable field ma be a problem but ActiveTenders function should be updated to a SS3 compatible query. Now I'm not sure if you can query for nulls and functions with a raw SQL where() in SS3 but you could request the whoel DataList and filter it like

public function ActiveTenders() {
	$ActiveTenders = new ArrayList();
	foreach($this->Tenders() as $tender) {
		if(is_null($tender->ExpiryDate) || strtotime($tender->ExpiryDate) > time()) {
	return $ActiveTenders;

I find some simple operations more complex with the new ORM, but the flexabilty and chainability is worth it.

As for the GridField

$tenderManagerConfig = GridFieldConfig_RelationEditor::create();
	new GridFieldDetailForm('Tender')
$tenderManager = new GridField(
	"Tenders", "Tenders",
$fields->addFieldToTab('Root.Main', $tenderManager);