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.

Forum Module

Discuss the Forum Module.

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

Notice: Controller::currentController() is deprecated...


Go to End
Reply

12 Posts   3314 Views

Avatar
burgessb

31 January 2009 at 11:46am (Last edited: 1 February 2009 4:46pm), Community Member, 17 Posts

I'm getting the following message at the top of my forum page:

Notice: Controller::currentController() is deprecated. Use Controller::curr() instead. in /public_html/mysite.com/silverstripe/sapphire/core/control/Controller.php on line 367

Any suggestions on how to get rid of this???

Thank you for your time...

Avatar
UncleCheese

31 January 2009 at 5:02pm (Last edited: 31 January 2009 5:04pm), 4085 Posts

Do you have a script that's using Controller::currentController()? If so, change it to Controller::curr().

Otherwise, it's a low level error, so just turn down your error reporting and wait for SS to update their codebase. That method has been deprecated for only one release.

Avatar
Carbon Crayon

1 February 2009 at 4:03am Community Member, 598 Posts

you just needed to change line 155 of Forum.php to 'Controller::curr()' instead of 'Controller::CurrentController().'

Avatar
burgessb

1 February 2009 at 4:00pm Community Member, 17 Posts

Thanks aram! It worked!

Avatar
burgessb

1 February 2009 at 4:51pm Community Member, 17 Posts

Well, aram's solution fixed part of the problem, but now when you click on an entry within a topic, the page is completely blank. The error log says that the file does not exist, but I've clearly saved and published it from the cms. Anyone have a solution?

Thanks!

Avatar
Willr

2 February 2009 at 3:27pm Forum Moderator, 5511 Posts

Sounds like you are using 0.1 of the forum, this was designed with SilverStripe 2.1 support and is buggy in 2.2 and 2.3. I recommend you download the latest dailybuild from the forum download page

Avatar
burgessb

2 February 2009 at 3:54pm Community Member, 17 Posts

Will,
Forgive me for my ignorance, but are you talking about the link underneath the "Latest Build" header in the bottom right hand corner as opposed to using the "Download" link box at the top?

Avatar
Willr

2 February 2009 at 4:04pm Forum Moderator, 5511 Posts

Correct. The next version of the forum (same as this forum) is just about to be released so using the 'Latest Build' is recommended - It should work perfectly with SilverStripe 2.3

Go to Top