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.

Customising the CMS /

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

SideReport deprecated in 2.4?


Go to End


4 Posts   1010 Views

Avatar
suntrop

Community Member, 141 Posts

31 July 2012 at 6:11am

I am trying to get a simple report (sheduled pages) in the side bar (not the Report tab).

But everything I try nothing works. In some cases the /admin/ won't show and displays a 404 instead and moastly I get this warning

Warning: SS_Report::register(): 'BlogShedule' is not a subclass of SS_Report in /path/file.php

Error comes when I add

mysite/_config.php

SS_Report::register("SideReport", "BlogShedule");

I defined my class as in the docs

mysite/code/CustomSideReport.php

class CustomSideReport_BlogShedule extends SideReport {

What is wrong? Is it still possible to add custom reports into the side bar?

Hope for some help.

Avatar
Willr

Forum Moderator, 5523 Posts

31 July 2012 at 8:52pm

You should now just extend SS_Report and you don't need to register reports, that now happens automatically.

Avatar
suntrop

Community Member, 141 Posts

2 August 2012 at 7:35pm

Thanks, but it seems your wrong. Unless I put into my _config.php

SS_Report::register('SideReport', 'CustomSideReport', 20);

… it doesn't show up in the report drop-down.

Anyway, now it's working fine :)

Avatar
Willr

Forum Moderator, 5523 Posts

2 August 2012 at 8:09pm

Oh sorry, my points referred to 3.0.