Page 1 of 1

Plugin 'smarty_cms_function_cms_action_url' not callable

Posted: Wed Apr 03, 2024 12:04 pm
by 10010110
I’m frequently getting a blank page and the error
PHP Fatal error: Uncaught --> Smarty: Plugin 'smarty_cms_function_cms_action_url' not callable <-- \n thrown in ~/site/lib/smarty/sysplugins/smarty_internal_template.php on line 468, referer: http://localhost/
in the console on my local development server. I can only temporarily get rid of it by deleting all files in /tmp/templates_c. Is anyone able to explain why this is happening? Could this be a user/file permission issue on the server? The owner is the current user and the group is “staff”, and the directory permissions are 777 (files inside are 644). Or where do I disable the cache completely?

Re: Plugin 'smarty_cms_function_cms_action_url' not callable

Posted: Wed Apr 03, 2024 12:26 pm
by Jo Morg
The only reason I can think of for that error to be triggered is for the <site_root>lib/plugins/function.cms_action_url.php to be missing or corrupted. Please check if that file is there or do a site checksum on the core files.

Re: Plugin 'smarty_cms_function_cms_action_url' not callable

Posted: Wed Apr 03, 2024 3:06 pm
by 10010110
The file is there. I did a checksum test and it only complains about missing language files/translations (that aren’t relevant for my installation anyway). I’m not experiencing this anywhere but on my local server. 🤔

Re: Plugin 'smarty_cms_function_cms_action_url' not callable

Posted: Wed Apr 03, 2024 3:15 pm
by 10010110
OK, I have a suspicion: Since the issue is resolved by deleting all files in /tmp/templates_c, I checked all files there for the string “smarty_cms_function_cms_action_url”, and it found it in a couple of them. What I then noticed was the file path: I have a whitespace in a directory name and the paths in the $_smarty_tpl->_checkPlugins() method didn’t have that whitespace. So, I suspect it is looking for plugin files but can’t find them because the path isn’t correct. Feels like a bug to me.

Re: Plugin 'smarty_cms_function_cms_action_url' not callable

Posted: Thu Apr 18, 2024 10:32 pm
by 10010110
Some more progress, even if little: I had an older version of CMSMS lying around (version 2.2.15) where this error didn’t seem to occur. Then I upgraded that version to 2.2.19 and pronto, the error came up. In version 2.2.15, the function _checkPlugins() didn’t yet exist in /lib/smarty/sysplugins/smarty_internal_template.php.

This _checkPlugins() function is apparently loading the plugin files via include_once $plugin[ 'file' ]; where somehow any whitespace characters inside the file path get stripped which causes the system to fail loading the plugin file. Correct me if I’m barking up the wrong tree here. My PHP knowledge isn’t advanced enough to reverse engineer this any more.