Thread Tagging Improvements

Thread Tagging Improvements 1.0.8 Patch Level 1

No permission to download
mazzly updated Thread Tagging Improvements with a new update entry:

"Loner tags", improvements to filtering and other cleanups

  • Potential Tag Word data is now stored in a database table.
  • Sorting potential words now allow ordering by:
    • Use count
    • Word count & use count (i.e. multiple words showing first)
    • Alphabetical
  • "Loner tags": Tags that should not be tagged if a similar, longer tag is already matching.
    • This can be useful if you don't want short tags to be tagged alongside similar tags that are longer (more specific) and contain the same tag word, see the example...

Read the rest of this update entry...
 
Hi Mazzly, we receive the following error on upgrade:

Code:
    InvalidArgumentException: Accessed unknown getter 'pth_synonyms' on XF:Tag[1] src/XF/Mvc/Entity/Entity.php:213 
    Generated by: ******* 3 Jan 2023 at 22:57 

Stack trace

#0 src/XF/Mvc/Entity/Entity.php(119): XF\Mvc\Entity\Entity->get('pth_synonyms')
#1 src/addons/MaZ/PotentialTagHelper/Repository/PotentialTags.php(206): XF\Mvc\Entity\Entity->__get('pth_synonyms')
#2 src/addons/MaZ/PotentialTagHelper/Repository/PotentialTags.php(322): MaZ\PotentialTagHelper\Repository\PotentialTags->getSynonymMap()
#3 src/addons/MaZ/PotentialTagHelper/Job/RebuildPotentialTagWords.php(99): MaZ\PotentialTagHelper\Repository\PotentialTags->existingTagsOrSynonyms()
#4 src/XF/Job/AbstractRebuildJob.php(33): MaZ\PotentialTagHelper\Job\RebuildPotentialTagWords->complete()
#5 src/XF/Job/Manager.php(260): XF\Job\AbstractRebuildJob->run(7.98541)
#6 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 7.98541)
#7 src/XF/Job/Manager.php(118): XF\Job\Manager->runJobEntry(Array, 7.98541)
#8 src/XF/Admin/Controller/Tools.php(122): XF\Job\Manager->runByIds(Array, 8)
#9 src/XF/Mvc/Dispatcher.php(352): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(SV\UserMentionsImprovements\XF\Admin\Controller\Tools), NULL)
#11 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\UserMentionsImprovements\XF\Admin\Controller\Tools), NULL)
#12 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(2483): XF\Mvc\Dispatcher->run()
#14 src/XF.php(524): XF\App->run()
#15 admin.php(13): XF::runApp('XF\\Admin\\App')
#16 {main}


Request state

array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(40) "***********/admin.php?tools/run-job"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(77) "************/admin.php?add-ons/install-from-archive-complete&batch_id=564"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(13) "697452,697453"
  }
}
 
And

Code:
    ErrorException: [E_WARNING] foreach() argument must be of type array|object, null given src/addons/MaZ/PotentialTagHelper/Repository/PotentialTags.php:206 

    Generated by: ****** 3 Jan 2023 at 22:57 

Stack trace

#0 src/addons/MaZ/PotentialTagHelper/Repository/PotentialTags.php(206): XF::handlePhpError(2, '[E_WARNING] for...', '/home/******/d...', 206)
#1 src/addons/MaZ/PotentialTagHelper/Repository/PotentialTags.php(322): MaZ\PotentialTagHelper\Repository\PotentialTags->getSynonymMap()
#2 src/addons/MaZ/PotentialTagHelper/Job/RebuildPotentialTagWords.php(99): MaZ\PotentialTagHelper\Repository\PotentialTags->existingTagsOrSynonyms()
#3 src/XF/Job/AbstractRebuildJob.php(33): MaZ\PotentialTagHelper\Job\RebuildPotentialTagWords->complete()
#4 src/XF/Job/Manager.php(260): XF\Job\AbstractRebuildJob->run(7.98541)
#5 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 7.98541)
#6 src/XF/Job/Manager.php(118): XF\Job\Manager->runJobEntry(Array, 7.98541)
#7 src/XF/Admin/Controller/Tools.php(122): XF\Job\Manager->runByIds(Array, 8)
#8 src/XF/Mvc/Dispatcher.php(352): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#9 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(SV\UserMentionsImprovements\XF\Admin\Controller\Tools), NULL)
#10 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\UserMentionsImprovements\XF\Admin\Controller\Tools), NULL)
#11 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#12 src/XF/App.php(2483): XF\Mvc\Dispatcher->run()
#13 src/XF.php(524): XF\App->run()
#14 admin.php(13): XF::runApp('XF\\Admin\\App')
#15 {main}

Request state

array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(40) "********/admin.php?tools/run-job"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(77) "**********/admin.php?add-ons/install-from-archive-complete&batch_id=564"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(13) "697452,697453"
  }
}
 
And

Code:
    ErrorException: [E_WARNING] foreach() argument must be of type array|object, null given src/addons/MaZ/PotentialTagHelper/Repository/PotentialTags.php:206

    Generated by: ****** 3 Jan 2023 at 22:57

Stack trace

#0 src/addons/MaZ/PotentialTagHelper/Repository/PotentialTags.php(206): XF::handlePhpError(2, '[E_WARNING] for...', '/home/******/d...', 206)
#1 src/addons/MaZ/PotentialTagHelper/Repository/PotentialTags.php(322): MaZ\PotentialTagHelper\Repository\PotentialTags->getSynonymMap()
#2 src/addons/MaZ/PotentialTagHelper/Job/RebuildPotentialTagWords.php(99): MaZ\PotentialTagHelper\Repository\PotentialTags->existingTagsOrSynonyms()
#3 src/XF/Job/AbstractRebuildJob.php(33): MaZ\PotentialTagHelper\Job\RebuildPotentialTagWords->complete()
#4 src/XF/Job/Manager.php(260): XF\Job\AbstractRebuildJob->run(7.98541)
#5 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 7.98541)
#6 src/XF/Job/Manager.php(118): XF\Job\Manager->runJobEntry(Array, 7.98541)
#7 src/XF/Admin/Controller/Tools.php(122): XF\Job\Manager->runByIds(Array, 8)
#8 src/XF/Mvc/Dispatcher.php(352): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#9 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(SV\UserMentionsImprovements\XF\Admin\Controller\Tools), NULL)
#10 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\UserMentionsImprovements\XF\Admin\Controller\Tools), NULL)
#11 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#12 src/XF/App.php(2483): XF\Mvc\Dispatcher->run()
#13 src/XF.php(524): XF\App->run()
#14 admin.php(13): XF::runApp('XF\\Admin\\App')
#15 {main}

Request state

array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(40) "********/admin.php?tools/run-job"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(77) "**********/admin.php?add-ons/install-from-archive-complete&batch_id=564"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(13) "697452,697453"
  }
}

Oh yeah, that I did also see when first installing 1.0.7 onto our own forum... I wasn't able to reproduce it though and forgot about it 🙈 (It didn't make any harm though, just the rebuild job that fails there for some reason during the upgrade...)

I'll need to add some temporary suppression of that error there...


You might want to rebuild the potential tag words from the Tools > Rebuild caches :) 👍
 
Hi Mazzly, thanks! I tried to rebuild the caches, however, I received the following error messages. :)

Code:
    InvalidArgumentException: Accessed unknown getter 'pth_is_loner' on XF:Tag[1] src/XF/Mvc/Entity/Entity.php:213 

    Generated by: ****** 3 Jan 2023 at 23:12 

Stack trace

#0 src/XF/Mvc/Entity/Entity.php(119): XF\Mvc\Entity\Entity->get('pth_is_loner')
#1 src/addons/MaZ/PotentialTagHelper/Repository/PotentialTags.php(33): XF\Mvc\Entity\Entity->__get('pth_is_loner')
#2 src/addons/MaZ/PotentialTagHelper/Repository/PotentialTags.php(75): MaZ\PotentialTagHelper\Repository\PotentialTags->similarTagIds(Object(XF\Entity\Tag))
#3 src/addons/MaZ/PotentialTagHelper/Job/RebuildPotentialThreadTags.php(39): MaZ\PotentialTagHelper\Repository\PotentialTags->collectThreadIdsForTag(Object(XF\Entity\Tag), Array)
#4 src/XF/Job/AbstractRebuildJob.php(42): MaZ\PotentialTagHelper\Job\RebuildPotentialThreadTags->rebuildById(1)
#5 src/XF/Job/Manager.php(260): XF\Job\AbstractRebuildJob->run(8)
#6 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#7 src/XF/Job/Manager.php(118): XF\Job\Manager->runJobEntry(Array, 8)
#8 src/XF/Admin/Controller/Tools.php(122): XF\Job\Manager->runByIds(Array, 8)
#9 src/XF/Mvc/Dispatcher.php(352): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(SV\UserMentionsImprovements\XF\Admin\Controller\Tools), NULL)
#11 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\UserMentionsImprovements\XF\Admin\Controller\Tools), NULL)
#12 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(2483): XF\Mvc\Dispatcher->run()
#14 src/XF.php(524): XF\App->run()
#15 admin.php(13): XF::runApp('XF\\Admin\\App')
#16 {main}

