Wednesday, 29 March 2006

What’s Wrong with TextPattern?

TextPattern Logo Planned to start a new site. Topic? All set. Hosting? Will be at my new VPS. It is going to be a light traffic site on a specific topic updated maybe once or twice a week, so I think a simple blogging app will suffice, i.e. no complicated CMS system.

So far I have two choices — WordPress or TextPattern. I have experiences with both pieces of software, although far more exposure with WP. Since I already have quite a few sites running WP, and only one with TextPattern (and it’s off-line at the moment Update: and it has been converted to WordPress), I said to myself why not give TextPattern another try? Last time I looked at it was 18+ months ago when it was g19. The latest official release is currently at 4.0.3. Maybe things are different now.

So I downloaded the tarball, installed it and had a play. Not completely happy.

The Bad and Ugly from my previous review still stands (somehow my post got pretty good ranking on Google for “textpattern review“), and there are a few new aargh!! about TextPattern after getting myself familiar with WordPress.

The old warts:

  • Still no XML-RPC support — Although it appears to be coming. Fortunately XML-RPC support is not that important to me anymore.
  • Still no trackback support — Because the dev’s think it is an invitation to the spams. Doesn’t it apply to comments as well? There are third party support however.
  • parse() is still here — Can’t do much as it is really the heart of publish.php. It is heavily regular expression based and can be hard on the memory usage (which is what makes WordPress so slow as Texturize runs on every page view).

And these are the new ones…

Theme Support

Or is there theme support in TextPattern at all?? I found WordPress (and Drupal and other CMS) has got it right. To change into a pre-made theme on WordPress, you just need to (1) download the theme file (2) unzipped into wp-content/themes directory (3) activate that them from the admin page. That’s it!

However for TextPattern, so far I have failed to download a theme from TextGarden.org that doesn’t include a readme.html detailing 5-step instructions on copying images, copying CSS, copying pages and forms, etc. Don’t like the new theme and want to switch back? You need to find the old theme file, and follow the 5 step instructions to copy and paste various files. Repeat the process until finding a theme that is satisfactory.

Theme page on Textbook seems to be addressing that. There are quite a few discussion in the forum on the topic of “theme manager” (for example this one). Hopefully this issue will be resolved soon.

I actually feel bad for those who work on TXP themes and contribute to TextGarden. These are great themes and wonderful art work, however I guess they would have received less distribution and less wide-spread usage because TXP themes are just so hard to use.

Database Stored Theme Files

It is closely related to my previous issue. TextPattern stores all presentation data (page, form and stylesheet) inside the database, alongside with your site contents. It might sound neat — just do a mysqldump and you have your entire TextPattern site.

Which is completely not true.

What about other media files, like graphics, pictures and MP3s of your podcast? They don’t store inside the database, and you still have to zip them up using the “traditional method”. There are also images that are referenced by specific themes, and it is really difficult to manage them when the templates are stored inside DB yet others are stored on the file system.

TXP might argue that by putting pages and forms inside the DB, it makes updating the site much easier, as no FTP is required. However, as TXP presents itself as a professional publishing platform, I do not think using FTP and working around file/directory permission is an issue here, moreover

  • No one should update a live site. I have made numerous mistakes in WordPress when updating a live site without making sure every section works, so I always tweak my designs on a testing site before applying it live. Having templates in DB with a web-based editing interface really tempts you to edit design live.
  • No easy way to synchronise changes between installations. I usually make changes to templates on my test WordPress sites, which is an exact replica to live sites on the file system level. After changes are tested, I just run unison (a 2-way version of rsync) to copy all my changes across. Nice and easy. But it is difficult to implement in TextPattern. Of course I can run mysqldump on txp_page and txp_form, scp it onto live site, then import into the database, and wrap all that into a script. It still does not provide two way synchronisation (in rare cases where I manually modify the live site instead).
  • Presentation should really be separated from content. It is interesting to read Natelie’s convert to TextPattern. In her incident where she deleted the database of her WordPress installation — if it was a TextPattern instead, not only all posts and comments are gone, so are the templates, stylesheets and the whole design as they are stored in the database. Also separation of presentation and content makes it easier for designers and content publishers to work together.
  • <textarea/> != text editor. Editing HTML file inside textarea sucks. There is no syntax highlighting. No familiar key binding. Not available when site is off-line. Give me ViM please! (Actually I just edit the page/form inside ViM invoked by w3m browsing the TXP admin interface). I know you can do all that inside a proper text editor and then copy’n'paste into the textarea, but why an extra step?

