ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Extra Empty paragraph tags rendered in template from rich-text field

May 30, 2013 3:34pm

Subscribe [7]
  • #1 / May 30, 2013 3:34pm

    transomlabs

    4 posts

    I have a field with type Textarea (Rich-Text) selected.

    Originally I was having issues with disappearing spaces around anchor tags, but I was able to fix that by adding this code to line 81 of the file ft.rte.php as instructed in another forum post:

    'text_format' => 'xhtml',

    However, after that, when the field is rendered in the template it adds an additional empty paragraph tag

     

    I’ve seen lots of posts complaining about this but none of the solutions offered seems to work.

    Can we get a clear answer as to what is causing these bugs and how to fix them?

  • #2 / May 30, 2013 3:56pm

    transomlabs

    4 posts

    Forgot to mention I’m running EE version: 2.6.1 - not many plugins, Structure, low-reorder, etc.

     

  • #3 / May 31, 2013 2:34pm

    thejame

    24 posts

    Check out this thread in regards to your spaces issue - I’m not sure about the empty paragraph tags though. I have the same problem and it’s driving me mad.
    http://ellislab.com/forums/viewthread/235649/

    EE 2.6.1

  • #4 / Jun 21, 2013 11:28am

    strudel

    195 posts

    I’m having a similar problem, although I’m not getting paragraph tags, I’m getting like 4 paragraph break at the end of the text. The RTE isn’t usable this way. I did check out http://ellislab.com/forums/viewthread/235649/ and that solved one problem, but this other issue just isn’t good….

    Anyone from EE looking into this?

  • #5 / Jun 28, 2013 7:30pm

    thejame

    24 posts

    Ok this is driving me crazy now - I literally change the text and Submit the form to update the entry and it strips out my P and BR tags by the time it’s showing me the changed preview window!  I then click “Edit This Entry” to find my code has been removed and make the changes again, only to lose them once more.

    PLEASE PLEASE - anyone have a fix for this or I am just a screwed Core user?

  • #6 / Jun 30, 2013 2:29pm

    R Gruyters

    14 posts

    Same problem here. Still after patch it adds empty paragraphs. Unusable for clients.

  • #7 / Jul 14, 2013 4:46pm

    atelier2

    181 posts

    I know nothing of ‘patches’.
    But I think it is really strange that the native EE RTE solution just inserts

     

    after each field in my template. It brakes my design, client not happy.
    I’ll look for another solution, but that costs, although little. But still, hard to sell to my client.

    Is this being solved soon?

    Do the tech of EE read this forum?

  • #8 / Jul 19, 2013 12:42pm

    ThePigeonHold

    8 posts

    Having the same problem here. Any movement on this?

  • #9 / Jul 19, 2013 12:59pm

    strudel

    195 posts

    I don’t see any movement on this issue unfortunately — though I wish there were!

    In the meantime, since I had a project I had to finish, I started using Expresso which is reasonably priced and seems to do the job for me.

    But really, I wish someone at Ellis Lab would browse through now and then just to give an update at least on this issue. I mean, it is a commercial product with a broken piece….

  • #10 / Jul 19, 2013 1:06pm

    ThePigeonHold

    8 posts

    Thanks for the heads-up, strudel. We’ll look into it right away.

  • #11 / Aug 05, 2013 7:31pm

    DigitalDoctors

    76 posts

    ** Edit: See below for a better solution **

    I’ve had this problem on 2.6.1 as well.  I fixed it by going into /system/codeigniter/system/libraries/Typography.php and changing line 236 from:

    $table['##'] = ' ';

    to

    $table['##'] = '';

    I give no guarantees that this won’t cause any unforeseen problems!

  • #12 / Aug 05, 2013 8:18pm

    DigitalDoctors

    76 posts

    I wasn’t really happy with my way of doing it above (1. it felt like fixing the problem but not the cause and 2. I didn’t know what else might be using that function), so I traced it back to where the call for that function is made and made to following change:

    In system/expressionengine/libraries/EE_Typography.php on line 407 change

    case 'xhtml' : $str = $this->auto_typography($str);

    to

    case 'xhtml' : $str = $this->auto_typography($str, true);

    By passing true in, we’re telling it to remove empty lines.  This isn’t like trimming it however, it will also remove empty p tags in the middle of a field, so if you rely on that for layout, this won’t help you.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases