How a silent PrestaShop hook failure hid three stacked bugs across releases
A PrestaShop module hook registering correctly and showing in Design > Positions still produced no output on the front end, with no errors, logs, or stack traces to indicate why. The root cause was PrestaShop's Hook::callHookOn() silently swallowing all exceptions when debug mode is off, returning an empty string for any failure. Adding a manual try/catch block with explicit logging finally revealed that the Smarty template was failing to compile entirely. The culprit was a plain CSS rule containing curly braces, which Smarty misread as a template tag and choked on, causing the whole template — including unrelated blocks — to silently fail. Wrapping such CSS in Smarty's built-in {literal} tags resolves the conflict and prevents the silent compilation failure.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in