3060 Posts in 864 Topics by 646 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1954 Views |
-
I can't handle sub-URLs of a ModelAdmin_CollectionController object

23 January 2009 at 5:52am
Hello silverstripe world!
I have done thoses two class:
class Exhibition extends DataObject
{
static $db = array('label' => 'Text');static $has_many = array('events' => 'Event');
public function __construct()
{
parent::__construct();
}
}and :
class Event extends DataObject
{
static $db = array(
'start_date' => 'Date',
'end_date' => 'Date'
);static $has_one = array('exhibition' => 'Exhibition','country' => 'Country');
static $has_many = array('business_date_countries' => 'BusinessDateCountry','event_towns' => 'EventTown');static $summary_fields = array(
'start_date', 'end_date'
);public function __construct()
{
parent::__construct();}
}I can create records for exhibitions and events pretty well, but when i use the search listing option, the number of rows is correct but they are all empty ! and if i try to click over one of them i got a "BAD REQUEST" and " I can't handle sub-URLs of a ModelAdmin_CollectionController object" error messages;
Is somebody could have an idea ?...
Regards
-
Re: I can't handle sub-URLs of a ModelAdmin_CollectionController object

24 January 2009 at 5:44am
I have found the answer :
It was this portion of code that made troubles :
public function __construct()
{
parent::__construct();}
It's not needed so I cut it off and it's ok now.
Regards
| 1954 Views | ||
|
Page:
1
|
Go to Top |