Request state

array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(112) "****/admin.php?tools/run-job&only_id=697463&_xfRedirect=%2Fadmin.php%3Ftools%2Frebuild%26success%3D1"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(50) "*****/admin.php?tools/rebuild&success=1"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(6) "697463"
  }
}


and


Code:
    ErrorException: [E_WARNING] foreach() argument must be of type array|object, null given src/addons/MaZ/PotentialTagHelper/Repository/PotentialTags.php:80 

    Generated by: ****** 3 Jan 2023 at 23:12 

Stack trace

#0 src/addons/MaZ/PotentialTagHelper/Repository/PotentialTags.php(80): XF::handlePhpError(2, '[E_WARNING] for...', '/home/******/d...', 80)
#1 src/addons/MaZ/PotentialTagHelper/Job/RebuildPotentialThreadTags.php(39): MaZ\PotentialTagHelper\Repository\PotentialTags->collectThreadIdsForTag(Object(XF\Entity\Tag), Array)
#2 src/XF/Job/AbstractRebuildJob.php(42): MaZ\PotentialTagHelper\Job\RebuildPotentialThreadTags->rebuildById(1)
#3 src/XF/Job/Manager.php(260): XF\Job\AbstractRebuildJob->run(8)
#4 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#5 src/XF/Job/Manager.php(118): XF\Job\Manager->runJobEntry(Array, 8)
#6 src/XF/Admin/Controller/Tools.php(122): XF\Job\Manager->runByIds(Array, 8)
#7 src/XF/Mvc/Dispatcher.php(352): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#8 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(SV\UserMentionsImprovements\XF\Admin\Controller\Tools), NULL)
#9 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\UserMentionsImprovements\XF\Admin\Controller\Tools), NULL)
#10 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#11 src/XF/App.php(2483): XF\Mvc\Dispatcher->run()
#12 src/XF.php(524): XF\App->run()
#13 admin.php(13): XF::runApp('XF\\Admin\\App')
#14 {main}

Request state

array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(112) "*****/admin.php?tools/run-job&only_id=697463&_xfRedirect=%2Fadmin.php%3Ftools%2Frebuild%26success%3D1"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(50) "****/admin.php?tools/rebuild&success=1"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(6) "697463"
  }
}
 
Hi Mazzly, thanks! I tried to rebuild the caches, however, I received the following error messages. :)

Code:
    InvalidArgumentException: Accessed unknown getter 'pth_is_loner' on XF:Tag[1] src/XF/Mvc/Entity/Entity.php:213

    Generated by: ****** 3 Jan 2023 at 23:12

Stack trace

