Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 Today 12:17:59

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 308
Website GitHub Twitter

Update from 4.8.8 to 4.9.1: Call to undefined function

Hello,

after hesitating for a long time, I decided to make an update from Textpattern 4.8.8 to 4.9.1 on a multisite installation. On the biggest site with a lot of plugins I got this error:


[07-Apr-2026 15:11:20 Europe/Chisinau] PHP Fatal error:  Uncaught Error: Call to undefined function image_info() in /var/www/txp-multi/textpattern/publish/taghandlers.php(2754) : eval()'d code:2
Stack trace:
#0 /var/www/txp-multi/textpattern/publish/taghandlers.php(2754): eval()
#1 [internal function]: php()
#2 /var/www/txp-multi/textpattern/vendors/Textpattern/Tag/Registry.php(140): call_user_func()
#3 /var/www/txp-multi/textpattern/lib/txplib_publish.php(540): Textpattern\Tag\Registry->process()
#4 /var/www/txp-multi/textpattern/lib/txplib_publish.php(429): processTags()
#5 /var/www/txp-multi/textpattern/lib/txplib_misc.php(3743): parse()
#6 /var/www/txp-multi/textpattern/publish/taghandlers.php(447): parse_form()
#7 [internal function]: output_form()
#8 /var/www/txp-multi/textpattern/vendors/Textpattern/Tag/Registry.php(140): call_user_func()
#9 /var/www/txp-multi/textpattern/lib/txplib_publish.php(540): Textpattern\Tag\Registry->process()
#10 /var/www/txp-multi/textpattern/lib/txplib_publish.php(429): processTags()
#11 /var/www/txp-multi/textpattern/lib/txplib_publish.php(1409): parse()
#12 /var/www/txp-multi/textpattern/vendors/Textpattern/Tag/Syntax/Image.php(458): parseList()
#13 [internal function]: Textpattern\Tag\Syntax\Image::images()
#14 /var/www/txp-multi/textpattern/vendors/Textpattern/Tag/Registry.php(140): call_user_func()
#15 /var/www/txp-multi/textpattern/lib/txplib_publish.php(540): Textpattern\Tag\Registry->process()
#16 /var/www/txp-multi/textpattern/lib/txplib_publish.php(429): processTags()
#17 /var/www/txp-multi/textpattern/publish/taghandlers.php(2021): parse()
#18 [internal function]: if_article_image()
#19 /var/www/txp-multi/textpattern/vendors/Textpattern/Tag/Registry.php(140): call_user_func()
#20 /var/www/txp-multi/textpattern/lib/txplib_publish.php(540): Textpattern\Tag\Registry->process()
#21 /var/www/txp-multi/textpattern/lib/txplib_publish.php(429): processTags()
#22 /var/www/txp-multi/textpattern/publish/taghandlers.php(1181): parse()
#23 [internal function]: permlink()
#24 /var/www/txp-multi/textpattern/vendors/Textpattern/Tag/Registry.php(140): call_user_func()
#25 /var/www/txp-multi/textpattern/lib/txplib_publish.php(540): Textpattern\Tag\Registry->process()
#26 /var/www/txp-multi/textpattern/lib/txplib_publish.php(429): processTags()
#27 /var/www/txp-multi/textpattern/lib/txplib_misc.php(3743): parse()
#28 /var/www/txp-multi/textpattern/lib/txplib_publish.php(1405): parse_form()
#29 /var/www/txp-multi/textpattern/publish.php(1066): parseList()
#30 /var/www/txp-multi/textpattern/publish.php(1144): doArticles()
#31 /var/www/txp-multi/textpattern/publish.php(979): parseArticles()
#32 [internal function]: article()
#33 /var/www/txp-multi/textpattern/vendors/Textpattern/Tag/Registry.php(140): call_user_func()
#34 /var/www/txp-multi/textpattern/lib/txplib_publish.php(540): Textpattern\Tag\Registry->process()
#35 /var/www/txp-multi/textpattern/lib/txplib_publish.php(429): processTags()
#36 /var/www/txp-multi/textpattern/publish/taghandlers.php(3161): parse()
#37 [internal function]: if_variable()
#38 /var/www/txp-multi/textpattern/vendors/Textpattern/Tag/Registry.php(140): call_user_func()
#39 /var/www/txp-multi/textpattern/lib/txplib_publish.php(540): Textpattern\Tag\Registry->process()
#40 /var/www/txp-multi/textpattern/lib/txplib_publish.php(429): processTags()
#41 /var/www/txp-multi/textpattern/publish/taghandlers.php(2599): parse()
#42 [internal function]: if_category()
#43 /var/www/txp-multi/textpattern/vendors/Textpattern/Tag/Registry.php(140): call_user_func()
#44 /var/www/txp-multi/textpattern/lib/txplib_publish.php(540): Textpattern\Tag\Registry->process()
#45 /var/www/txp-multi/textpattern/lib/txplib_publish.php(429): processTags()
#46 /var/www/txp-multi/textpattern/publish/taghandlers.php(1668): parse()
#47 [internal function]: if_author()
#48 /var/www/txp-multi/textpattern/vendors/Textpattern/Tag/Registry.php(140): call_user_func()
#49 /var/www/txp-multi/textpattern/lib/txplib_publish.php(540): Textpattern\Tag\Registry->process()
#50 /var/www/txp-multi/textpattern/lib/txplib_publish.php(429): processTags()
#51 /var/www/txp-multi/textpattern/lib/txplib_misc.php(3819): parse()
#52 /var/www/txp-multi/textpattern/publish.php(765): parse_page()
#53 /var/www/txp-multi/index.php(81): textpattern()
#54 /var/www/txp-multi/sites/un/public/index.php(48): include('...')
#55 {main}
  thrown in /var/www/txp-multi/textpattern/publish/taghandlers.php(2754) : eval()'d code on line 2

