Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Forum pages messing up

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1360 Views
  • grilldan
    Avatar
    Community Member
    135 Posts

    Forum pages messing up Link to this post

    For some reason, on my "Forum" posts, the HolderAbstract shows the html code, instead of what the html code does. Example, "<p>" becomes "&lt;p&gt;".

    It should show up like (it shows up correctly on pages where there aren't posts):

    If this is your first visit, you will need to register before you can post. However, you can browse all messages below.

    It is showing up as:

    <p>If this is your first visit, you will need to <a href="ForumMemberProfile/register" title="Click here to register">register</a> before you can post. However, you can browse all messages below.</p>

    Forum <-- shows up correct
    ---Forum 1 <-- shows up correct
    ------Topic 1 <-- shows up wrong
    ------Topic 2 <-- shows up wrong

    I have tried changing how they are stored in the database from Text, to varchar, and htmltext.

    I have also tried changing ForumHeader.ss on line 29.

    <% if Abstract %>$Abstract<% else %>$Content<% end_if %>


    I tried: $Abstract.RAW, $Content.RAW, $Abstract.HTML, $Content.HTML

    Any ideas?

  • Willr
    Avatar
    Forum Moderator
    5490 Posts

    Re: Forum pages messing up Link to this post

    Try the latest version on dailybuild.silverstripe.com I thought I fixed this issue a couple weeks ago

  • grilldan
    Avatar
    Community Member
    135 Posts

    Re: Forum pages messing up Link to this post

    Could you tell me (or point me in the right direction) the changes you made to fix it? I am using a heavily modified version of the forum, and I would hate to have to redo the modifications.

    In the mean time, I will download the daily build, and see if I can figure it out.

    **update**

    forum.php
    line 1504
    change function to:

       function getAbstract() {
          $abstract = DataObject::get_one("ForumHolder")->HolderAbstract;
          $output = new HTMLText('Abstract');
          $output->setValue($abstract);
          return $output;
       }

    Works awesome Thank you.

    1360 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.