Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2022-03-31 07:50:55
- hildebruns
- Member
- Registered: 2009-03-10
- Posts: 35
Breaks in body_html
Hi,
I have “Leave text untouched” in the publish settings. Now when I save an article, <br> are automatically displayed. In the database, I saw that there are <br> elements in the “body_html” field. It shouldn’t be like that, should it? TXP 4.8.7
Last edited by hildebruns (2022-03-31 07:51:38)
Offline
Re: Breaks in body_html
Do i understand correctly, you see some <br>
displayed when viewing the article from the public side? That should not happen with the setting you mention, unless you inserted them manually.
Does turning ‘ON’ debug mode (Preferences > Site) reveals anything?
Do you happen to use plugins that might interact with the content of the <textarea />
on the Write tab?
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Breaks in body_html
I had a similar but opposite problem recently in the textile enabled excerpt field where textile was not recognised and I had to use html tags to produce the result.
This did not work
_Sublime/Internal/Subliminal_
neither did this
_Sublime/Internal/Subliminal_
but this did
<em>Sublime/Internal/Subliminal</em>
php v7.4.25
txp v4.8.8
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Breaks in body_html
Colak –
That is odd too. And it works perfectly fine here.
PHP 8 and 8.1 with Textpattern 4.8.8.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Breaks in body_html
phiw13 wrote #333037:
Colak –
That is odd too. And it works perfectly fine here.
PHP 8 and 8.1 with Textpattern 4.8.8.
gremlins:)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#6 2022-04-04 04:30:27
- hildebruns
- Member
- Registered: 2009-03-10
- Posts: 35
Re: Breaks in body_html
phiw13 wrote #333034:
Do i understand correctly, you see some
<br>
displayed when viewing the article from the public side? That should not happen with the setting you mention, unless you inserted them manually.
Yes, a <br> will be inserted automatically. I assume this is normal for the “Convert line breaks” setting. But with “leave text untouched” it should remain empty.
Does turning ‘ON’ debug mode (Preferences > Site) reveals anything?
No, same problem.
Do you happen to use plugins that might interact with the content of the <textarea /> on the Write tab?
Yes, but I disabled the plugin and it’s the same problem.
I have updated Textpattern to Version 4.8.8., PHP Version 7.0.33
Offline
Re: Breaks in body_html
Just checking, but I presume the formatting for the article in question hasn’t been overridden to Convert line breaks?
I tested it on the online demo and couldn’t make it happen. I wondered if the formatting in body_html was left over from an earlier article setting, but from testing it does seem that saving with Leave text untouched also resets Body_html
:
To test that on the online demo (4.8.8) site I added:
<txp:php>
global $thisarticle;
$Body=safe_field("Body_html", 'textpattern', "`ID`= ". $thisarticle['thisid']);
echo '<pre><code>' . htmlspecialchars($Body) . '</code></pre>';
</txp:php>
after <txp:body />
in the Default form, and then tried two articles with Leave text untouched and Convert line breaks and then tried switching back between them. The output of Body_html
is overwritten.
TXP Builders – finely-crafted code, design and txp
Offline
Re: Breaks in body_html
Yes, but I disabled the plugin and it’s the same problem.
Did you save the article again after disabling the plugin (eventually after changing something, however minimal)? That would I think, rewrite body_html
in the DB.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Offline
#10 2022-04-05 07:36:24
- hildebruns
- Member
- Registered: 2009-03-10
- Posts: 35
Re: Breaks in body_html
Now I have the solution. I had set the “Leave text untouched” setting after writing articles. At the same time I had hidden the format setting in the article. So I still had the old format setting in the existing articles. Many thanks for the help!
Offline
Re: Breaks in body_html
OMG – Thank you for solving a completely different problem for me.
I’ve been having an extra <BR> on each paragraph in my articles for years, after I upgraded hak_tinymce. I eventually decided to just live with it.
Now that I changed the setting to “Leave text untouched” on Prefs, all is good now.
Offline
Pages: 1