Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2019-08-24 15:32:11

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 253
Website

Textile does not output

I encounter this strange issue with Textpattern version 4.7.3:

  1. In the Preferences Use Textile is set.
  2. In the article, Format is set as Use Textile.
  3. Previously input Textile works fine.
  4. But when I edit and save an article, Textile (including the previously input Textile) is not transformed into html.
  • Has this been encountered before?
  • Any idea what might be happening, why and how it can be fixed?

Last edited by Kjeld (2019-08-25 00:47:44)


JapaneseStreets.com – Japanese street fashion (mostly txp)
Old Photos of Japan – Japan between 1860 and 1940 (100% txp)
MeijiShowa – Stock photos of Japan between 1860 and 1940 (100% txp)

Offline

#2 2019-08-24 21:10:57

code365
Member
From: California
Registered: 2009-08-16
Posts: 45

Re: Textile does not output

In your article, top right it say format that should be selected to Use Textile.

Offline

#3 2019-08-25 00:46:10

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 253
Website

Re: Textile does not output

code365 wrote #319127:

In your article, top right it say format that should be selected to Use Textile.

Thank you for your feedback. In the article, Format is also set as Use Textile.

The issue appears to be something less probable.


JapaneseStreets.com – Japanese street fashion (mostly txp)
Old Photos of Japan – Japan between 1860 and 1940 (100% txp)
MeijiShowa – Stock photos of Japan between 1860 and 1940 (100% txp)

Offline

#4 2019-08-25 04:30:47

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,288
Website

Re: Textile does not output

The debugging production status in the preferences also works for the back end. Did you try switching it on and checking the page source before and after saving an article? It might reveal something.

Also what version of php is your site on? You can find that on Admin>Diagnostics.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

#5 2019-08-25 05:38:29

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 253
Website

Re: Textile does not output

colak wrote #319132:

The debugging production status in the preferences also works for the back end. Did you try switching it on and checking the page source before and after saving an article? It might reveal something.

Also what version of php is your site on? You can find that on Admin>Diagnostics.

Thanks, Yiannis. I wasn’t aware that debugging also works for the back-end.

After saving an article I get the following error (the exact same copy 4 times in a row below the article):

General error 16384: Parser::textileThis() is deprecated. Use Parser::parse() instead. on line 2033
textpattern/vendors/Netcarver/Textile/Parser.php:2033 trigger_error()
textpattern/lib/txplib_misc.php(1870) : eval()'d code:1129 Netcarver\Textile\Parser->textileThis()
textpattern/lib/txplib_misc.php(1870) : eval()'d code:1413 adi_notes_read()
textpattern/lib/txplib_misc.php:1989 adi_notes_embed_note()
textpattern/lib/txplib_misc.php:2189 callback_event()
textpattern/lib/txplib_html.php:87 pluggable_ui()
textpattern/index.php:260 end_page()

I am using PHP version 7.2.12.

UPDATE:

Checking the forum, I found this error seems to be related to the plugin adi_notes. You commented on this error earlier this year, Yiannis. Not sure if this error is actually related to my issue.

Last edited by Kjeld (2019-08-25 08:13:15)


JapaneseStreets.com – Japanese street fashion (mostly txp)
Old Photos of Japan – Japan between 1860 and 1940 (100% txp)
MeijiShowa – Stock photos of Japan between 1860 and 1940 (100% txp)

Offline

#6 2019-08-25 13:21:13

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,288
Website

Re: Textile does not output

Just to be safe. Do you have adi_nots installed and did you update it? At the thread you pointed, adi is linking to v1.4 beta of the plugin which solved the problem there.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

#7 2019-08-25 21:16:05

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 253
Website

Re: Textile does not output

colak wrote #319134:

Just to be safe. Do you have adi_nots installed and did you update it? At the thread you pointed, adi is linking to v1.4 beta of the plugin which solved the problem there.

Thanks, Yiannis. That takes care of the error messages.

But the Textile issue persists.

I found the culprit!

