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.

Archive /

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

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

Forum pages messing up


Reply


3 Posts   1416 Views

Avatar
grilldan

Community Member, 135 Posts

2 October 2008 at 6:32pm

Edited: 02/10/2008 6:33pm

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?

Avatar
Willr

Forum Moderator, 5513 Posts

3 October 2008 at 6:07pm

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

Avatar
grilldan

Community Member, 135 Posts

4 October 2008 at 12:26pm

Edited: 04/10/2008 12:44pm

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.