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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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

Admin Console issue


Go to End


2 Posts   1161 Views

Avatar
K_T

Community Member, 8 Posts

9 August 2012 at 2:07am

Edited: 09/08/2012 2:21am

Hi All,

I have created a Simple tab in SS Admin below is the code

Days.php
<?php
class AddDays extends DataObject {

static $db = array(
'day_title' => 'Varchar(100)',
'day_date' => 'Date'
);

static $searchable_fields = array(
'day_title'
);

static $summary_fields = array(
'day_title',
'day_date',

);

}
?>

and for Admin

<?php
class DayAdmin extends ModelAdmin {

public static $managed_models = array(
'AddDays '
);

static $url_segment = 'daylocator';
static $menu_title = 'Add Days';

}
?>

fine upto this point I can add the Days from Admin as well but when i try to delete the data I got this warning message

Deprecated: Function ereg_replace() is deprecated in /sapphire/core/control/Director.php on line 494
Number of elements must be positive ......
EDIT:Forgot to mention I am a PHP beginner

Any Hints why is it behaving so

Thanks in Advance
K_T

Avatar
K_T

Community Member, 8 Posts

9 August 2012 at 5:37pm