Mark Posts as Best Answer [Deleted]

Lior. updated Mark Posts as Best Answer with a new update entry:

Implemented improvement requests as well as a bug fix

  • The copy of the best answer which is currently displayed at the top of the thread can now be disabled.
  • Rebuilding the thread cache after changing the minimum number of votes required for a post to become best answer now updates the best answer of threads according to the new value.
  • Fixed a bug which caused the best answer to show at the bottom of the first page when the best answer was the first post in the second page.

Read the rest of this update entry...
 
Rebuilding Thread cache generate this error:
Code:
Server Error Log

Error Info
XenForo_Exception: The requested user could not be found. - library/XenForo/DataWriter.php:1345
Generated By: Draft, 1 minute ago

Stack Trace

#0 /library/XenForo/DataWriter.php(1387): XenForo_DataWriter->_haveErrorsPreventSave()
#1 /library/BestAnswer/Model/BestAnswer.php(184): XenForo_DataWriter->save()
#2 /library/BestAnswer/DataWriter/Discussion/Thread.php(32): BestAnswer_Model_BestAnswer->recalculateBestAnswerForThread(Array)
#3 /library/XenForo/Deferred/Thread.php(44): BestAnswer_DataWriter_Discussion_Thread->rebuildDiscussionCounters()
#4 /library/XenForo/Model/Deferred.php(256): XenForo_Deferred_Thread->execute(Array, Array, 7.3757288455963, '')
#5 /library/XenForo/Model/Deferred.php(390): XenForo_Model_Deferred->runDeferred(Array, 7.3757288455963, '', false)
#6 /library/XenForo/Model/Deferred.php(335): XenForo_Model_Deferred->_runInternal(Array, 7.3757309913635, '', false)
#7 /library/XenForo/ViewRenderer/Abstract.php(352): XenForo_Model_Deferred->run(true, 7.3757309913635)
#8 /library/XenForo/ViewRenderer/HtmlAdmin.php(130): XenForo_ViewRenderer_Abstract::hasManualDeferredToRun(true)
#9 /library/XenForo/FrontController.php(618): XenForo_ViewRenderer_HtmlAdmin->renderContainer(Object(XenForo_Template_Admin), Array)
#10 /library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_Error), Object(XenForo_ViewRenderer_HtmlAdmin), Array)
#11 /admin.php(13): XenForo_FrontController->run()
#12 {main}

Request State

