Fixed Rebuild reaction score - server error

Astra

Active member
Affected version
2.1.5a
Rebuild reaction score - There is a server error in my three forums.
One and the same error on three different forums, updated yesterday, on the latest version (2.1.5a) of the forum.

Снимок экрана 2019-11-07 в 23.08.29.png

At some intervals, a window appears to manually complete the rebuild.
To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
Last edited:
Maybe someone knows how to solve this problem? Every few hours, a notification pops up about the manual completion of the rearrangement of reactions. When rebuilding constantly a mistake, at least tell me in which direction to move? Will it be solved in the next version or is it just me?

Sorry for my English.
Снимок экрана 2019-11-09 в 09.54.28.png

Снимок экрана 2019-11-09 в 09.54.17.png


Code:
ErrorException: [E_NOTICE] Undefined index: start src/XF/Job/AbstractRebuildJob.php:61
Generated by: Admin Nov 9, 2019 at 8:05 AM
Stack trace
#0 src/XF/Job/AbstractRebuildJob.php(61): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/home/metro/pub...', 61, Array)
#1 src/XF/Admin/Controller/Tools.php(174): XF\Job\AbstractRebuildJob->getStatusMessage()
#2 src/XF/Mvc/Dispatcher.php(350): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#3 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Tools), NULL)
#4 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Tools), NULL)
#5 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#6 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#7 src/XF.php(391): XF\App->run()
#8 admin.php(13): XF::runApp('XF\\Admin\\App')
#9 {main}
Request state
array(4) {
  ["url"] => string(94) "/admin.php?tools/run-job&only_id=5188&_xfRedirect=%2Fadmin.php%3Ftools%2Frebuild%26success%3D1"
  ["referrer"] => string(47) "https://my_domain/admin.php?tools/rebuild"
  ["_GET"] => array(3) {
    ["tools/run-job"] => string(0) ""
    ["only_id"] => string(4) "5188"
    ["_xfRedirect"] => string(34) "/admin.php?tools/rebuild&success=1"
  }
  ["_POST"] => array(0) {
  }
}

Code:
ErrorException: [E_NOTICE] Undefined index: steps src/XF/Job/AbstractRebuildJob.php:28
Generated by: Admin Nov 9, 2019 at 8:05 AM
Stack trace
#0 src/XF/Job/AbstractRebuildJob.php(28): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/home/metro/pub...', 28, Array)
#1 src/XF/Job/Manager.php(253): XF\Job\AbstractRebuildJob->run(G)
#2 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#3 src/XF/Job/Manager.php(111): XF\Job\Manager->runJobEntry(Array, G)
#4 src/XF/Admin/Controller/Tools.php(120): XF\Job\Manager->runByIds(Array, 8)
#5 src/XF/Mvc/Dispatcher.php(350): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#6 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Tools), NULL)
#7 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Tools), NULL)
#8 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#9 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#10 src/XF.php(391): XF\App->run()
#11 admin.php(13): XF::runApp('XF\\Admin\\App')
#12 {main}
Request state
array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(117) "https://my_domain.club/admin.php?tools/run-job&only_id=5188&_xfRedirect=%2Fadmin.php%3Ftools%2Frebuild%26success%3D1"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(57) "https://my_domain.club/admin.php?tools/rebuild&success=1"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(4) "5188"
  }
}

Code:
#0 src/XF/Job/AbstractRebuildJob.php(30): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/home/metro/pub...', 30, Array)
#1 src/XF/Job/Manager.php(253): XF\Job\AbstractRebuildJob->run(G)
#2 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#3 src/XF/Job/Manager.php(111): XF\Job\Manager->runJobEntry(Array, G)
#4 src/XF/Admin/Controller/Tools.php(120): XF\Job\Manager->runByIds(Array, 8)
#5 src/XF/Mvc/Dispatcher.php(350): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#6 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Tools), NULL)
#7 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Tools), NULL)
#8 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#9 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#10 src/XF.php(391): XF\App->run()
#11 admin.php(13): XF::runApp('XF\\Admin\\App')
#12 {main}
Request state
array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(117) "https://my_domain.club/admin.php?tools/run-job&only_id=5188&_xfRedirect=%2Fadmin.php%3Ftools%2Frebuild%26success%3D1"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(57) "https://my_domain.club/admin.php?tools/rebuild&success=1"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(4) "5188"
  }
}

