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.

General Questions

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

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

SilverStripe Book Chapter 5 Error


3 Posts   348 Views


6 March 2012 at 12:13am (Last edited: 6 March 2012 12:14am), Community Member, 21 Posts

I have seen this issue posted around the board and I have followed the steps taken to rectify it but nothing seems to work.

I have also downloaded the sample code from the Wiley website, this example is not in it - disappointing.

I am trying to learn SilverStripe and following the SilverStripe Complete Guide To CMS Development by Wiley - Chapter 5 Job postings which tells the reader:

Create a file named JobCategoryHolder.php

class JobCategoryHolder extends Page {
static $allowed_children = array(
static $singular_name = 'Job category overview';
static $plural_name = Job category overviews'; - surely a missing ' in this line?
class JobCategoryHolder_Controller extends Page_Controller {

Create a file named JobCategory.php in the mysite/codefolder:

class JobCategory extends Page{
static $singular_name = 'Job category';
static $plural_name = 'Job categories';
class JobCategory_Controller extends Page_Controller {}

Please create a file called Job.php in the mysite/code folder:

class Job extends DataObject {

I have to say the book is quite confusing and not very well written at this point, there seems to be an obvious (even to me) error in the first JobCategoryHolder.php file - a missing quote.

If anyone has got this working can you let me know what I need to do or where to look to get this working.


6 March 2012 at 1:47am Forum Moderator, 1796 Posts


has the code stored and answers the question about what to do on that page (in the readme bit)


6 March 2012 at 9:27am Community Member, 21 Posts

Thanks buddy, will check it out.