Fix Textpattern: Resolve the preg_replace() Error

admin-ajax

The latest version of Textpattern CMS, 4.5.5 as I write this, trips up on PHP 5.5. In my previous post I explained how to solve the `yield` error that is thrown up with Textpattern 4.5.5 and PHP 5.5, and this article is in a similar vein. If you run Textpattern 4.5.5 alongside PHP 5.5, you will likely see this error at some stage:

Internal error “preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead”

Note that the error will occur only in the admin-side of Textpattern, your users will not be shown a bewildering error and be scared off. Additionally, the error will be thrown up when the following criteria are met:

  • the site is in Testing or Debugging mode
  • an article is posted or updated

The culprit in this case is Textile, the markup generator baked into Textpattern. When sporadic reports of this problem were reported in late 2013, a fix was created and Textile was updated to resolve the problem. As such, the solution to the `preg_replace` error is to drop in the updated Textile file from the issue tracker here. When this file is replaced with the updated version, the `preg_replace` errors will no longer appear.

Looking for quality Textpattern Hosting? Look no further than Arvixe Web Hosting and use coupon TEXTPATTERN for 20% off your first invoice!

Tags: , , , , , , , , , , , , , , , , , | Posted under Textpattern | RSS 2.0

Author Spotlight

Pete Cooper

Pete Cooper has been using Textpattern since 2005. Textpattern is his preferred CMS weapon of choice. Its logical and flexible approach to content management makes Pete happy, as does its lightweight core and helpful user community. Pete's website - petecooper.org - runs on top of Textpattern and chronicles his day-to-day experiences from his home near the Atlantic in north Cornwall, United Kingdom.

Leave a Reply

Your email address will not be published. Required fields are marked *