Code:
ErrorException: [E_NOTICE] Undefined index: batch src/XF/Job/AbstractRebuildJob.php:30
Generated by: Admin Nov 9, 2019 at 8:05 AM
Stack trace
#0 src/XF/Job/AbstractRebuildJob.php(30): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/home/metro/pub...', 30, Array)
#1 src/XF/Job/Manager.php(253): XF\Job\AbstractRebuildJob->run(G)
#2 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#3 src/XF/Job/Manager.php(111): XF\Job\Manager->runJobEntry(Array, G)
#4 src/XF/Admin/Controller/Tools.php(120): XF\Job\Manager->runByIds(Array, 8)
#5 src/XF/Mvc/Dispatcher.php(350): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#6 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Tools), NULL)
#7 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Tools), NULL)
#8 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#9 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#10 src/XF.php(391): XF\App->run()
#11 admin.php(13): XF::runApp('XF\\Admin\\App')
#12 {main}
Request state
array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(117) "https://my_domain.club/admin.php?tools/run-job&only_id=5188&_xfRedirect=%2Fadmin.php%3Ftools%2Frebuild%26success%3D1"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(57) "https://my_domain.club/admin.php?tools/rebuild&success=1"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(4) "5188"
  }
}
 
Last edited:
Are you saying that you didn’t run this rebuild yourself?

We don’t routinely perform this job so if you aren’t running it then you have an add-on which is calling it automatically which is not something that needs to be done.

I’m leaning towards that because generally speaking there’s never any reason for these errors to happen. If the job is called properly those values it says are undefined will always be present.
 
Are you saying that you didn’t run this rebuild yourself?

We don’t routinely perform this job so if you aren’t running it then you have an add-on which is calling it automatically which is not something that needs to be done.

I’m leaning towards that because generally speaking there’s never any reason for these errors to happen. If the job is called properly those values it says are undefined will always be present.
No, I myself launched the rebuilding of caches, I do it once-twice a month, in the hope that this is a necessary action after updating the forum with the new version.
There have never been server errors before this update, and the cache was always rebuilt without a single error.
 
Last edited:
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.6).

Change log:
Ensure we don't overwrite the rebuildDefaultData array in rebuild jobs. Additional data should be initialized in the defaultData array as normal.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
First, there's never any reason to rebuild things routinely. You should only do it if there is a specific reason to or we ask you to.

Second, this is a bug, as noted above.

For now, please fix the file manually. Edit src/XF/Job/ReactionScore.php and find:

PHP:
$rebuildDefaultData

And replace with:
PHP:
$defaultData
 
Hello,

I applied the fix, however the third job never goes away, got stuck in the jobs table. And I got the "waiting manual job" message regularly for the reaction counted status:

1574020143925.webp

Yes, it was a manual execution that I had to after transferring thanks / likes from another system manually.

Should I delete this entry?

Thanks.
 
No need to delete anything, a new update will be released that everyone is looking forward to and I hope all errors will be fixed.
At the moment, I have exactly the same situation as you. Manual rebuild that is not executed.

P.S. It would be great if the instructions to the forum would explain for non-programmers what manual rebuilding of the cache is and when and why to use it.
 
Thanks for the information, @Astra. It looks we'll have to manually run the reaction cache until the update.

I had to transfer likes from another database and from separated sources. That's why I needed to rebuild the cache.
 
No need to delete anything, a new update will be released that everyone is looking forward to and I hope all errors will be fixed.
At the moment, I have exactly the same situation as you. Manual rebuild that is not executed.

P.S. It would be great if the instructions to the forum would explain for non-programmers what manual rebuilding of the cache is and when and why to use it.
Thank you!
 
The error (as in the server error that is logged) is definitely not there in the new version.

Maybe you’re seeing this, instead?

 
Back
Top Bottom