You can use the following CSS rule:@Lior Thanks that did it great add on.
Where would I change the button colour of the best Answer so it sands out a bit more besides the other options
View attachment 103125
.messageMeta item.control.MarkBestAnswer
Server Error Log
Error Info
ErrorException: Undefined index: thread_id - library/BestAnswer/Model/BestAnswer.php:181
Generated By: Unknown Account, Today at 12:57 AM
Stack Trace
#0 /home4/davem/public_html/library/BestAnswer/Model/BestAnswer.php(181): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home4/davem/pu...', 181, Array)
#1 /home4/davem/public_html/library/BestAnswer/DataWriter/DiscussionMessage/Post.php(29): BestAnswer_Model_BestAnswer->recalculateBestAnswerForThread(Array)
#2 /home4/davem/public_html/library/XenForo/DataWriter/DiscussionMessage.php(590): BestAnswer_DataWriter_DiscussionMessage_Post->_messagePostSave()
#3 /home4/davem/public_html/library/XenForo/DataWriter.php(1409): XenForo_DataWriter_DiscussionMessage->_postSave()
#4 /home4/davem/public_html/library/XenMods/SameThreadFeed/Model/Feed.php(76): XenForo_DataWriter->save()
#5 /home4/davem/public_html/library/XenForo/Model/Feed.php(540): XenMods_SameThreadFeed_Model_Feed->_insertFeedEntry(Array, Array, Array)
#6 /home4/davem/public_html/library/XenForo/Model/Feed.php(567): XenForo_Model_Feed->_insertFeedData(Array, Array)
#7 /home4/davem/public_html/library/XenForo/Model/Feed.php(592): XenForo_Model_Feed->importFeedData(Array)
#8 /home4/davem/public_html/library/XenForo/CronEntry/Feeder.php(15): XenForo_Model_Feed->scheduledImportTimeLimited(15)
#9 [internal function]: XenForo_CronEntry_Feeder::importFeeds(Array)
#10 /home4/davem/public_html/library/XenForo/Model/Cron.php(357): call_user_func(Array, Array)
#11 /home4/davem/public_html/library/XenForo/Deferred/Cron.php(24): XenForo_Model_Cron->runEntry(Array)
#12 /home4/davem/public_html/library/XenForo/Model/Deferred.php(294): XenForo_Deferred_Cron->execute(Array, Array, 7.99999809265, '')
#13 /home4/davem/public_html/library/XenForo/Model/Deferred.php(428): XenForo_Model_Deferred->runDeferred(Array, 7.99999809265, '', false)
#14 /home4/davem/public_html/library/XenForo/Model/Deferred.php(373): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#15 /home4/davem/public_html/deferred.php(23): XenForo_Model_Deferred->run(false)
#16 {main}
Request State
array(3) {
["url"] => string(33) "http://mycatchat.com/deferred.php"
["_GET"] => array(0) {
}
["_POST"] => array(3) {
["_xfRequestUri"] => string(44) "/threads/natural-cat-raw-cat-food-recipe.44/"
["_xfNoRedirect"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
Mysqli statement execute error : Field 'alternative_best_answers' doesn't have a default value
Will contact you via a PC.@Lior. I seem to be running the following errors
Code:Server Error Log Error Info ErrorException: Undefined index: thread_id - library/BestAnswer/Model/BestAnswer.php:181 Generated By: Unknown Account, Today at 12:57 AM Stack Trace #0 /home4/davem/public_html/library/BestAnswer/Model/BestAnswer.php(181): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home4/davem/pu...', 181, Array) #1 /home4/davem/public_html/library/BestAnswer/DataWriter/DiscussionMessage/Post.php(29): BestAnswer_Model_BestAnswer->recalculateBestAnswerForThread(Array) #2 /home4/davem/public_html/library/XenForo/DataWriter/DiscussionMessage.php(590): BestAnswer_DataWriter_DiscussionMessage_Post->_messagePostSave() #3 /home4/davem/public_html/library/XenForo/DataWriter.php(1409): XenForo_DataWriter_DiscussionMessage->_postSave() #4 /home4/davem/public_html/library/XenMods/SameThreadFeed/Model/Feed.php(76): XenForo_DataWriter->save() #5 /home4/davem/public_html/library/XenForo/Model/Feed.php(540): XenMods_SameThreadFeed_Model_Feed->_insertFeedEntry(Array, Array, Array) #6 /home4/davem/public_html/library/XenForo/Model/Feed.php(567): XenForo_Model_Feed->_insertFeedData(Array, Array) #7 /home4/davem/public_html/library/XenForo/Model/Feed.php(592): XenForo_Model_Feed->importFeedData(Array) #8 /home4/davem/public_html/library/XenForo/CronEntry/Feeder.php(15): XenForo_Model_Feed->scheduledImportTimeLimited(15) #9 [internal function]: XenForo_CronEntry_Feeder::importFeeds(Array) #10 /home4/davem/public_html/library/XenForo/Model/Cron.php(357): call_user_func(Array, Array) #11 /home4/davem/public_html/library/XenForo/Deferred/Cron.php(24): XenForo_Model_Cron->runEntry(Array) #12 /home4/davem/public_html/library/XenForo/Model/Deferred.php(294): XenForo_Deferred_Cron->execute(Array, Array, 7.99999809265, '') #13 /home4/davem/public_html/library/XenForo/Model/Deferred.php(428): XenForo_Model_Deferred->runDeferred(Array, 7.99999809265, '', false) #14 /home4/davem/public_html/library/XenForo/Model/Deferred.php(373): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false) #15 /home4/davem/public_html/deferred.php(23): XenForo_Model_Deferred->run(false) #16 {main} Request State array(3) { ["url"] => string(33) "http://mycatchat.com/deferred.php" ["_GET"] => array(0) { } ["_POST"] => array(3) { ["_xfRequestUri"] => string(44) "/threads/natural-cat-raw-cat-food-recipe.44/" ["_xfNoRedirect"] => string(1) "1" ["_xfResponseType"] => string(4) "json" } }
The only thing I can suggest is to set a default value for the alternative_best_answers or disable STRICT_TRANS_TABLES, exactly as the this post suggests:If i deactivated this add on (not deintall) i get this message if i create a new thread:
the same problem here: https://xenforo.com/community/threa...as-best-answer-cant-create-new-threads.88136/
<xen:if is="{$post.showBestAnswer}">
<xen:if is="{$post.showBestAnswer} AND {$post.user_id} != {$thread.user_id}">
You have wrong Group Permission setup then as I don't have this issue.I'm not sure if this is by design, but the thread creator can also mark any of their own replies to their own thread as best answer. They do not have the "Mark any post as best answer" permission set either.
So to prevent people from creating threads and marking their own response as best answer, I done this in the best_answer_post_button template...
Find
Code:<xen:if is="{$post.showBestAnswer}">
Replace
Code:<xen:if is="{$post.showBestAnswer} AND {$post.user_id} != {$thread.user_id}">
They do not have the "Mark any post as best answer" permission set either.
The only permission the user has relating to best answers is "mark post as best answer" and NOT "mark any post as best answer"
A bug which caused the list of the best and alternative answers to now show in case the best answer was not in the first page has been fixed.
That's by design, actually.I'm not sure if this is by design, but the thread creator can also mark any of their own replies to their own thread as best answer. They do not have the "Mark any post as best answer" permission set either.
So to prevent people from creating threads and marking their own response as best answer, I done this in the best_answer_post_button template...
Find
Code:<xen:if is="{$post.showBestAnswer}">
Replace
Code:<xen:if is="{$post.showBestAnswer} AND {$post.user_id} != {$thread.user_id}">
This is a bug indeed which I've just fixed, thanks.I've just noticed another problem...
The bestAnswerList only shows up if the BA is on the same page as the OP. If the BA is not on page 1, then no link comes up below the OP.
I have it enabled in OPTIONS and like I say, it comes up fine but only if the BA is on page 1.
Also, if I also enable "embed in first post" in OPTIONS as well as the "below first post", but then disable the template mod for the embed, the BAL will come up as it should when the BA is not the same page as the OP.
So if...
OPTIONS:
Embed Best Answer in First Post - Disabled
Display Best Answer Link Under First Post - Enabled
...and BA marked on page 1...
bestAnswerList shows up below the OP
... but if...
OPTIONS:
Embed Best Answer in First Post - Disabled
Display Best Answer Link Under First Post - Enabled
...and BA marked on page 2...
bestAnswerList DOESN'T show up below the OP
...then if...
OPTIONS:
Embed Best Answer in First Post - Enabled
Display Best Answer Link Under First Post - Enabled
...and BA marked on page 1 or page 2...
bestAnswerList shows up below the OP
BA is embedded in first post
... then if...
OPTIONS:
Embed Best Answer in First Post - Enabled
Display Best Answer Link Under First Post - Enabled AND template mod for embed first post - Disabled
...and BA marked on page 1 or page 2...
bestAnswerList shows up below the OP
BA is embedded in first post DOESN'T show up
But then, if I disable the Embed Best Answer in First Post in options, even with the template mod already disabled. I'm back to square one with no bestAnswerList below OP if BA is on page 2
Anyone else have this issue?
We use essential cookies to make this site work, and optional cookies to enhance your experience.