3

I have a text field with formatting set to "none". In the database, the data for that field is stored exactly as it should be: as plain text with no html tags.

When I drop the field tag into my template, however, the data is output with <p> tags wrapped around it. Here's an example of a really simple channel entries loop I ran in a test template and got the same result:

{exp:channel:entries
  channel='videos'
  limit='1'
  require_entry='yes'
  disable='category_fields|member_data|pagination'
  status='not closed'
}
  {video_url}
{/exp:channel:entries}

This output:

<p>http://myaccount.wistia.com/medias/12345</p>

The site is EE 2.6.1 and I can't upgrade the version at the moment, so suggestions on how to troubleshoot this manually are appreciated. I'm not afraid to run some DB queries if necessary. Thanks!

2 Answers 2

12

Sounds like the field's settings have gotten mixed up at some point.

I'd try switching the field to "XHTML" formatting, and select the option to "Update all existing channel entries with your new formatting choice?".

Once that's done, then switch back to "None" formatting and update all existing again.

Hopefully that will resolve for you.

1
  • 1
    Yup, good call. I always assumed that the formatting was hard-coded into the data cell, but I guess EE adds it dynamically?
    – kmgdev
    Oct 30, 2013 at 0:00
0

You can use the Hacksaw addon in your template to remove the formatting.

{exp:eehive_hacksaw}
  {video_url}
{/exp:eehive_hacksaw}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.