It appears theme-in-DB is a major show stopper for me. It should have done what many other CMS/blog software are doing, by having the presentation-related customisation stored on plain text files.

Base 64 Encoded Plain Text?

Talking about plain text files, one thing that still puzzles me is why TextPattern stores certain plain text content in base64 encoding??

Why plugin content needs to be compiled encoded into base64 before importing into the database? According to Alex:

They’re not stored as plain PHP source files; rather, they’re “compiled” into a chunk of base64-encoded text, to allow for easy installation and minimize corruption problems.

WTF?! Easy installation? Not quite — copy and paste is the same regardless plain text or base64. Minimize corruption problems? There is md5 check sum in the dump, but I don’t see how corruption is an issue unless you try to copy it over a 300baud analogue modem that has its CRC broken.

All it does is making plugin developers’ lives more miserable. I am happy that plugin_cache_dir was introduced in 4.0.1.

While plugins need to be encoded in base64 to import, it is stored in plain text inside the database. However the CSS can be imported in plain text, but stored in base64 encoded in the database. What?! There’s no md5 check sum, no meta data — just plain text encoded in base64. It actually makes the text size 25% larger and even harder to compress. Plus wasted CPU time to decode them on every CSS access. Can somebody tell me why?

Conclusion

TXP Magazine worded this way (quoting Natelie’s comparison report):

If you’re a serious blogger with a professional blog, or a company who wants a professional content management system, use Textpattern. If you’re a new to moderate blogger or you’re just the type that likes things easy and comfortable, stick with WordPress.

In another word, a newly converted TXP user proclaimed that TXP is for professionals and WP is for blogging newbies. I don’t think it is true, and personally I found there are serious issues with how presentation-related files are stored. Currently the only redeeming value for TXP to me are:

  1. Speed — WP is slow due to layers and layers of flexible filters and insufficient cache of intermediate result, which makes TXP fast in comparison.
  2. Sections — effectively having multiple independent blogs inside one installation. It would require a big hack on WP to do it.

Will I still use TextPattern for my new site? I think I will at least give it a try, but with patches to solve my theme-in-DB issue.

Links to This Article

  1. Wed, 16 July 2008 8:22 pm
    Elefanttipuhetta » Textpatternin ongelmia

Comments

1.
Avatar for Mary
Posted by Mary on Sun, 2 April 2006 11:00 am

Part of the problem is, you’re looking for “a simple blogging app”, and Textpattern _isn’t_ one and doesn’t try to be; it’s a simple cms with a sprinkle of blog-like features.

> “The Bad and Ugly from my previous review still stands…”

Textpattern 4.0.3 cannot be described as buggy, nor having the same limited archiving problems; it is miles beyond g1.19 in most respects, even though the admin interface has changed little.

> “Ugly default template/stylesheet.”

It’s not ugly, just plain. Very few users of Textpattern keep the original theme, while very many WP users do (or did, anyway). That’s a _good_ thing: encouraging trading in a functional template for one more “pretty”, and hopefully, more unique.

> “Still no trackback support – Because the dev’s think it is an invitation to the spams. Doesn’t it apply to comments as well?”

No, it doesn’t. Comments are protected by a series of mechanisms, some of which not possible in trackback. Of those that are, it’s a far from “simple” addition. Alex’s other point is still very true: I’ve only seen a handful of requests for trackback support. I’ve only looked at the plugin/mod briefly, but it appears to have zero protections in place and has no method for removing spam should it occur.

> “Presentation should really be separated from content… if it was a TextPattern instead, not only all posts and comments are gone, so are the templates, stylesheets and the whole design as they are stored in the database.”

You’re confusing content versus presentation with storage mode. In any case, if you don’t take the time to backup, be it files or a database, you can’t blame your software (no matter what it is) if you delete everything and can’t get it back. It happens, it sucks, but such is the nature of things. There’s no reason not to anyway, there’s even plugins for this in both WordPress and Textpattern.

> ” != text editor. Editing HTML file inside textarea sucks. There is no syntax highlighting. No familiar key binding. Not available when site is off-line. Give me ViM please! (Actually I just edit the page/form inside ViM invoked by w3m browsing the TXP admin interface). I know you can do all that inside a proper text editor and then copy’n’paste into the textarea, but why an extra step?”

This can easily be another plugin. It wouldn’t be difficult to add syntax highlighting for the “preview” mode for Textile in the write tab, though. There’s another Textpattern plugin which allows you to use the Tab key, just like in text editors.

