Fatal Error on Search Page after PHP 8.x Upgrade – TypeError in td_util.php

Posted in: Newspaper
Post count: 34

Hello tagDiv Support Team,

I am experiencing a critical error on my website (running the Newspaper theme) specifically when performing a search. The rest of the site functions normally, but submitting a search query results in a “Critical Error” message.

Error Log Details:
I have enabled WP_DEBUG and identified the following fatal error:
Fatal error: Uncaught TypeError: Cannot access offset of type array on array in …/wp-content/plugins/td-composer/legacy/common/wp_booster/td_util.php:1196

Stack Trace Summary:

#0 td_util::get_template_id(Object(WP_Post)) called at td_util.php(340)
#1 td_util::check_header() called at td_wp_booster_functions.php(513)

The error seems to originate during the wp_enqueue_scripts and wp_head actions when the theme tries to determine the template ID for the search results page.

Environment Information:

Theme: Newspaper (using a child theme)

Plugin: tagDiv Composer

PHP Version: 8.4.13 (The error appeared after upgrading PHP versions)

WordPress Version: 3.9

The error only occurs on the search results page.

Is this a known compatibility issue with PHP 8.x and the current version of the tagDiv Composer? Could you please advise if there is a specific patch for td_util.php or if a plugin update is required to handle the array type-checking more gracefully in PHP 8?

Thank you for your assistance.

Website URL: madtrash.com

Post count: 35449

Hi,
If you have the latest version and you face a critical error when using the search, it will be need to replace the current theme plugin tagDiv Composer with the one from here – https://cdn.tagdiv.com/wp-content/uploads/2025/11/td-composerfix.zip
Thank you!

Post count: 34

Hi Calin,

thanks a lot for your quick support. Are you planning to integrate this fix in the next version of tagDiv Composer?

Post count: 34

BTW: The fix doesn’t work

Post count: 9544

FYI, we have only been using WP with PHP 8.3x as 8.4 breaks a *lot* of things – not advisable for now.
(I don’t work here.)

Post count: 42

We get the same error with PHP 8.1.33.
I’m hesitant to use your fix since Maddest says it doesn’t work.
Search does work on mobile, and occasionally on desktop, but mostly gives a fatal error.
Please advise.

Post count: 42

Update: the TD-Composer-Fix plugin did work. Thanks!

Post count: 35449

Hi Maddest and daveslc,
The provided solution should normally resolve the search issue when using the Newspaper theme version 12.7.3 with WordPress 6.9.
If you are using a different version, we recommend creating a full backup and updating the theme. There may also be other factors involved, such as a plugin conflict, or the issue you are experiencing may differ from the one reported by other users.
In this case, please create a backup and contact us via email at contact@tagdiv.com, providing wp-admin and FTP or cPanel access. Our team will investigate the issue as soon as possible.
Thank you!

Post count: 34

I gave the fix a second try and now it works on my side as well! Very cool!

Thanks a lot!

However, will this fix be integrated into the next version of td composer?

Post count: 35449

Hi,
Yes, this will be in the coming theme update!
Thanks

Post count: 34

Great to hear! Thanks for the great support!

Have a nice week!

Viewing 11 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic.