We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

XHTML field formatting in 2.5.4 versus 3.5.2

How Do I?

SPC-Lesli's avatar
SPC-Lesli
30 posts
8 years ago
SPC-Lesli's avatar SPC-Lesli

Hi all,

I just noticed: when I have a field (textarea, generally) and set it to “XHTML” in the Edit Entry field, it no longer automatically encloses paragraphs in P tags, like it used to in EE 2.5.x (and, I think, EE 3.3.4)

Has anyone else noticed this? Is this an actual problem with EE, or do I need to go reformat all of my fields where I just typed in text but did not include any HTML formatting -=in=- the fields?

Example URL: http://www.sparklecrackcentral.com/such/obsessive/addictions/femme_fatale_cosmetics_narnia_collection

The first paragraph of text should be enclosed in P tags - its field is set to “XHTML.” But looking at the page itself, the paragraph styling is not there…because, when viewing the source, the enclosing P tags aren’t put in place.

       
Derek Jones's avatar
Derek Jones
7,561 posts
8 years ago
Derek Jones's avatar Derek Jones

What is the field type of this custom field, and can you paste into a code block here the exact content as entered into the publish page? Thanks!

       
SPC-Lesli's avatar
SPC-Lesli
30 posts
8 years ago
SPC-Lesli's avatar SPC-Lesli

The fieldtype is textarea. Default formatting is None, but I have the field set so that I can override this default setting when I choose.

The content pasted into the textarea for this entry, in the edit entry form, is just this text exactly as it appears here (no code entered into the field itself:)

I first saw the individual colors while browsing Femme Fatale’s site, and didn’t realize that they were part of a collection! I have two of the blushes and eight of the eyeshadows, and while I do like the highlighter, I think I may hold off on that one. (I have a lot of highlighters, and I don’t use them too often. I need to change that…) Silver Apple and Seven Lost Lords caught my attention first, followed by City Ruinous and Daughter of Eve. I initially decided against Glasswater and Wild Waste Lands…until I received the samples as order freebies, and swatched them. Glasswater reminds me of some of Silk Naturals’ discontinued Eye Lights duotone shadows, in that it shows more pink or gold than the baby blue base.

In EE 2.x, this fieldtype with that chosen formatting and that text would have rendered the following way:

I first saw the individual colors while browsing Femme Fatale’s site, and didn’t realize that they were part of a collection! I have two of the blushes and eight of the eyeshadows, and while I do like the highlighter, I think I may hold off on that one. (I have a lot of highlighters, and I don’t use them too often. I need to change that…) Silver Apple and Seven Lost Lords caught my attention first, followed by City Ruinous and Daughter of Eve. I initially decided against Glasswater and Wild Waste Lands…until I received the samples as order freebies, and swatched them. Glasswater reminds me of some of Silk Naturals’ discontinued Eye Lights duotone shadows, in that it shows more pink or gold than the baby blue base.

But in EE3.5.2, I’m not seeing the enclosing P tags.

       
Derek Jones's avatar
Derek Jones
7,561 posts
8 years ago
Derek Jones's avatar Derek Jones

Ah, looks like a bug, it’s not respecting your formatting override. I’ll dig in in a bit and see about a fix.

       
Derek Jones's avatar
Derek Jones
7,561 posts
8 years ago
Derek Jones's avatar Derek Jones

As a workaround, you can open system/ee/EllisLab/Addons/textarea/ft.textarea.php and change line 198 from:

$field_fmt =  $this->get_setting('field_fmt') ?: $this->row('field_ft_'.$this->field_id);

to:

$field_fmt =  $this->row('field_ft_'.$this->field_id) ?: $this->get_setting('field_fmt');
       
SPC-Lesli's avatar
SPC-Lesli
30 posts
8 years ago
SPC-Lesli's avatar SPC-Lesli

That appears to have done the trick! Thanks!!

When the next update rolls out I’ll watch to make sure that this is in place.

       
Derek Jones's avatar
Derek Jones
7,561 posts
8 years ago
Derek Jones's avatar Derek Jones

Just following up to mention that the underlying issue has been addressed for the next release, so you will not need to maintain this workaround.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.