It was not until a recent edition of WordPress when TinyMCE was added. Before then, it was also a textarea (and if you edit your theme files via the control panel, it’s still a textarea). For some time, Textpattern has had a TinyMCE plugin, as well as a plugin for a Quicktags toolbar like WordPress used to have.

With regard to editing pages, styles and forms in textareas, someone made it possible to power forms and so on via files, so I don’t see it being very much of a problem anymore.
http://www.woods-fehr.com/txp/8/link-template-2-file

Your other points contain valid weaknesses (like full and proper theme support, easier plugin creation/management, some architecture issues, and so on). They have not yet fully been addressed in publicly available releases, but that said, they are well-known and being worked on by the developers.


2.
Avatar for scotty
Posted by scotty on Sun, 2 April 2006 8:44 pm

Hi Mary,

Thanks for the reply. Let me try to respond.

Part of the problem is, you’re looking for “a simple blogging app”, and Textpattern isn’t one and doesn’t try to be; it’s a simple cms with a sprinkle of blog-like features.

Does that matter? Does “being a simple CMS” excempted from “making sense”? Actually, “TXP is a CMS and WP is just a blogging tool” — that has appeared way too many times when the TXP camp tried to execuse themselves. In fact there are probably more installations of TXP as blogging app than using it as CMS, though the line between “CMS” and “blogging app” is quite blurry.

As of 4.0.3 being buggy — actually I have never stated that. I especially extracted out 3 old issues I had 18+ months ago that are still present today, but I did not comment on the quality of the code nor its default template.

Very few users of Textpattern keep the original theme, while very many WP users do (or did, anyway).

It is all relative. There are way more WP sites out there. While there might be relatively more WP users who never bother changing his/her default template, there are still more WP sites with their own customisation.

At the same time you can argue Kubrick in WP is a relatively more useful template than TXP’s default.

Comments are protected by a series of mechanisms, some of which not possible in trackback.

Maybe that just shows TXP lacks proper spam protection mechanism? My WP sites got spam trackbacks all the time, but all properly blocked by its layers of protection. As far a I could care, their implementation works. So why TXP doesn’t?

You’re confusing content versus presentation with storage mode.

No I am not. What is the “content” of a website, from the Content Management System’s perspective? The pages, but not necessarily the presentation. If I am designing a site template for a living for example, I would like to have version control — which can be difficult to do if your “presentation” is inside the database.

I am happy to have the app managing the “content”. However to manage the app (including corresponding presentation of the app), I would like to leave them as files in FS.

This can easily be another plugin. It wouldn’t be difficult to add syntax highlighting for the “preview” mode for Textile in the write tab, though. There’s another Textpattern plugin which allows you to use the Tab key, just like in text editors. It was not until a recent edition of WordPress when TinyMCE was added…

I think you have missed my point. I don’t want to use textarea. I don’t want to use TinyMCE (or FCKeditor or HTMLarea or …). I was not talking about editing the “content” of the website/blog site. I was talking about editing the template inside my preferred text editor. On the file sytsem, no HTTP transaction is involved.

I have stated my reason. I preferred to edit the templates on an identical test site with text editor, and then use rsync/unison to move the “new presentation” together with “live content”. I don’t want to do it over the web.

With regard to editing pages, styles and forms in textareas, someone made it possible to power forms and so on via files, so I don’t see it being very much of a problem anymore. http://www.woods-fehr.com/txp/8/link-template-2-file

Well. Thank you. This is what I am looking for — being able to link templates/stylesheets with a text file. I have actually wacked my own hack to do exactly the same thing since I wrote this post, and it is currently powering my new TXP site.

I shall look at Woods-Fehr’s implementation, and I’ll release mine when it is ready for public consumption.


3.
Avatar for Mary
Posted by Mary on Tue, 4 April 2006 2:33 pm

Does that matter?

Er, doesn’t it? I took my cue from what you said you were looking for. Obviously you are/were doing a needs/wants assessment, and you think the software’s goals and approach to said goals come into the equation somewhere, otherwise you wouldn’t stop to think “I want something that will do this, this way…”

Does “being a simple CMS” excempted from “making sense”?

It does make sense – it can’t be completely obtuse or no one would use it – it just has completely different goals and approach than what you appear to be looking for or used to.

WordPress is blogger-centric, but Textpattern is general publishing-centric; they have different purposes in mind. That doesn’t make it inferior in general, though perhaps inferior in meeting your specific needs if you want things not (yet/ever) supported or just not handled the way you’d prefer.