array(3) {
  ["url"] => string(53) "https://www.phcorner.net/admin.php?tools/run-deferred"
  ["_GET"] => array(1) {
    ["tools/run-deferred"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["redirect"] => string(58) "https://www.phcorner.net/admin.php?tools/rebuild&success=1"
    ["execute"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
  }
}
 
One more question
Does it show the number of "best answer" only to the best answered post or in all post that receive a "best answer"

Thank
 
With the latest update, Post New Thread becomes "Ask a Question" Why?

For this, forum selection would be better.
 
Rebuilding Thread cache generate this error:
Code:
Server Error Log

Error Info
XenForo_Exception: The requested user could not be found. - library/XenForo/DataWriter.php:1345
Generated By: Draft, 1 minute ago

Stack Trace

#0 /library/XenForo/DataWriter.php(1387): XenForo_DataWriter->_haveErrorsPreventSave()
#1 /library/BestAnswer/Model/BestAnswer.php(184): XenForo_DataWriter->save()
#2 /library/BestAnswer/DataWriter/Discussion/Thread.php(32): BestAnswer_Model_BestAnswer->recalculateBestAnswerForThread(Array)
#3 /library/XenForo/Deferred/Thread.php(44): BestAnswer_DataWriter_Discussion_Thread->rebuildDiscussionCounters()
#4 /library/XenForo/Model/Deferred.php(256): XenForo_Deferred_Thread->execute(Array, Array, 7.3757288455963, '')
#5 /library/XenForo/Model/Deferred.php(390): XenForo_Model_Deferred->runDeferred(Array, 7.3757288455963, '', false)
#6 /library/XenForo/Model/Deferred.php(335): XenForo_Model_Deferred->_runInternal(Array, 7.3757309913635, '', false)
#7 /library/XenForo/ViewRenderer/Abstract.php(352): XenForo_Model_Deferred->run(true, 7.3757309913635)
#8 /library/XenForo/ViewRenderer/HtmlAdmin.php(130): XenForo_ViewRenderer_Abstract::hasManualDeferredToRun(true)
#9 /library/XenForo/FrontController.php(618): XenForo_ViewRenderer_HtmlAdmin->renderContainer(Object(XenForo_Template_Admin), Array)
#10 /library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_Error), Object(XenForo_ViewRenderer_HtmlAdmin), Array)
#11 /admin.php(13): XenForo_FrontController->run()
#12 {main}

Request State

array(3) {
  ["url"] => string(53) "https://www.phcorner.net/admin.php?tools/run-deferred"
  ["_GET"] => array(1) {
    ["tools/run-deferred"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["redirect"] => string(58) "https://www.phcorner.net/admin.php?tools/rebuild&success=1"
    ["execute"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
  }
}
Fixed in the latest release.

Still there's no option to enable this on selected forum only?
Actually, there always has been an option. Take a look at the forum options.

One more question
Does it show the number of "best answer" only to the best answered post or in all post that receive a "best answer"

Thank
Not sure I understand the question.

With the latest update, Post New Thread becomes "Ask a Question" Why?

For this, forum selection would be better.
I've done some experimenting and accidentally included the changes in the release. Reverted in the latest release.
 
@Lior. What he means that by default to turn it on. Now if you install, it's turned on for all forums. Please change this that you have to enable it. I think people have like a lot of forums, but only a few need this option. Now you have to turn it off for all forums which takes a lot of time. So pretty please :)
 
@Lior. What he means that by default to turn it on. Now if you install, it's turned on for all forums. Please change this that you have to enable it. I think people have like a lot of forums, but only a few need this option. Now you have to turn it off for all forums which takes a lot of time. So pretty please :)
Yes that's what I want.
I have almost 200 forum nodes and selecting each forum to disable mark as best answer could take a lot of time.
 
@Lior. What he means that by default to turn it on. Now if you install, it's turned on for all forums. Please change this that you have to enable it. I think people have like a lot of forums, but only a few need this option. Now you have to turn it off for all forums which takes a lot of time. So pretty please :)
Will make it disabled by default in the next release.

It's not going to help for people who have already installed the add-on though. So if you've already installed the add-on and would like to make the option disabled for all of the forums, you can run the following query:
Code:
UPDATE xf_forum SET allow_best_answer = 0
 
Will make it disabled by default in the next release.

It's not going to help for people who have already installed the add-on though. So if you've already installed the add-on and would like to make the option disabled for all of the forums, you can run the following query:
Code:
UPDATE xf_forum SET allow_best_answer = 0

Thanks!
 
Will make it disabled by default in the next release.

It's not going to help for people who have already installed the add-on though. So if you've already installed the add-on and would like to make the option disabled for all of the forums, you can run the following query:
Code:
UPDATE xf_forum SET allow_best_answer = 0
I still encounter this problem right now. :/
This query fixed my problem (y)
 
@Lior.
Is it normal that every member can unmark best answer even if they did not vote?

admin have the permission "Mark any post as Best Answer"

does that mean, if admin vote for one post, it will be the best answer no matter votes on other posts?



Please add this Feature on Notable Members page in new tab, Thanks !
+1

it will be nice to have the list of members with most best answer

Thank you
 
  • Like
Reactions: rdn
@Lior.

i think there is a bug
when a user vote for a post, other users can't vote best answer for the same post
they can only unmark best answer?

any idea???
 
Top Bottom