Web Development

Glossary Premium: Timber Compatibility Issue with Glossary (Premium) Plugin v2.3.0 — Fixed in v2.3.2, Timber Compatibility Fix

Glossary Premium v2.3.2 fixes critical Timber plugin compatibility issues. Update now to resolve fatal PHP errors.

🔍 What Went Wrong

After upgrading Glossary (Premium) from v2.2.42 to v2.3.0, many users encountered a critical PHP fatal error:

TypeError: Subscriber::onThePost(): Argument #1 ($post) must be of type WP_Post, Timber\Post given

This occurred because the plugin's Subscriber::onThePost() method enforced a strict WP_Post type hint, while the Timber plugin passes a Timber\Post object via the the_post hook. Since Timber\Post does not inherit from WP_Post, PHP throws a fatal type error.
WordPress.org

💬 Plugin Author Response (Via WordPress Forums)

In the official WordPress.org support thread, a user facing this error received the following from the plugin author:

“The bug is on Timber that is returning to a WordPress filter the wrong data and one of the library we are using is crashing because it is stricter than usual.”
WordPress.org

This confirmed the conflict was due to strict type enforcement on the plugin side interacting poorly with Timber’s object model.


✅ The Fix: v2.3.2 and Beyond

Starting in v2.3.2, the plugin relaxed the onThePost() method signature by introducing a namespaced \WP_Post type hint, which avoids strict enforcement and accepts Timber's post objects:

public function onThePost(\WP_Post $post, \WP_Query $query) {
$this->networkWpQuery->setUpPost($post, $query);
}

This version removed the compatibility barrier, allowing both native WP_Post and wrapper objects like Timber\Post to be passed safely.

📊 Version Compatibility Table

Glossary VersionTimber Integration Status
v2.2.42 and earlier✅ Fully Compatible
v2.3.0 – v2.3.1❌ Fatal TypeError with Timber
v2.3.2 and later✅ Compatibility Restored

🔧 Fix Steps for WordPress Site Admins

  • Check your current plugin version via Plugins → Installed Plugins.
  • If you're on v2.3.0 or v2.3.1, ensure you update to v2.3.2 or newer.
  • Clear caches (e.g., object cache, Timber templates, CDN) to reflect the latest code.
  • Re-open pages using Timber\Post — archive pages or single post pages — to confirm no fatal error occurs.

🧪 Debugging Tips if Error Persists

Enable debugging by adding the following to your wp-config.php file:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);

Reproduce the issue and check /wp-content/debug.log for:

onThePost(): Argument #1 must be of type WP_Post, instance of Timber\Post given

For unresolved cases, contact Codeat’s premium support:
https://support.codeat.co/
Provide WordPress version, PHP version, active theme/plugins list, and the error log.
WordPress.org


🧠 Why This Matters to Developers

Using strict type hints in WordPress plugins can create unintended conflicts, especially when interacting with frameworks like Timber that wrap native objects.

Timber\Post is not a subclass of WP_Post, so rigid typing will fail in many common use cases.

This case highlights the importance of avoiding strict typing in hook handlers unless you're certain of object types.

Always test plugin updates in staging environments, particularly when your site uses advanced OOP frameworks.


Written by

Gokila Manickam

Senior WebCoder

Builds WordPress and front-end work at FUEiNT. Writes most of the groundwork on this blog — URLs, markup, page speed and the questions clients ask before a build starts.

All 67 articles by Gokila Manickam
Next stepWeb Development

Want this done on your own site?

Tell us what you are trying to do in two sentences. You will get a straight answer, and if it is not work for us we will say so.

Back to the blog
ServiceWhat FUEiNT buildsWebsites, applications and AI work, built by a studio in Coimbatore since 2014.Open

Bring us the one everyone called impossible.

Messy, undocumented, half-migrated and business-critical is our favourite kind of brief. Write two sentences. You will get a straight answer and a way forward.

WhatsAppMessage us on WhatsApp
Visit12, Sri Vigneshwara Nagar, Amman Kovil
Saravanampatti, Coimbatore, TN, India — 641035

தெய்வத்தான் ஆகா தெனினும் முயற்சிதன்மெய்வருத்தக் கூலி தரும்.