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:

Forum Module /

Discuss the Forum Module.

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

Forum: a problem


Go to End


4 Posts   1131 Views

Avatar
RAEL70

Community Member, 8 Posts

20 February 2011 at 8:36pm

I installed the forum module and is perfectly visible but when I click on "General Discussion" (for example) I get this error:

Source

1687 *
1688 * @return bool Set to TRUE if the user is allowed to, to FALSE if they're
1689 * not
1690 */
1691 function canAttach() {
1692 return $this->CanAttachFiles ? true : false;
1693 }
1694
1695 function ForumHolderURLSegment() {
1696 trigger_error('Forum::ForumHolderURLSegment is deprecated. Please use Forum::ForumHolderLink() instead which works with nested URLs.', E_USER_WARNING);
1697 return $this->ForumHolderLink();
1698 }
1699
1700 /**
1701 * Get the forum holder's URL segment
1702 */

What's the problem?

Avatar
Willr

Forum Moderator, 5523 Posts

21 February 2011 at 9:25am

Something is calling ForumHolderURLSegment() which is outdated. In forum trunk you should use $Link where ever you need to generate a link. Do a search in your template for ForumHolderURLSegment or post the full backtrace which will show the caller

Avatar
RAEL70

Community Member, 8 Posts

22 February 2011 at 5:20am

Dear Willr, here the complete message:

Source
1687 *
1688 * @return bool Set to TRUE if the user is allowed to, to FALSE if they're
1689 * not
1690 */
1691 function canAttach() {
1692 return $this->CanAttachFiles ? true : false;
1693 }
1694
1695 function ForumHolderURLSegment() {
1696 trigger_error('Forum::ForumHolderURLSegment is deprecated. Please use Forum::ForumHolderLink() instead which works with nested URLs.', E_USER_WARNING);
1697 return $this->ForumHolderLink();
1698 }
1699
1700 /**
1701 * Get the forum holder's URL segment
1702 */
Trace
•trigger_error(Forum::ForumHolderURLSegment is deprecated. Please use Forum::ForumHolderLink() instead which works with nested URLs.,512)
Line 1696 of Forum.php
•Forum_Controller->ForumHolderURLSegment()
Line 369 of ViewableData.php
•ViewableData->obj(ForumHolderURLSegment,,,1,)
Line 411 of ViewableData.php
•ViewableData->cachedCall(ForumHolderURLSegment,)
Line 424 of ViewableData.php
•ViewableData->hasValue(ForumHolderURLSegment)
Line 133 of .cache.forum.templates.Layout.Forum.ss
•include(C:\Windows\Temp\silverstripe-cacheC--wamp-www-*******\.cache.forum.templates.Layout.Forum.ss)
Line 420 of SSViewer.php
•SSViewer->process(Forum_Controller,Zend_Cache_Frontend_Output)
Line 411 of SSViewer.php
•SSViewer->process(Forum_Controller)
Line 202 of Controller.php
•Controller->handleAction(SS_HTTPRequest)
Line 143 of RequestHandler.php
•RequestHandler->handleRequest(SS_HTTPRequest)
Line 147 of Controller.php
•Controller->handleRequest(SS_HTTPRequest)
Line 199 of ContentController.php
•ContentController->handleRequest(SS_HTTPRequest)
Line 184 of ContentController.php
•ContentController->handleRequest(SS_HTTPRequest)
Line 67 of ModelAsController.php
•ModelAsController->handleRequest(SS_HTTPRequest)
Line 282 of Director.php
•Director::handleRequest(SS_HTTPRequest,Session)
Line 125 of Director.php
•Director::direct(/forums/general-discussion/)
Line 127 of main.php

Where's the problem?

Avatar
Willr

Forum Moderator, 5523 Posts

22 February 2011 at 10:14pm

C:\Windows\Temp\silverstripe-cacheC--wamp-www-*******\.cache.forum.templates.Layout.Forum.ss)

That is where the error is coming from. Forum.css has a $ForumHolderURLSegment which it shouldn't. Find it and change it to $Link. Are you using the latest trunk?