#0 src/XF/Mvc/Entity/Entity.php(119): XF\Mvc\Entity\Entity->get('pth_is_loner')
#1 src/addons/MaZ/PotentialTagHelper/Repository/PotentialTags.php(33): XF\Mvc\Entity\Entity->__get('pth_is_loner')
#2 src/addons/MaZ/PotentialTagHelper/Repository/PotentialTags.php(75): MaZ\PotentialTagHelper\Repository\PotentialTags->similarTagIds(Object(XF\Entity\Tag))
#3 src/addons/MaZ/PotentialTagHelper/Job/RebuildPotentialThreadTags.php(39): MaZ\PotentialTagHelper\Repository\PotentialTags->collectThreadIdsForTag(Object(XF\Entity\Tag), Array)
#4 src/XF/Job/AbstractRebuildJob.php(42): MaZ\PotentialTagHelper\Job\RebuildPotentialThreadTags->rebuildById(1)
#5 src/XF/Job/Manager.php(260): XF\Job\AbstractRebuildJob->run(8)
#6 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#7 src/XF/Job/Manager.php(118): XF\Job\Manager->runJobEntry(Array, 8)
#8 src/XF/Admin/Controller/Tools.php(122): XF\Job\Manager->runByIds(Array, 8)
#9 src/XF/Mvc/Dispatcher.php(352): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(SV\UserMentionsImprovements\XF\Admin\Controller\Tools), NULL)
#11 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\UserMentionsImprovements\XF\Admin\Controller\Tools), NULL)
#12 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(2483): XF\Mvc\Dispatcher->run()
#14 src/XF.php(524): XF\App->run()
#15 admin.php(13): XF::runApp('XF\\Admin\\App')
#16 {main}

Request state

array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(112) "****/admin.php?tools/run-job&only_id=697463&_xfRedirect=%2Fadmin.php%3Ftools%2Frebuild%26success%3D1"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(50) "*****/admin.php?tools/rebuild&success=1"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(6) "697463"
  }
}


and


Code:
    ErrorException: [E_WARNING] foreach() argument must be of type array|object, null given src/addons/MaZ/PotentialTagHelper/Repository/PotentialTags.php:80

    Generated by: ****** 3 Jan 2023 at 23:12

Stack trace

#0 src/addons/MaZ/PotentialTagHelper/Repository/PotentialTags.php(80): XF::handlePhpError(2, '[E_WARNING] for...', '/home/******/d...', 80)
#1 src/addons/MaZ/PotentialTagHelper/Job/RebuildPotentialThreadTags.php(39): MaZ\PotentialTagHelper\Repository\PotentialTags->collectThreadIdsForTag(Object(XF\Entity\Tag), Array)
#2 src/XF/Job/AbstractRebuildJob.php(42): MaZ\PotentialTagHelper\Job\RebuildPotentialThreadTags->rebuildById(1)
#3 src/XF/Job/Manager.php(260): XF\Job\AbstractRebuildJob->run(8)
#4 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#5 src/XF/Job/Manager.php(118): XF\Job\Manager->runJobEntry(Array, 8)
#6 src/XF/Admin/Controller/Tools.php(122): XF\Job\Manager->runByIds(Array, 8)
#7 src/XF/Mvc/Dispatcher.php(352): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#8 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(SV\UserMentionsImprovements\XF\Admin\Controller\Tools), NULL)
#9 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\UserMentionsImprovements\XF\Admin\Controller\Tools), NULL)
#10 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#11 src/XF/App.php(2483): XF\Mvc\Dispatcher->run()
#12 src/XF.php(524): XF\App->run()
#13 admin.php(13): XF::runApp('XF\\Admin\\App')
#14 {main}

Request state

array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(112) "*****/admin.php?tools/run-job&only_id=697463&_xfRedirect=%2Fadmin.php%3Ftools%2Frebuild%26success%3D1"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(50) "****/admin.php?tools/rebuild&success=1"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(6) "697463"
  }
}
Hmm, that one I can't reproduce... Now I'll really need to do some digging 😬


It might be good to verify that the thread tagging etc works fine on your forum, otherwise you might have to disable the addon until I have a fix 😬
 
Hi Mazzly, thanks! I tried to rebuild the caches, however, I received the following error messages. :)

Code:
    InvalidArgumentException: Accessed unknown getter 'pth_is_loner' on XF:Tag[1] src/XF/Mvc/Entity/Entity.php:213

    Generated by: ****** 3 Jan 2023 at 23:12

Stack trace

#0 src/XF/Mvc/Entity/Entity.php(119): XF\Mvc\Entity\Entity->get('pth_is_loner')
#1 src/addons/MaZ/PotentialTagHelper/Repository/PotentialTags.php(33): XF\Mvc\Entity\Entity->__get('pth_is_loner')
#2 src/addons/MaZ/PotentialTagHelper/Repository/PotentialTags.php(75): MaZ\PotentialTagHelper\Repository\PotentialTags->similarTagIds(Object(XF\Entity\Tag))
#3 src/addons/MaZ/PotentialTagHelper/Job/RebuildPotentialThreadTags.php(39): MaZ\PotentialTagHelper\Repository\PotentialTags->collectThreadIdsForTag(Object(XF\Entity\Tag), Array)
#4 src/XF/Job/AbstractRebuildJob.php(42): MaZ\PotentialTagHelper\Job\RebuildPotentialThreadTags->rebuildById(1)
#5 src/XF/Job/Manager.php(260): XF\Job\AbstractRebuildJob->run(8)
#6 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#7 src/XF/Job/Manager.php(118): XF\Job\Manager->runJobEntry(Array, 8)
#8 src/XF/Admin/Controller/Tools.php(122): XF\Job\Manager->runByIds(Array, 8)
#9 src/XF/Mvc/Dispatcher.php(352): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(SV\UserMentionsImprovements\XF\Admin\Controller\Tools), NULL)
#11 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\UserMentionsImprovements\XF\Admin\Controller\Tools), NULL)
#12 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(2483): XF\Mvc\Dispatcher->run()
#14 src/XF.php(524): XF\App->run()
#15 admin.php(13): XF::runApp('XF\\Admin\\App')
#16 {main}

Request state

array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(112) "****/admin.php?tools/run-job&only_id=697463&_xfRedirect=%2Fadmin.php%3Ftools%2Frebuild%26success%3D1"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(50) "*****/admin.php?tools/rebuild&success=1"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(6) "697463"
  }
}


and


Code:
    ErrorException: [E_WARNING] foreach() argument must be of type array|object, null given src/addons/MaZ/PotentialTagHelper/Repository/PotentialTags.php:80

    Generated by: ****** 3 Jan 2023 at 23:12

Stack trace

#0 src/addons/MaZ/PotentialTagHelper/Repository/PotentialTags.php(80): XF::handlePhpError(2, '[E_WARNING] for...', '/home/******/d...', 80)
#1 src/addons/MaZ/PotentialTagHelper/Job/RebuildPotentialThreadTags.php(39): MaZ\PotentialTagHelper\Repository\PotentialTags->collectThreadIdsForTag(Object(XF\Entity\Tag), Array)
#2 src/XF/Job/AbstractRebuildJob.php(42): MaZ\PotentialTagHelper\Job\RebuildPotentialThreadTags->rebuildById(1)
#3 src/XF/Job/Manager.php(260): XF\Job\AbstractRebuildJob->run(8)
#4 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#5 src/XF/Job/Manager.php(118): XF\Job\Manager->runJobEntry(Array, 8)
#6 src/XF/Admin/Controller/Tools.php(122): XF\Job\Manager->runByIds(Array, 8)
#7 src/XF/Mvc/Dispatcher.php(352): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#8 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(SV\UserMentionsImprovements\XF\Admin\Controller\Tools), NULL)
#9 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\UserMentionsImprovements\XF\Admin\Controller\Tools), NULL)
#10 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#11 src/XF/App.php(2483): XF\Mvc\Dispatcher->run()
#12 src/XF.php(524): XF\App->run()
#13 admin.php(13): XF::runApp('XF\\Admin\\App')
#14 {main}

Request state

array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(112) "*****/admin.php?tools/run-job&only_id=697463&_xfRedirect=%2Fadmin.php%3Ftools%2Frebuild%26success%3D1"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(50) "****/admin.php?tools/rebuild&success=1"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(6) "697463"
  }
}
Is there some pending action for the addon when you look in ACP home or addon home? thinking if the installation didn't finish due to the error and needs to be finalized? 🤔
 
Hi! Just FYI:
/forum/admin.php?tools/run-job
Code:
An exception occurred: [XF\Db\Exception] MySQL statement prepare error [2006]: MySQL server has gone away in src/XF/Db/AbstractStatement.php on line 230

XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 198
XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 41
XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 56
XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 96
XF\Db\AbstractAdapter->query() in src/XF/Mvc/Entity/Finder.php at line 1359
XF\Mvc\Entity\Finder->fetchOne() in src/XF/Repository/UpgradeCheck.php at line 32
XF\Repository\UpgradeCheck->getLatestUpgradeCheck() in src/XF/Admin/App.php at line 241
XF\Admin\App->renderPageHtml() in src/XF/App.php at line 2151
XF\App->renderPage() in src/XF/Admin/App.php at line 125
XF\Admin\App->renderPage() in src/XF/Mvc/Dispatcher.php at line 404
XF\Mvc\Dispatcher->render() in src/XF/Mvc/Dispatcher.php at line 60
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2353
XF\App->run() in src/XF.php at line 524
XF::runApp() in admin.php at line 13

Restart - no error...
Thanks!
 
Hi! Just FYI:
/forum/admin.php?tools/run-job
Code:
An exception occurred: [XF\Db\Exception] MySQL statement prepare error [2006]: MySQL server has gone away in src/XF/Db/AbstractStatement.php on line 230

XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 198
XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 41
XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 56
XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 96
XF\Db\AbstractAdapter->query() in src/XF/Mvc/Entity/Finder.php at line 1359
XF\Mvc\Entity\Finder->fetchOne() in src/XF/Repository/UpgradeCheck.php at line 32
XF\Repository\UpgradeCheck->getLatestUpgradeCheck() in src/XF/Admin/App.php at line 241
XF\Admin\App->renderPageHtml() in src/XF/App.php at line 2151
XF\App->renderPage() in src/XF/Admin/App.php at line 125
XF\Admin\App->renderPage() in src/XF/Mvc/Dispatcher.php at line 404
XF\Mvc\Dispatcher->render() in src/XF/Mvc/Dispatcher.php at line 60
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2353
XF\App->run() in src/XF.php at line 524
XF::runApp() in admin.php at line 13

Restart - no error...
Thanks!
Hmm that is interesting... Does it also happen if you rebuild the words i tools > rebuild caches? 🤔

Got a large forum or small? And is the server a dedicated one or some shared hosting?
Thinking if the amount of thread titles loaded might have made the db server use too much memory and the server was killed off? 🤔
 
Hmm that is interesting... Does it also happen if you rebuild the words i tools > rebuild caches? 🤔
Yes. Starting, work 20 seconds and the error again.
An exception occurred: [XF\Db\Exception] MySQL statement prepare error [2006]: MySQL server has gone away in src/XF/Db/AbstractStatement.php on line 230

  1. XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 198
  2. XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 41
  3. XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 56
  4. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 96
  5. XF\Db\AbstractAdapter->query() in src/XF/Mvc/Entity/Finder.php at line 1397
  6. XF\Mvc\Entity\Finder->fetchOne() in src/XF/Repository/UpgradeCheck.php at line 32
  7. XF\Repository\UpgradeCheck->getLatestUpgradeCheck() in src/XF/Admin/App.php at line 254
  8. XF\Admin\App->renderPageHtml() in src/XF/App.php at line 2281
  9. XF\App->renderPage() in src/XF/Admin/App.php at line 138
  10. XF\Admin\App->renderPage() in src/XF/Mvc/Dispatcher.php at line 404
  11. XF\Mvc\Dispatcher->render() in src/XF/Mvc/Dispatcher.php at line 60
  12. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2483
  13. XF\App->run() in src/XF.php at line 524
  14. XF::runApp() in admin.php at line 13

Got a large forum or small? And is the server a dedicated one or some shared hosting?
Large forum (1500000 posts).
Dedicated server (32Gb RAM)
Another forum (30000 posts), the addon works well (forum on the same server).

Thinking if the amount of thread titles loaded might have made the db server use too much memory and the server was killed off? 🤔
I don't think the error occurs after a few seconds. After restarting the rebuild, the error occurs after 3-5 seconds.

FYI:
The previous version worked well.
Addon created tags
I removed one of them using хenforo.
The addon crashed with an error, now I don’t remember exactly with which one.
The new version of the addon on this forum does not work, maybe this is the reason?
 
Last edited:
FYI:
The previous version worked well.
Addon created tags
I removed one of them using хenforo.
The addon crashed with an error, now I don’t remember exactly with which one.
The new version of the addon on this forum does not work, maybe this is the reason?
If that one happens again let me know and I can have a look...



Are you able to check the SQL server logs when it goes down? if so could you send me that? 🤔

Previous versions stored 10K words in an array in the simple cache...
The new version stores the words (up to 50K) in a database table and are bulk inserted... There might be something related here... Maybe should put it back to 10K and allow an addon option to set it higher, but to be honest 10K potential words are a lot also :D
 
Back
Top Bottom