Awaiting feedback renderTemplate function is loading the unmodified version of a modified template

Siropu

Well-known member
Affected version
2.3.5
Using the following code, renderTemplate will load the original version instead of the modified version.

PHP:
$templater = \XF::app()->templater();
$templater->addDefaultParam('xf', \XF::app()->getGlobalTemplateData());
$templater->renderTemplate('public:modified_template_name');
 
I think we might need some more context with this. What you're describing shouldn't be possible, but it might depend on some other factors.
 
I'm using this to load a template in my add-on via an AJAX request but I have tested this without AJAX in a controller using print_r for a different template that I have manually modified and the result was the same, it will load the unmodified version of it.
 
Back
Top Bottom