Go to main content

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: 446
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)


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

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

code365
Member
From: California
Registered: 2009-08-16
Posts: 110
Website

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: 446
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.


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

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

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

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 | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

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

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 446
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)


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

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

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

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 | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

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

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 446
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?


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

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

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

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 | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

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

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 446
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)


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

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

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

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 | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#11 2019-08-26 14:32:36

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

Re: Textile does not output

colak wrote #319144:

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.

It didn’t behave like this until I updated to the latest version of txp…

The issue now is that when I use raw html, sentences are not wrapped with the p tag unless I use the extra lines above and below.


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#12 2019-08-26 14:56:39

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,578
Website

Re: Textile does not output

There has, I believe, been a more recent change where it’s no longer necessary to put a space at the beginning of the line to disable textile if a line begins with a tag bracket. That use case should now work without the extra space. I think this was to make it easier to use txp::shortcodes in the body field.

Otherwise the preceding space acts like notextile.{space}.

However, you always did need a blank line to prompt a new <p> tag between paragraphs; a regular line-break produces just a br tag.


TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB