Login | Forgot password | Register

X

What is OpenID?

OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.

With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.

For more information visit the official OpenID site.

Jump to:

17478 Posts in 4473 Topics by 1972 members

Archive

SilverStripe Forums » Archive » Blog module and FirstParagraph - BUG?

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

Page: 1
Go to End
Author Topic: Blog module and FirstParagraph - BUG? 1025 Views
  • Aaron
    avatar
    Community Member
    63 posts

    Blog module and FirstParagraph - BUG? Link to this post

    Possible bug with the current nightly build and SS 2.2.2 fresh install.

    This only applies when BlogEntry::allow_wysiwyg_editing(); is included in _config.php

    Line 111 of BlogEntry.php - ParagraphSummary Method

    function ParagraphSummary(){
          if(self::$allow_wysiwyg_editing) {
             return $this->obj('Content')->FirstParagraph('html');
          } else {
             $parser = new BBCodeParser($this->Content);
             $html = new HTMLText('Content');
             $html->setValue($parser->parse());
             return $html->FirstParagraph('html');
          }
       }

    $this->obj('Content')->FirstParagraph('html') doesn't appear to return the first paragraph at all? Seems to work fine when wysiwyg is disabled.


    Problem with the FirstParagraph method?

  • Aaron
    avatar
    Community Member
    63 posts

    Re: Blog module and FirstParagraph - BUG? Link to this post

    Ah, comment above FirstParagraph method in sapphire/core/models/fieldtypes/Text.php

    /**
        * Caution: Not XML/HTML-safe - does not respect closing tags.
        */

  • Sam
    avatar
    Administrator
    649 posts

    Re: Blog module and FirstParagraph - BUG? Link to this post

    This issue is being tracked here: http://open.silverstripe.com/ticket/2547

  • Garrett
    avatar
    Community Member
    149 posts

    Re: Blog module and FirstParagraph - BUG? Link to this post

    Thank you VERY MUCH for this thread-- this was VERY helpful to me, as I had the same problem myself after enabling HTML in the Blog Entries.

    //Garrett

    1025 Views
Page: 1
Go to Top

Currently Online: There is nobody online.

Welcome to our latest member: GreenWork

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

Comments on this website? Please give feedback.