Won't fix Server errors after update to security fix 2.2.18

Alan_SP

Well-known member
Affected version
2.2.18 (manually uploaded fix)
I have just manually uploaded security fix 2.2.18. and I get server errors:


Code:
Error: Template public:register_form error: Call to undefined method XF\Captcha\HCaptcha::setContext() src/XF/Template/Templater.php:2700
Generated by: Unknown account Thursday 05.02.2026 at 23:53:38

Code:
Stack trace
#0 src/XF/Template/Templater.php(2667): XF\Template\Templater->fnCaptchaOptions(Object(SV\StandardLib\XF\Template\Templater), false, Array)
#1 src/XF/Template/Templater.php(1195): XF\Template\Templater->fnCaptcha(Object(SV\StandardLib\XF\Template\Templater), false, false, false)
#2 internal_data/code_cache/templates/l2/s1/public/register_form.php(176): XF\Template\Templater->func('captcha', Array)
#3 src/XF/Template/Templater.php(1727): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#4 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('register_form', Array)
#5 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#6 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Register\\For...', 'public:register...', Array)
#7 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#8 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#9 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#10 src/XF/App.php(2364): XF\Mvc\Dispatcher->run()
#11 src/XF.php(524): XF\App->run()
#12 index.php(20): XF::runApp('XF\\Pub\\App')
#13 {main}

Code:
Request state
array(4) {
  ["url"] => string(20) "/index.php?register/"
  ["referrer"] => string(42) "https://novazemlja.net/index.php?register/"
  ["_GET"] => array(1) {
    ["register/"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}

I do use hCaptcha, and I see that it calls the file updated manually. I see the same server error on both forums where I have uploaded patch.
 
As a temp solution till real solution is provided, I returned old src/XF/Template/Templater.php file. It seems server errors stopped for the moment.
 
I don't have active license for getting all files. I thought it will/should work with all versions, even older versions, as it's a security fix, not adding new functionality.

EDIT: But, I did upload all the files in security fix, if that is what you mean.
 
Last edited:
For now I recommend uploading everything from the patch except the Templater. That fix isn't as crucial as the others - to be affected by that you would need to have someone login as Admin and do bad things.

We can only go so far unfortunately with security updates and accurately providing patches for releases from nearly 4 years ago (you're on 2.2.9) is a bit out of scope. It's very much a "best effort" approach.

I can't guarantee you won't run into issues with the other things but it is correct that the Templater fix is probably not going to be compatible.
 
Back
Top Bottom