All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Low Variables: Textarea (Rich Text) strips out all tags on Save Changes

Clive Portman 7 Aug 2013 06:56 problem, complete

Enter text as normal within the field, heading and paragraph tags are there when I view the code. Then hit Save Changes and all the tags are stripped out leaving all the text in one lump.

I wouldn't be surprised if it's yet another problem with the native RTE, but thought I should start here seeing as it's within Low Variables.

Thanks,
Clive

Replies

  1. Low 7 Aug 2013 07:21

    Could be an RTE thing. But first things first; what are your LV and EE versions?

  2. Clive Portman 7 Aug 2013 07:25

    Quick response! EE is 2.6.1 and Low Variables is 2.3.5

  3. Low 7 Aug 2013 07:46

    I'm getting the same behaviour in LV and in the native Publish Form with a simple bit of HTML. The data seems OK before calling the native RTE method to prep the data for saving, but that method messes it up, so it seems.

    What's the HTML you're using?

  4. Clive Portman 7 Aug 2013 09:45

    some text<br> 
    some text

    and
    <p>some text</p> 
    <p>some text</p>

    both failed and were saved as:
    some textsome text

  5. Low 7 Aug 2013 09:46

    And are you able to get the correct results when using the RTE in the native Publish Form?

    Clive Portman 7 Aug 2013 10:09

    Hi, yes. It seems to be fine in the native Publish Form.

    Low 7 Aug 2013 10:10

    Which browser are you using?

  6. Low 7 Aug 2013 10:12

    Can you try the following... Open up /low_variables/types/low_rte/vt.low_rte.php and look up line #128. Change that from:

    form_prep($var_data, $field_id);


    to

    $var_data = form_prep($var_data, $field_id);


    Does that help?

    Clive Portman 7 Aug 2013 11:44

    No, it makes no difference. I'm using Firefox 22.
    If it helps, I've used these fixes for other problems with the RTE:
    https://support.ellislab.com/bugs/det...
    https://support.ellislab.com/bugs/det...

  7. Low 7 Aug 2013 13:17

    Okay then, try this. Open the same file, look up line #121. Change that from:

    'field_fmt'            => 'none'


    to

    'field_fmt'            => 'xhtml'

  8. Clive Portman 7 Aug 2013 13:25

    Hmm. It's being saved okay now, but not appearing on the front end.

    Correction: It's not saving correctly:

    If I just have some (p) tags, they save, but they aren't output on the front end.
    If I use a (h1) tag, it is saved but any following (p) and (br) tags are stripped when it is saved. The (h1) tag is output on the front end.

  9. Low 7 Aug 2013 13:39

    Looks like EllisLab changed the output from being full on html in the data field to having the text raw and converting it on the fly.

    I can send you a patched file. Drop me an email at hi at gotolow dot com.

  10. Low 7 Aug 2013 14:30

    The patched file seemed to fix the issue. I'll roll that into the next version of LV.

    Other formatting issues are due to the native RTE field, and will most likely be fixed in the upcoming version of EE.

  11. Clive Portman 7 Aug 2013 15:24

    Thanks for your support, Low.
    Clive

  12. thatdeadpixel 19 May 2014 16:48

    I had this same issue with EE 2.8.1 and LV 2.5.0. Tried using the Textarea and Textarea (Rich Text) fields and it would strip my line breaks and paragraph tags out on the front end. Not a huge deal as I ended up using Wygwam, but just FYI.

  13. Low 19 May 2014 22:08

    Mike, are you using the Tag syntax for output, ie: {exp:low_variables:single var="my_rte_var"}? Because that is required.

  14. thatdeadpixel 20 May 2014 13:40

    Ah, don't think I was, I'll give it a shot. Thanks!