Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 Yesterday 08:41:26

Gallex
Member
Registered: 2006-10-08
Posts: 1,330

TXP 4.9: Fatal error under diagnostic tab

Fatal error: Uncaught TypeError: Unsupported operand types: string - int in 
/www/apache/domains/www.varaleidja.ee/htdocs/textpattern/include/txp_diag.php:505 Stack trace: #0 
/www/apache/domains/www.varaleidja.ee/htdocs/textpattern/include/txp_diag.php(85): doDiagnostics() #1 
/www/apache/domains/www.varaleidja.ee/htdocs/textpattern/index.php(220): include('/www/apache/dom...') #2 {main} thrown in 
/www/apache/domains/www.varaleidja.ee/htdocs/textpattern/include/txp_diag.php on line 505

Everything else on admin side is working correctly. Switched to the debug mode – no errors on the site, but almost all images are gone (they were gone on live status also)! on the admin side all images have the same date – 16 Jan 2026.

It’s a real estate website, over 10K images has already uploaded – could be this a reason?

Last edited by Gallex (Yesterday 08:54:38)

Offline

#2 Yesterday 09:19:42

etc
Developer
Registered: 2010-11-11
Posts: 5,653
Website GitHub

Re: TXP 4.9: Fatal error under diagnostic tab

If your db server is MariaDB 11.8+, it’s buggy and not officially supported by txp, though we are looking for a patch in 4.9.1.

Offline

#3 Yesterday 09:27:32

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,160
Website GitHub

Re: TXP 4.9: Fatal error under diagnostic tab

Aside: you may be able to silence the deprecation notices about smd_lately by replacing all instances of the strftime function in the plugin code for smd_lately with safe_strftime.


TXP Builders – finely-crafted code, design and txp

Offline

#4 Yesterday 10:54:04

Gallex
Member
Registered: 2006-10-08
Posts: 1,330

Re: TXP 4.9: Fatal error under diagnostic tab

etc wrote #342247:

If your db server is MariaDB 11.8+, it’s buggy and not officially supported by txp, though we are looking for a patch in 4.9.1.

Yeah, it does 11.8.5… :( I have plenty of sites with this database.

But 4.8.8 is working with this database

Offline

#5 Yesterday 11:26:08

etc
Developer
Registered: 2010-11-11
Posts: 5,653
Website GitHub

Re: TXP 4.9: Fatal error under diagnostic tab

Gallex wrote #342250:

Yeah, it does 11.8.5… :( I have plenty of sites with this database.

But 4.8.8 is working with this database

The bug was not manifesting itself in 4.8.8, we have only discovered it after 4.9.0 release. Unfortunately, the only options I can see atm are

  • downgrade to txp 4.8.8
  • or to mariadb 11.4
  • or replace all 100 occurrences of FROM_UNIXTIME(0) in txp code (21 files) by FROM_UNIXTIME(1). This would shift dates by 1 second, but, hopefully, have no other weird effects.

Offline

#6 Yesterday 11:50:03

Gallex
Member
Registered: 2006-10-08
Posts: 1,330

Re: TXP 4.9: Fatal error under diagnostic tab

etc wrote #342251:

The bug was not manifesting itself in 4.8.8, we have only discovered it after 4.9.0 release. Unfortunately, the only options I can see atm are

  • downgrade to txp 4.8.8
  • or to mariadb 11.4
  • or replace all 100 occurrences of FROM_UNIXTIME(0) in txp code (21 files) by FROM_UNIXTIME(1). This would shift dates by 1 second, but, hopefully, have no other weird effects.

I will downgrade. Any idea, how fast you could fix it?

Offline

#7 Yesterday 18:02:56

etc
Developer
Registered: 2010-11-11
Posts: 5,653
Website GitHub

Re: TXP 4.9: Fatal error under diagnostic tab

Gallex wrote #342252:

I will downgrade. Any idea, how fast you could fix it?

Theoretically, it is already fixed in 4.9.1, but I have no appropriate server to test. As soon as someone confirms it works on mariadb 11.8, we can plan a release.

Offline

#8 Yesterday 22:00:29

Adams
Plugin Author
Registered: 2024-08-30
Posts: 59

Re: TXP 4.9: Fatal error under diagnostic tab

Hello,
As you suggested I replaced all FROM_UNIXTIME(0) with FROM_UNIXTIME(1) and looks working now with
Mariadb 11
BTW: all my work with Mysql Mariadb.
I can test 4.9.1
how I do get it ? from https://github.com/textpattern/textpattern ?

Hope this helps
Thank you

Offline

#9 Yesterday 23:43:28

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,160
Website GitHub

Re: TXP 4.9: Fatal error under diagnostic tab

Adams wrote #342256:

I replaced all FROM_UNIXTIME(0) with FROM_UNIXTIME(1) and looks working now with
Mariadb 11

Great! I have a server with MariaDB 11.4 and haven’t observed problems. The anomaly does seem to be since v11.8.

how I do get it? from https://github.com/textpattern/textpattern ?

Yes. Visit github.com/textpattern/textpattern/tree/4.9.x (switch to the 4.9.x branch if not already set), then click the “Code” button and download the zip, or pull the repository using git.


TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB