Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2019-03-02 22:04:08

neptho
Member
From: A cold, dark place.
Registered: 2006-02-01
Posts: 40

Older style Textile parsing for 4.7.3?

Hi All,

Long time occasional. Very occasional. I saw that 4.7 was released, and decided I might need to upgrade my 4.6.x base.

Oh, the pain. The pain. I’ve kept my handful of used plugins running for the last decade – with various fixes and alterations every major subrevision, but having TXP refuse to render what it felt was improper code was an enormous slap in the face.

Yes, I will do a span within an li, thank you, ras_recent_articles has been doing that for the last decade and change.
Then, it didn’t like my spaghetti habit of both inline HTML and Textile. Why it was trying to parse an inline blob? I’m not so sure.

What would be necessary to make it just parse what I tell it as it has for the last decade?

Also, any suggestions on basic themes available that still work with 4? I’m still running Connections. Yeah, Connections. Everything I see something newer that I like, it’s too much of a pest to make work with my plugins, or I just don’t like how simple they are – single column with no search, no anchors, etc..

Offline

#2 2019-03-02 22:25:02

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,620
Website

Re: Older style Textile parsing for 4.7.3?

Sorry to hear about your woes. Sounds like it’s more a Textile/markup issue than Textpattern itself, but if things aren’t rendering at all then we’ll need to figure out why. Do you have some sample Textile+HTML you could post so we might be able to find out what’s wrong?

The Textile engine hasn’t changed so radically since 4.6. The Textpattern parser has been tightened but that should only affect your regular <txp:> tags if they are (for example) a mismatched pairing.

Downgrading Textile is difficult because the way the parser is accessed has changed recently so if you go back to an old version you need to also hack core accordingly. It’s far better to figure out why the markup is not being interpreted properly and fix it if possible.

Regarding ‘basic themes’ do you mean admin-side? There’s Sandspace by phiw13. Past that I don’t know. Depends what you want to achieve over and above what Hive provides. It does have optional features you can enable, which might help you.

It would also be handy to know your plugins list and some idea of how you use them. Many may be able to be replaced now with the enhanced power of the core tags in 4.7.

In short, please supply specifics and we might be able to help.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#3 2019-03-03 00:04:54

neptho
Member
From: A cold, dark place.
Registered: 2006-02-01
Posts: 40

Re: Older style Textile parsing for 4.7.3?

Howdy Bloke!

Thanks for your insight and thoughts. I’m sure there’s a simple way to stop it from ceasing the parse, but, for instance, here’s what I got from my li span class:

This page contains the following errors:
error on line 130 at column 179: Opening and ending tag mismatch: span line 0 and li

Then, it was gentle enough to complain about this HTML, which I don’t know why it was trying to parse it in the first place.. it wanted a ‘;’ somewhere,

<object width="148" height="44"><param name="movie" value="https://vocaroo.com/player.swf?playMediaID=s0DdntyNuDLP&autoplay=0"></param><param name="wmode" value="transparent"></param><embed src="https://vocaroo.com/player.swf?playMediaID=s0DdntyNuDLP&autoplay=0" width="148" height="44" wmode="transparent" type="application/x-shockwave-flash"></embed></object>

Of course, dropping back to 4.6.x will be fine for displaying current content, but I don’t really want to do that.

I was seeking external themes, really. I’ve been quite happy with the default admin theme for years, even if it did eventually get upgraded a bit on me.

Last edited by neptho (2019-03-03 00:05:53)

Offline

#4 2019-03-03 07:27:59

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,305
Website

Re: Older style Textile parsing for 4.7.3?

Hi for the code, try to add a space before it and put it between == like this :

==<object width="148" height="44"><param name="movie" value="https://vocaroo.com/player.swf?playMediaID=s0DdntyNuDLP&autoplay=0"></param><param name="wmode" value="transparent"></param><embed src="https://vocaroo.com/player.swf?playMediaID=s0DdntyNuDLP&autoplay=0" width="148" height="44" wmode="transparent" type="application/x-shockwave-flash"></embed></object>==

Offline

#5 2019-03-03 09:04:21

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,620
Website

Re: Older style Textile parsing for 4.7.3?

neptho wrote #316823:

Opening and ending tag mismatch: span line 0 and li

The new Txp parser is a lot less forgiving about tag and markup errors. If your code is not well-formed or there are unclosed tag pairs then it’ll complain to help you find them.

And as Dragondz says, to stop the Textile parser from interpreting the HTML then either surround it with double equals, put a couple of spaces before the opening tag or use notextile. in front of it.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#6 2019-03-03 10:00:24

etc
Developer
Registered: 2010-11-11
Posts: 3,127
Website

Re: Older style Textile parsing for 4.7.3?

neptho wrote #316823:

This page contains the following errors:
error on line 130 at column 179: Opening and ending tag mismatch: span line 0 and li

This actually does not look like a txp warning, but more like DOMDocument one (some plugin?). Textpattern parser checks only for <txp:tags /> markup validity, not HTML. Dunno for Textile, though.


etc_[ query | search | pagination | date | tree | cache ]

Offline

#7 2019-03-03 14:49:27

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,390
Website

Re: Older style Textile parsing for 4.7.3?

neptho wrote #316821:

Oh, the pain. The pain. I’ve kept my handful of used plugins running for the last decade …

Also, any suggestions on basic themes available that still work with 4? I’m still running Connections. Yeah, Connections. Everything I see something newer that I like, it’s too much of a pest to make work with my plugins, or I just don’t like how simple they are – single column with no search, no anchors, etc..

