Jump to:

1016 Posts in 567 Topics by 309 members

Forum Module

SilverStripe Forums » Forum Module » Forum problem [User Warning] Line 1696

Discuss the Forum Module.

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

Page: 1
Go to End
Author Topic: 660 Views
  • Tina
    Avatar
    Community Member
    2 Posts

    Forum problem [User Warning] Line 1696 Link to this post

    When I click General Discussion page, the problem coming

    [User Warning] Forum::ForumHolderURLSegment is deprecated. Please use Forum::ForumHolderLink() instead which works with nested URLs.
    GET /ss/forums/general-discussion/

    Line 1696 in C:\web\ss\widget_forum\code\Forum.php
    ------------------------------------------------------------------------------------------

    Source:
    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.widget_forum.templates.Layout.Forum.ss
    include(C:\WINDOWS\Temp\silverstripe-cacheC--web-ss\.cache.widget_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
    ---------------------------------------------------------------------------------------------------------

    I want to use $link insteads of $ForumHolderURLSegment, but I cannot find $ForumHolderURLSegment in C:\Windows\Temp\silverstripe-cacheC--wamp-www-*******\.cache.forum.templates.Layout.Forum.ss

  • Willr
    Avatar
    Forum Moderator
    5464 Posts

    Re: Forum problem [User Warning] Line 1696 Link to this post

    The template in question is yoursite/widget_forum/templates/Layout/Forum.ss by the looks of it.

  • Tina
    Avatar
    Community Member
    2 Posts

    Re: Forum problem [User Warning] Line 1696 Link to this post

    Thanks Willr, here is content in my /widget_forum/templates/Layout/Forum.ss

    ----------------------------------------------------------------------------------------------------

    <div id="Forum">
       <% include ForumHeader %>

       $Content
       <% if ForumAdminMsg %>
          <p id="ForumAdminMsg">$ForumAdminMsg</p>
       <% end_if %>
       
       <% if ForumPosters = NoOne %>
          <p class="message error"><% _t('READONLYFORUM', 'This Forum is read only. You cannot post replies or start new threads') %></p>
       <% end_if %>
       <% if CheckForumPermissions(starttopic) %>
          <p><a href="{$Link}starttopic" title="<% _t('NEWTOPIC','Click here to start a new topic') %>"><img src="forum/images/forum_startTopic.gif" alt="<% _t('NEWTOPICIMAGE','Start new topic') %>" /></a></p>
       <% end_if %>
       <div class="forumHolderFeatures">
          <% if StickyTopics %>
             <table id="StickyTopiclist" class="topicList" summary="List of sticky topics in this forum">
                <tr class="category"><td colspan="3"><% _t('ANNOUNCEMENTS', 'Announcements') %></td></tr>
                <% control StickyTopics %>
                   <% include TopicListing %>
                <% end_control %>
             </table>
          <% end_if %>
          <table id="TopicList" class="topicList" summary="List of topics in this forum">
             <tr class="category"><td colspan="4"><% _t('THREADS', 'Threads') %></td></tr>
             <tr>
                <th class="odd"><% _t('TOPIC','Topic') %></th>
                <th class="odd"><% _t('POSTS','Posts') %></th>
                <th class="even"><% _t('LASTPOST','Last Post') %></th>
             </tr>
             <% if Topics %>
                <% control Topics %>
                   <% include TopicListing %>
                <% end_control %>
             <% else %>
                <tr>
                   <td colspan="3" class="forumCategory"><% _t('NOTOPICS','There are no topics in this forum, ') %><a href="{$Link}starttopic" title="<% _t('NEWTOPIC') %>"><% _t('NEWTOPICTEXT','click here to start a new topic') %>.</a></td>
                </tr>
             <% end_if %>
          </table>

          <% if Topics.MoreThanOnePage %>
             <div class="typography">
                <p>
                   <% if Topics.PrevLink %><a style="float: left" href="$Topics.PrevLink">   &lt; <% _t('PREVLNK','Previous Page') %></a><% end_if %>
                   <% if Topics.NextLink %><a style="float: right" href="$Topics.NextLink"><% _t('NEXTLNK','Next Page') %> &gt;</a><% end_if %>
                   
                   <% control Topics.Pages %>
                      <% if CurrentBool %>
                         <strong>$PageNum</strong>
                      <% else %>
                         <a href="$Link">$PageNum</a>
                      <% end_if %>
                   <% end_control %>
                </p>
             </div>
          <% end_if %>
          
       </div>
       <% include ForumFooter %>
    </div>

    660 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.