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:

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Front End DataObjectManager - Page Not Found

Go to End



Community Member, 219 Posts

4 March 2012 at 11:07am

can anybody help with this?

I've go a front end dataobjectmanager (or complextable - either is fine) and it lists my dataobjects fine, but when i click them or try to add a new one it just ends with "page not found"

here's my code:

class Rates extends DataObject {
	public static $db = array(
		"PricePerNight" => "Currency",
		"dateStart" => "Date",
		"dateEnd" => "Date"

	public static $has_one = array(
		"Apartment" => "Apartment"
	public static $has_many = array(

	public function getCMSFields_forPopup() {
		return new FieldSet(
			new TextField('PricePerNight'),
			new DatePickerField ('dateStart','Date of arrival'),
			new DatePickerField ('dateEnd','Date of departure')



	function RatesForm(){
	$Apartment = $this->getApartment();	
	$Manager = new ComplexTableField(
		array('dateStart' => 'dateStart'),
		'ApartmentID = ' . $Apartment->ID
	$Manager->setPermissions(array("show","edit", "add"));
	$fields = new FieldSet(
   new HiddenField('ID', ''),

	return new Form($this, 'RatesForm', $fields, new FieldSet());

I'm guessing the issue is because i'm generating the form on an external page type to where the "Rates" are initially managed. so is it to do with the controllers?
I think the problem may lie here:

$Manager = new ComplexTableField(

Does the $this need to be something else?

I have the following relationships.
"Apartments" are dataobjects - they $has_many "Rates"
"Rates" are dataobjects - they $has_one "Apartment"

And im tryng to have a form that loads on my front end "edit" page with a URL like this:

It all shows up fine in the front end, and ONLY the rates that apply to that Apartment appear, it's just I cant click/edit/delete them.

thanks in advance for your help!