…that has appeared way too many times when the TXP camp tried to excuse themselves.

I think that’s an unfair assessment, that appears to be suggesting something about the developers or the development process used, which you couldn’t possibly know. But obviously you’ve got a right to your opinion and to state it, including on your own blog (and generously allowing me and others to respond).

In fact there are probably more installations of TXP as blogging app than using it as CMS, though the line between “CMS” and “blogging app” is quite blurry.

Textpattern is used for a lot of portfolios, actually. If it’s in your interest, you should check out the “Let’s See Yours, Then” Textpattern forum or the TXP Magazine Sites Collection for a sampling of what else people are doing with Textpattern. That gives, I think, a fuller view of what Textpattern sets to accomplish and will help you figure out if and when you would use it.

As of 4.0.3 being buggy actually I have never stated that. I especially extracted out 3 old issues I had 18+ months ago that are still present today, but I did not comment on the quality of the code nor its default template.

Fair enough, that’s what I had taken “The Bad and Ugly from my previous review still stands…” to mean (I then read the older review, which says that).

Maybe that just shows TXP lacks proper spam protection mechanism?

No. As you are aware, when you leave a comment, you actually use a browser to do so. When you ping, you do not. Two very effective – thus far, anyway – antispam measures Textpattern uses involve checking whether it is a real person making the comment, as opposed to a bot or script. Trackbacks/pingbacks are not done in the same manner as comments, it is all instant (or nearly) and “silent”. It’s just not possible to extend these protections because no html page is loaded, no form inputs and buttons are involved.

The rest of the measures, as I said, could be applied to trackback, but few people have actually requested said feature.

What is the “content” of a website, from the Content Management System’s perspective?

Whatever you tell it to be. Is “content versus presentation” not about separating the two, making it possible to easily change one without touching the other, rather than about the format each exists in?

WordPress makes the divide of content being in the database, everything else in flat files, easily changed but not touching the other. In Textpattern they are still separated, rather into different tables (images and files being a _current_ exception), easily changed without touching the other. That doesn’t mean it will always be this way, that’s just how it stands now.

Having a preferred storage mode for said content and presentation is a legitimate want/need, no question there. “Easily” is where user experience and preference comes in. Personally, I prefer it being in the database and in a textarea, so for me not a problem (though I agree much can be done to improve the experience). You prefer your text editor, as I’ve seen others do too, which is fine. Typically, though, do you not prefer doing that (flat files) for making whole designs or large portions of markup/code, rather than small changes later on? As you tinker with Textpattern you may find that the non-filesness of Textpattern can have it’s ease-of-use advantages too.

I think you have missed my point.

In one aspect, yes: with regard to entering content via a textarea; I wasn’t sure which textarea(s) you were including, so I just covered them all.

I shall look at Woods-Fehr’s implementation, and I’ll release mine when it is ready for public consumption.

Please do, even if it never gets to the public consumption phase. I’m sure it would be very useful.


4.
Avatar for JM
Posted by JM on Sun, 9 April 2006 5:52 pm

[my ignorance may shine in the following]

I’ve used wordpress in the past, but I finally switched to Textpattern in December. It’s more versatile, since it is a CMS that can be used as a blog utility, photo gallery, design portfolio, etcetera. That’s exactly what I’ve done with my site.

As far as templating, I don’t have a problem with the forms and pages being stored alongside articles in the database. I backup my database every few weeks, so it’s not a problem. Plus, I usually have a copy of all my forms and pages saved on a local install. My CSS is kept in an external file since it’s faster.

One of the biggest selling points for TXP is the XML-style templating. It’s much easier to pickup than PHP, as used in WordPress. The last version of WP I used was 1.5.x, so I’m not sure if that has changed.

From my experience, Textpattern is much easier to learn and use than WordPress. I’ve only edited the Textpattern core files twice, so I’m not into hacking. It’s not needed since templating isn’t done in the php files. Plus, hundreds of plugins exist to modify textpattern.

On the trackbacks issue, I personally hope they’ll never make it into the core. When I used wordpress, I had trackback spam within the first week. Currently, I have a robot/retard looking for trackback.php on my site (going strong after three months and a .htaccess ban for their static IP). From that, I’m thankful for textpattern’s lack of trackback/pingback support.

[comment previews are another great feature–Typos are guaranteed in this post! :P)


5.
Avatar for Natalie Jost
Posted by Natalie Jost on Tue, 1 August 2006 8:37 am

