Shapes Posted January 21, 2022 Share Posted January 21, 2022 (edited) Hello, I created some custom shortcodes for my PrestaShop by creating a file (override/classes/controller/FrontController.php) with a method like : public static function parseCMSContent($content) { ... } And in my module and cms smarty templates I changed: {$cms.content nofilter} to: {FrontController::parseCMSContent($cms.content) nofilter} Everything was working fine with Prestashop 1.7.7.5, but the update to 1.7.8.2 broke the whole thing. I get a 500 error saying : PHP Fatal error: Uncaught Error: Call to undefined method FrontController::parseCMSContent() ... .module.pscustomtextpscustomtext. ... It's still working fine with debug mode enabled though.. I can't find anything about the function being deprecated, any idea on how I could get this working again please? Edited January 21, 2022 by Shapes (see edit history) Link to comment Share on other sites More sharing options...
Shapes Posted January 21, 2022 Author Share Posted January 21, 2022 In case this can help anyone, I fixed this by moving my override into a new smarty plugin. I created a file **vendor/smarty/smarty/libs/plugins/function.get_shortcoded_content.php** I added my shortcodes in: function smarty_function_get_shortcoded_content($params, &$smarty) { ... } And in my smarty files I called: {get_shortcoded_content content=$cms.content} instead of: {$cms.content nofilter} It seems to work all fine again. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now