Search Improvements

Search Improvements 2.19.1

No permission to download
... as in being moved to a thread that no longer exists ?
Without seeing Truonglv/IgnoreContent it is hard to say exactly, but the add-on does have some internal caching and this is rewriting where a post lives so it is probably checking the wrong thing which is null.

Does this happen if Search Improvements add-on is disabled?
 
I can't seem to replicate it so I wonder if it only relates to a post where someone has the poster on ignore and is watching the forum to where the post is being moved to

If it happens again I'll let you know
 
  • Like
Reactions: Xon
Search Improvements 2.19.0. XF 2.2.19 patch 2. I started getting these errors when clicking on the notification icon (which doesn't load the notifications).

Code:
Call to undefined method SV\SearchImprovements\XF\Pub\Controller\Account::response()
9 minutes ago src/XF/Pub/Controller/Account.php:16

Stack trace
#0 src/XF/Pub/Controller/AbstractController.php(34): XF\Pub\Controller\Account->preDispatchController('AlertsPopup', Object(XF\Mvc\ParameterBag))
#1 src/XF/Mvc/Controller.php(126): XF\Pub\Controller\AbstractController->preDispatchType('AlertsPopup', Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(351): XF\Mvc\Controller->preDispatch('AlertsPopup', Object(XF\Mvc\ParameterBag))
#3 src/XF/Mvc/Dispatcher.php(258): XF\Mvc\Dispatcher->dispatchClass('XF:Account', 'AlertsPopup', Object(XF\Mvc\RouteMatch), Object(SV\SearchImprovements\XF\Pub\Controller\Account), NULL)
#4 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\SearchImprovements\XF\Pub\Controller\Account), NULL)
#5 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#6 src/XF/App.php(2523): XF\Mvc\Dispatcher->run()
#7 src/XF.php(524): XF\App->run()
#8 index.php(20): XF::runApp('XF\\Pub\\App')
#9 {main}

Request state
array(4) {
  ["url"] => string(233) "/account/alerts-popup?_xfRequestUri=%2Fthreads%2F12-times-more-plastic-particles-leached-from-single-use-cups-lined-wit.1460%2F&_xfWithData=1&_xfToken=1789092754%2C0c2fa7e42f114dcb1ceb99273c4f63e2&_xfResponseType=json&_=1789092755866"
  ["referrer"] => string(119) "https://forum.humanmicrobiome.info/threads/12-times-more-plastic-particles-leached-from-single-use-cups-lined-wit.1460/"
  ["_GET"] => array(6) {
    ["/account/alerts-popup"] => string(0) ""
    ["_xfRequestUri"] => string(85) "/threads/12-times-more-plastic-particles-leached-from-single-use-cups-lined-wit.1460/"
    ["_xfWithData"] => string(1) "1"
    ["_xfToken"] => string(43) "1789092754,0c2fa7e42f114dcb1ceb99273c4f63e2"
    ["_xfResponseType"] => string(4) "json"
    ["_"] => string(13) "1789092755866"
  }
  ["_POST"] => array(0) {
  }
}

Alert Improvements 2.14.5. Standard Library 1.24.8.

Updating to Search Improvements 2.19.1 did not fix it.

A similar error:

Code:
Error: Call to undefined method SV\SearchImprovements\XF\Pub\Controller\Account::response() src/XF/Pub/Controller/Account.php:16
Generated by: Unknown account Sep 10, 2026 at 12:01 PM

Stack trace
#0 src/XF/Pub/Controller/AbstractController.php(34): XF\Pub\Controller\Account->preDispatchController('Preferences', Object(XF\Mvc\ParameterBag))
#1 src/XF/Mvc/Controller.php(126): XF\Pub\Controller\AbstractController->preDispatchType('Preferences', Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(351): XF\Mvc\Controller->preDispatch('Preferences', Object(XF\Mvc\ParameterBag))
#3 src/XF/Mvc/Dispatcher.php(258): XF\Mvc\Dispatcher->dispatchClass('XF:Account', 'Preferences', Object(XF\Mvc\RouteMatch), Object(SV\SearchImprovements\XF\Pub\Controller\Account), NULL)
#4 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\SearchImprovements\XF\Pub\Controller\Account), NULL)
#5 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#6 src/XF/App.php(2523): XF\Mvc\Dispatcher->run()
#7 src/XF.php(524): XF\App->run()
#8 index.php(20): XF::runApp('XF\\Pub\\App')
#9 {main}

Request state
array(4) {
  ["url"] => string(20) "/account/preferences"
  ["referrer"] => bool(false)
  ["_GET"] => array(1) {
    ["/account/preferences"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}
 
Last edited:
That error is an XF issue. Redownload & reapply XF2.2.19P2;
 
Got this error message:
ErrorException: Template error: [E_USER_WARNING] Method canViewThreadReaders is not callable on the given object (SV\SearchImprovements\XF\Entity\ThreadCollab) src/XF/Template/Templater.php:1295

Code:
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/var/www/vhosts...', 1295)
#1 src/XF/Template/Templater.php(1295): trigger_error('Method canViewT...', 512)
#2 internal_data/code_cache/templates/l2/s16/public/xc_user_activity_modification_macros.php(158): XF\Template\Templater->method(Object(SV\SearchImprovements\XF\Entity\ThreadCollab), 'canViewThreadRe...', Array)
#3 src/XF/Template/Templater.php(933): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#4 internal_data/code_cache/templates/l2/s16/public/thread_view.php(1118): XF\Template\Templater->callMacro('xc_user_activit...', 'thread_readers', Array, Array)
#5 src/XF/Template/Templater.php(1821): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#6 src/addons/MaZ/AUN/XF/Template/Templater.php(39): XF\Template\Templater->renderTemplate('thread_view', Array, true, NULL)
#7 src/XF/Template/Template.php(24): MaZ\AUN\XF\Template\Templater->renderTemplate('public:thread_v...', Array)
#8 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#9 src/XF/Mvc/Dispatcher.php(473): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#10 src/XF/Mvc/Dispatcher.php(455): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#11 src/XF/Mvc/Dispatcher.php(414): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#12 src/XF/Mvc/Dispatcher.php(66): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#13 src/XF/App.php(2840): XF\Mvc\Dispatcher->run()
#14 src/XF.php(850): XF\App->run()
#15 index.php(23): XF::runApp('XF\\Pub\\App')
#16 {main}
 
This is what Gemini says:
1792808932253.webp


AI Overview


This XenForo error happens because a template macro (xc_user_activity_modification_macros or thread_view) is trying to call the method canViewThreadReaders() on a ThreadCollab entity (SV\SearchImprovements\XF\Entity\ThreadCollab), which does not define or inherit that method.

Why It Happens
    • Add-on Conflict: The macro thread_readers (provided by a user-activity or similar add-on) expects a standard XF\Entity\Thread object that implements canViewThreadReaders(), or a class that extends or proxies it properly.
    • Collaboration Entity Mismatch: Instead, the variable or context being passed in is an instance of SV\SearchImprovements\XF\Entity\ThreadCollab (from Search Improvements by Xon), which lacks the permission-check method canViewThreadReaders().



How to Fix It
    • Check the Template Override:
      • Look at internal_data/code_cache/templates/l2/s16/public/xc_user_activity_modification_macros.php around line 158 or the hook/extension modifying thread_view.
      • The macro is likely calling something like $thread->canViewThreadReaders().
      • If $thread or the current entity in the loop/scope is resolved to a ThreadCollab wrapper rather than the core Thread entity, you need to reference the underlying thread object (e.g., $thread->Thread or $thread->getThread(), depending on how ThreadCollab is structured).
    • Disable or Update Add-ons:
      • Check for updates to Search Improvements (by Xon) or the user activity add-on providing xc_user_activity_modification_macros (such as XC User Activity / similar modifications).
      • Disable or adjust the template modification that injects thread_readers into the thread view if you do not actively need reader tracking on collaborative threads.
    • Rebuild Master Data / Cache:
      • Go to your XenForo Admin Control Panel -> Tools -> Rebuild caches and rebuild templates, class cache, and master data if you recently updated any add-ons.

If you can share which specific user activity add-on installed xc_user_activity_modification_macros, I can help you look at how to safely patch or adjust the template call.
 
This is what AI says: (I'd wait for the actual plugin makers to help you)

The conflict comes down to a structural clash between two specific add-ons: [XenConcept] User Activity and Search Improvements (by Xon). [1, 2]
The XenConcept add-on injects code into the thread_view template, expecting the main template variable to be a standard XenForo Thread entity. However, when Xon’s Search Improvements add-on triggers a collaborative thread context, it intercepts this and provides a ThreadCollab virtual entity wrapper instead. Because ThreadCollab doesn't know about XenConcept's custom canViewThreadReaders() method, the template engine crashes. [1, 2]
Here is how you can resolve this template error:

🛠️ Method 1: Modify the Template Macro Safely (Recommended)
You can wrap the method call in a safety check inside the XenConcept template macro so that it silently skips collaborative search threads rather than throwing a hard error.
  1. Go to your XenForo Admin Control Panel.
  2. Navigate to Appearance ➔ Templates (Make sure you select the correct theme style if you use a custom one).
  3. Search for the template macro: xc_user_activity_modification_macros.
  4. Find the macro container named thread_readers.
  5. Look for the exact line where canViewThreadReaders is being called on the thread object. It usually looks like this:
    html
    <xf:if is="$thread.canViewThreadReaders()">

    Use code with caution.

  6. Change that line to check if the method exists on the object before attempting to invoke it:
    html
    <xf:if is="method_exists($thread, 'canViewThreadReaders') AND $thread.canViewThreadReaders()">
    Use code with caution.

  7. Save the template.



🔧 Method 2: Adjust XenConcept Template Modifications
If XenConcept injects this macro directly via a Template Modification, editing the compiled template directly might get overwritten during a future add-on update. You can safely bypass it by handling the template modification hook:
  1. Go to Admin Control Panel ➔ Development ➔ Template modifications (You may need to enable development mode in your src/config.php file by adding $config['development']['enabled'] = true; temporarily if you don't see this menu).
  2. Filter for modifications related to thread_view belonging to the [XenConcept] User Activity add-on.
  3. Look for the modification that inserts <xf:macro name="xc_user_activity_modification_macros::thread_readers" ... />.
  4. You can wrap the injected macro execution with a quick validation block checking the entity type:
    html
    <xf:if is="$thread.getEntityClassName() == 'XF:Thread'">
    $0
    </xf:if>
    Use code with caution.

    (Where $0 represents the original text or macro being replaced by the modification).



🚀 Long-term Fix


Because both XenConcept and Xon are highly active developers in the XenForo community, this structural collision is something either author can fix cleanly using a class extension proxy.
It is highly recommended to post this exact stack trace on the [XenConcept] User Activity Resource Thread or Xon's Search Improvements Thread on XenForo.com. Xon or XenConcept can add a standard safety fallback or a proxy definition to ensure their entities coexist nicely.
 
Got this error message:
ErrorException: Template error: [E_USER_WARNING] Method canViewThreadReaders is not callable on the given object (SV\SearchImprovements\XF\Entity\ThreadCollab) src/XF/Template/Templater.php:1295

#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/var/www/vhosts...', 1295)
#1 src/XF/Template/Templater.php(1295): trigger_error('Method canViewT...', 512)
#2 internal_data/code_cache/templates/l2/s16/public/xc_user_activity_modification_macros.php(158):
Look at the caller not the class in the method name. xc_user_activity_modification_macros is what you need to look into, and that isn't one of my add-ons
 
Back
Top Bottom