On the first view it looked like a problem linked to aks_article or aks_cache, but switching them off, the error did not disappear.

Where to look? Has something changed in the plugin structure?

Textpattern version: 4.9.1 (b8abf064e7ac4529f7945c957f8bf517c4ef9f87464ad271)
Last update: 2026-04-07 10:55:25/2026-02-14 17:01:39
Multisite root path: __TXP-ROOT/sites/un
Textpattern path: __TXP-ROOT/textpattern
Article URL pattern: title_id
Production status: live
PHP version: 8.2.30
GD Graphics Library: 2.3.3; Supported formats: GIF, JPEG, PNG, WebP, AVIF.
Server time zone: Europe/Chisinau
Server local time: 2026-04-07 14:58:21
Daylight Saving Time enabled?: 1
Automatically adjust Daylight Saving Time setting?: 1
Time zone (GMT offset in seconds): Europe/Chisinau (7200)
MySQL: 11.4.10-MariaDB-deb12-log (mariadb.org binary distribution) 
Database server time: 2026-04-07 13:58:21
Database server time offset: 3600 s
Database server time zone: SYSTEM
Database session time zone: SYSTEM
Locale: de_DE.UTF-8
Site / Admin language: de / de
Web server: nginx/1.29.5
PHP server API: fpm-fcgi
PHP SSL version: OpenSSL 3.0.18 30 Sep 2025
RFC 2616 headers: 0
Server OS: Linux 4.19.0
Admin-side theme: hiveneutral 4.9.1

Pre-flight check: 
------------------------
You have PHP enabled in your articles/pages. To improve security from potentially malicious and damaging code, consider switching these off via the Preferences panel, unless you absolutely need to embed PHP functionality in your site.
Some Textpattern files have been modified: 
	__TXP-ROOT/textpattern/lib/txplib_admin.php, 
	__TXP-ROOT/textpattern/lib/txplib_misc.php, 
	__TXP-ROOT/textpattern/publish.php
------------------------

I have to confess, that I have as usual added a title_id mode to permlinks. But I think, that it doesn’t matter, because a second site of this multisite installation is working as it should.

Last edited by whocarez (Today 12:22:21)

Offline

#2 Today 12:26:39

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,546
Website GitHub

Re: Update from 4.8.8 to 4.9.1: Call to undefined function

Hmmm, if a plugin is directly calling image_info() then yes it’s moved. Most of the image tags are now in their own Image.php class in textpattern/vendors/Textpattern/Tag/Syntax so they’re now invoked differently by the parser.

The most future-compatible way to do it is to invoke the parser, so instead of:

image_info(array('type' => 'alt'));

Use:

parse('<txp:image_info type="alt" />');

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

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#3 Today 12:33:41

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 308
Website GitHub Twitter

Re: Update from 4.8.8 to 4.9.1: Call to undefined function

I call image_info only in one plugin. But already in the right way:

$articleimage_jpeg = parse('<txp:images auto_detect="" sort="id desc" limit="1" extension=".jpg"><txp:image_info type="id" /></txp:images>');
$articleimage_webp = parse('<txp:images auto_detect="" sort="id desc" limit="1" extension=".webp"><txp:image_info type="id" /></txp:images>');

Probably I call it somewhere else directly in php.

Last edited by whocarez (Today 12:38:18)

Offline

#4 Today 12:44:33

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,546
Website GitHub

Re: Update from 4.8.8 to 4.9.1: Call to undefined function

Hmmm, not sure then. I don’t think (hope!) there are any places it’s used directly in core, so my best guess would be a plugin or a Page/Form somewhere with some PHP in it.

If you find any references in core, please flag them for us to fix.


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

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#5 Today 13:03:06

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 308
Website GitHub Twitter

Re: Update from 4.8.8 to 4.9.1: Call to undefined function

Found it. I have to rework all the parts where I use textpattern tags inside
<txp:php>

</txp:php>

Offline

Board footer

Powered by FluxBB