Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2019-03-02 22:04:08
- neptho
- Member
- From: A cold, dark place.
- Registered: 2006-02-01
- Posts: 48
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
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: 48
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
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
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
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.
Offline
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: 48
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
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.
Offline
#10 2019-03-03 16:40:21
- neptho
- Member
- From: A cold, dark place.
- Registered: 2006-02-01
- Posts: 48
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
Re: Older style Textile parsing for 4.7.3?
These are actively used; there are a few more legacy ones installed
Good news, most of those can be replaced or happily ditched:
- lum_p -> looks like a helper plugin for other lum_ plugins but there aren’t any so it can probably go.
- phw_DTD -> no longer necessary, just cut straight to
<!doctype html>
and set HTML5 in Admin › Prefs. - wet_plugout -> for switching off plugins. May still work but once you’ve cleaned out the other plugins, I guess you don’t really have a need for it.
- zem_contact_reborn + zem_contact_lang + pap_contact_cleaner -> Replace with com_connect + a revised pap_comconnect. You can basically replace all
txp:zem_contact
tags withtxp:com_connect
and it will work. You might need to adjust your css styling accordingly (same principle), but it is effectively a drop-in update now (com)munity maintained. - zem_ir -> probably still works, but just use a webfont instead and it’ll be miles better: sharper, selectable, more lightweight.
- zem_nth -> all doable now with css styling and nth-child. You can drop this.
- zem_posted -> the
format
andgmt
attributes of txp:posted should get you there… - rah_sitemap -> still works but you can now roll your own by making a sitemap section, using
txp:header
and an htaccess rule. See this post and those before/after it.
… which leaves the following as the only outlier…
- ras_recent_articles -> I haven’t found all that much about it online so it’s hard to tell. Maybe txp:recent_articles will do what you want?
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.
The pages + forms (+styles) setup of textpattern is the same as before and is a little more flexible too, so no need to use any other templating method. Connections is fairly simple main column plus sidebar layout with menu and header image. Phil’s stock template is a good basis for blogging site and he’s gone to the extra effort of adding all the extra schema.org elements that help it get read by search engines. The main page has a container
, main
and aside
in the source and you can quickly rejig the single column to a side-column setup by altering the css. You could do worse than duplicate that theme to a new name, then start embellishing from there…
TXP Builders – finely-crafted code, design and txp
Offline
#12 2019-03-03 22:12:31
- neptho
- Member
- From: A cold, dark place.
- Registered: 2006-02-01
- Posts: 48
Re: Older style Textile parsing for 4.7.3?
Wow!
Thank you again for taking all of the time to assist with tracking down all of these plugins, @Jakob.
It really is nice seeing a forum which is still helpful toward those who have fallen a bit behind, and are out of their element. (Needs to say, 2005 was a little while back.)
I’ve deployed a stock 4.7.3, and have only rebuilt zem_ir, and a fairly modified zem_contact_reborn with the language stuff stripped, some internal text handling, and the majority of my site is nearly as functional as it once was. I’ll look into using webfonts; I was using it primarily just to provide a contact email address so it wouldn’t be quite so readily farmed. I’ll look into an internal sitemap build; thanks for the link!
The only other thing which was actively used beyond the doc hack was the web player that I posted using twice- around 2010. I can probably just convert that video to webm and ditch it entirely.
I rebuilt my good old static page view and form, with custom sections for my “dynostatic” pages which are designed to show the latest txp:article for that section, and I have my custom navbar back. :)
I’ve already destroyed Phils’ “Wait, this is what HTML looks like now?” code in a few places, but for now it brings back essential functionality that I (and the 3 people who find my page a year) expect available with my ancient articles. Needless to say- I’m not much of a designer, which is why I ran that dated theme for so long. I wouldn’t mind something which didn’t scale quite so large, but I’ll deal with that later- no more need to cringe on mobile!
Thank you!
Offline