Would you care to share which plugins you’re using and still need? You’ve been around the forum for a long time and the connections theme dates back to 2008 or so. Since then, textpattern has been able to a lot more natively than it could back then. The connections theme, from what I can tell, is fairly standard main col + sidebar theme so must be fairly easy to reproduce in an up-to-date form.


TXP Builders – finely-crafted code, design and txp

Offline

#8 2019-03-03 15:23:42

neptho
Member
From: A cold, dark place.
Registered: 2006-02-01
Posts: 40

Re: Older style Textile parsing for 4.7.3?

Dragondz wrote #316824:

Hi for the code, try to add a space before it and put it between == like this:

I’ll have to figure out a regex; back before I threw away my homebrew CMS in favor of TXP, I pretty much just used pre tags and htmlentities() was implied. After TXP, I went full force into Textile, and over the years, kind of turned into a lazy hybrid of both. :D

etc wrote #316829:

This actually does not look like a txp warning, but more like DOMDocument one (some plugin?). Textpattern parser checks only for <txp:tags /> markup validity, not HTML. Dunno for Textile, though.

Thanks. I’ve got a couple 4.6.x compatible rebuilds that don’t like 4.7 at all, so I’ll have to dig through that sometime and fix it. I’ll admit that I stopped auditing the code before upgrading sometime around mid-4.5 days, except when I had to rebuild for 4.6.

jakob wrote #316835:

Would you care to share which plugins you’re using and still need?

The biggest reason for getting rid of Connections would be to get rid of my “13 year old plus design”. Although it works fine for what I’ve used it for, it’s very dated, and not horribly impressive. I absolutely refuse to rebuild everything as YAML and run some command line parser every time I want to post something, though.

What I’ve been using include fairly highly modified versions of the following – please pardon the direct C&P dump- I’m fighting 4.7.3 not recognizing that it is 4.7.3 after taking care of the prefs_id issue. These are actively used; there are a few more legacy ones installed:

lum_p	Lutz Möhrmann	0.3	Yes	Plugin helper library	No	5	Help
	pap_contact_cleaner	tranquillo	0.1	 	Prevent Spam through Zem Contact	Yes	5	Help
	phw_DTD	Philippe Wittenbergh	0.8	 	includes an xhtml1.1 doc type declaration application xhtml	Yes	5	Help
	rah_sitemap	Jukka Svahn	1.3.0	 	Build a valid advanced XML sitemap	Yes	5	Help | Options
	ras_recent_articles	The Frantic Antic	1.0	 	Category sensitive recent articles tag.	Yes	5	Help
	rah_sitemap	Jukka Svahn	1.3.0	 	Build a valid advanced XML sitemap	Yes	5	Help | Options
	ras_recent_articles	The Frantic Antic	1.0	 	Category sensitive recent articles tag.	Yes	5	Help
	wet_plugout	Robert Wetzlmayr	0.2	 	One button plugin state save and restore.	No	5	Help
	zem_contact_lang	TXP Community	4.0.3.6	 	Language plug-in for Zem Contact Reborn	Yes	5	Help
	zem_contact_reborn	TXP Community	4.0.3.20	Yes	Form mailer for Textpattern	Yes	5	Help
	zem_ir	Threshold State	0.5	Yes	CSS/PNG image replacement plugin	Yes	5	Help
	zem_nth	zem	0.1	 	Display content every n-th step	No	5	Help

	zem_posted	zem	0.1	Yes	Timestamp with time zone support	No	5	Help

At the moment, I’ve got TXP quite broken. :D

edited textile of plugin dump for better readability — Uli

Last edited by uli (2019-03-03 15:44:39)

Offline

#9 2019-03-03 16:09:11

etc
Developer
Registered: 2010-11-11
Posts: 3,127
Website

Re: Older style Textile parsing for 4.7.3?

A notable change between 4.6 and 4.7 in this area is plugins help imported as XML. So a badly formatted help source could produce these errors. Bloke and NicolasGraph know much better than me about this stuff.


etc_[ query | search | pagination | date | tree | cache ]

Offline

#10 2019-03-03 16:40:21

neptho
Member
From: A cold, dark place.
Registered: 2006-02-01
Posts: 40

Re: Older style Textile parsing for 4.7.3?

As suggested by @etc, there’s something else I have making it unhappy. Importing my entries and categories manually to a new skeletal DB, and everything works as expected. Mostly. auto_increment on ID got nuked when I did a lazy copy of $prefix’_textpattern’. Oops.

I.. don’t have anything installed in TXP to actually reparse things though, and I’ve been literally using a namebased vhost with the same PHP/MySQL from my 4.6.x and this native 4.7.3 install. Weird-o-rama.

It looks like some mundane change across my plethora of early-2000s code caused my 4.6 base to become corrupt, and even after a basic restore from my backup, it still wasn’t happy and wanted to continue to preparse, even when debug was disabled and so forth.

I’ve managed to rebuild my zem_ir and zem_contact_reborn_all_in_one for 4.7, and the very basic bits of the website are functional again, even if it is a bit, er… drab.

It took me a few seconds to get used to the Hive admin skin; I got so used to the classic design! Adding my custom redirect/hidden pages was a trip down synapses long since dormant.

Thank you everyone!

Last edited by neptho (2019-03-03 21:49:29)

Offline

Board footer

Powered by FluxBB