First, thanks for linking to my post. It has been 7 months now since that awful night and believe me, I have thought about the fact that the template code is housed in the database, but the way I look at it, for me, it’s easier because it’s all there in one place and when I want to create a new page, form, or stylesheet, I don’t have to go make a new php file and upload it.

I won’t get into the debate but for the record, I love both wordpress and textpattern for different purposes. In fact, even now after more than just 24 hours with textpattern I still think wordpress serves a different class of user. Textpattern is a different product, not really designed for blogging but has some useful features for someone who wants to build a blog into their CMS website. If all you need is a really robust blog and a few other pages, WP is definitely the fit. If you want a full-fledged website CMS with photo galleries, portfolio, newspaper/magazine layout, etc. and a blog included in all of that, then TXP will have a little more to offer.

I think it’s unfair to rule out one other the other in general terms or label one bad or good. Django is another powerful application which serves a whole different need. Personally I’m not at a point where I need it right now and there are things I don’t like about it, but I’m not about to say it’s a bad application. It is in fact a fabulous app for the purpose for which it was built… newspaper websites. I am not a newspaper, so my needs are very different.


6.
Avatar for Gordon Royle
Posted by Gordon Royle on Tue, 24 October 2006 9:22 am

Interesting article.. I am trying to find a balance between lightweight CMS with blog features and having decided that Drupal (Joomla, e107 etc) are too heavyweight for my needs I tried out TextPattern.

I crashed and burned the instant that I tried the templating!! I literally spent 3 hours searching for a template manager because I just could not believe that I would be required to cut-n-paste SEVENTEEN separate files (for one particular theme from TextGarden) to try out one theme. At least with Drupal/e107 etc you just upload a COMPLETE new theme in one zip file and then check it out by going to the theme manager and checking one box.

But I am still stuck on what to use… what I basically need is something with a reasonably flexible static content management system that allows a reasonable hierarchy (chapters, sections, subsections etc) but I don’t need forums, multiple users, e-commerce etc.

Cheers

Gordon


7.
Avatar for scotty
Posted by scotty on Tue, 24 October 2006 10:06 am

Hi all,

Let me come back to this rant I had 7 months ago…

First of all sorry that I really wondered off and never got around finalising the template plugin that I said I would do, as I lost interest in TXP all together. Let along releasing it.

These days I run most my sites on WordPress or Drupal. Yeah — Gorden — I would really recommend Drupal for its modularity and flexibility. It might be a bit complicated and awkward in the beginning, but the default installation with minimum modules is actually quite light-weight.

I guess the rational is, although you said that you don’t need forums, galleries and all other gimmicks right now, will you like to have them in the future? Is there a possibility that you want to run an integrated forum to serve your growing reader community?

I picked WordPress to run several of my sites that I thought would be small, but now I wish I had used Drupal which allows me to extend that small site into a user community.


8.
Avatar for Fields
Posted by Fields on Mon, 13 November 2006 12:10 pm

Somewhat Ironically as a former programmmer I have found textpattern hard to configure and wordpress quite a bit easier. I have a sight right now that I think I will be converting to Drupal although it looks a bit confusing at first sight because I can have things like an integrated forum ..


9.
Avatar for Peter
Posted by Peter on Thu, 31 January 2008 8:10 am

So has anyone found any good solutions to the theme-in-DB problem? It just might be a deal breaker.


Avatar for John Stephens
Posted by John Stephens on Sun, 17 August 2008 3:22 pm

I also prefer to edit my files in an external editor, and the txp bundle for Textmate is magnificent. cnk_versioning makes this easy.

I have to agree with JM about Textpattern tags– they are a lot easier to deal with than WordPress’s php.


Avatar for Zach
Posted by Zach on Fri, 15 July 2011 4:22 pm

Although this is an old post, I find it frustrating and annoying that Textpattern loves to brag about it being a CMS and not just a blogging platform and yet it can’t do anything but blogging without work-around’s and hacks. You can’t have static pages, you can’t have sections and/or sub-sections with pages. Yes, there is a way but it’s a work-around…even the official Textpattern site called it that.

Esentially Text pattern is a multi-blogging platform and you can create unlimited sections (blogs) and all posts get assigned to a section. In other words, it is nothing but a blogging platform that can also be used as a CMS.


Add a comment

Gravatar is used. Email address is required but will not be displayed. Please keep your comment on topic. No spamming and/or bad language. First time poster will be moderated. Scott reserves the right to delete/edit your comments.