When I enter raw html in Body in a certain way, it removes the <p> tags, and Textile stops converting.

This works:

Tokkotai (suicide squad or _kamikaze_) pilot during WWII, photographed in Tottori in July 1945.

<br /><br />

IMPORTANT
Maximum file size: 18.1M (3008 x 1970 pixels @ 300dpi)

In this case, Textile does not convert (and the <p> tags are removed):

Tokkotai (suicide squad or _kamikaze_) pilot during WWII, photographed in Tottori in July 1945.
<br /><br />
IMPORTANT
Maximum file size: 18.1M (3008 x 1970 pixels @ 300dpi)

I can easily test whether the <p> tags are there by clicking on the HTML tab in Write.

Perhaps, something in my coding interferes.
Or is this something that can be replicated?


JapaneseStreets.com – Japanese street fashion (mostly txp)
Old Photos of Japan – Japan between 1860 and 1940 (100% txp)
MeijiShowa – Stock photos of Japan between 1860 and 1940 (100% txp)

Offline

#8 2019-08-26 09:39:34

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,288
Website

Re: Textile does not output

Kjeld wrote #319136:

Thanks, Yiannis. That takes care of the error messages.

But the Textile issue persists.

I found the culprit!

When I enter raw html in Body in a certain way, it removes the <p> tags, and Textile stops converting.

This works:

Tokkotai (suicide squad or _kamikaze_) pilot during WWII, photographed in Tottori in July 1945....

In this case, Textile does not convert (and the <p> tags are removed):

Tokkotai (suicide squad or _kamikaze_) pilot during WWII, photographed in Tottori in July 1945....

I can easily test whether the <p> tags are there by clicking on the HTML tab in Write.

Perhaps, something in my coding interferes.
Or is this something that can be replicated?

Did you try?

Tokkotai (suicide squad or _kamikaze_) pilot during WWII, photographed in Tottori in July 1945.

 <br /><br />

IMPORTANT
Maximum file size: 18.1M (3008 x 1970 pixels @ 300dpi)

Notice the space before the first <br /> tag


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

#9 2019-08-26 10:21:00

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 253
Website

Re: Textile does not output

colak wrote #319142:

Did you try?

Tokkotai (suicide squad or _kamikaze_) pilot during WWII, photographed in Tottori in July 1945....

Notice the space before the first <br /> tag

Thanks, Yiannis. You always have interesting notes, suggestions and questions!
Tried your suggestion and it works.

I also tried space before html, but no lines above and below (see below). txp then automatically adds lines above and below <br /><br /> and removes the space after saving. It doesn’t remove the space when there are lines above and below from the beginning…

Tokkotai (suicide squad or _kamikaze_) pilot during WWII, photographed in Tottori in July 1945.
 <br /><br />
IMPORTANT
Maximum file size: 18.1M (3008 x 1970 pixels @ 300dpi)

Do you know if this is meant to work this way? It is counter-intuitive.

EDITED

I also tried space before html, but no lines above and below (see below). txp then automatically adds lines above and below <br /><br /> and removes the space after saving. It doesn’t remove the space when there are lines above and below from the beginning…

It sometimes does this, and it sometimes doesn’t, I just noticed. Haven’t found a pattern yet…

Last edited by Kjeld (2019-08-26 10:34:39)


JapaneseStreets.com – Japanese street fashion (mostly txp)
Old Photos of Japan – Japan between 1860 and 1940 (100% txp)
MeijiShowa – Stock photos of Japan between 1860 and 1940 (100% txp)

Offline

#10 2019-08-26 14:24:50

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,288
Website

Re: Textile does not output

It has to do with how textilie works. Unless another textile tag is added such as the h2 tag, sentences are always wrapped with the p tag. If you do not want the p tag, you should start with a single space preceded by an empty line. textile-lang.com/ is an excellent reference where you can also test your usage of textile using editable textfields, to make sure that your textile is behaving as intended.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

Board footer

Powered by FluxBB