Question Threads

Question Threads 2.1.2

No permission to download
@Kintaro
Not sure. There is a ThemeHouse Question Threads addon which looks more like StackOverflow.

My addon is different. The questions in my addon are regular threads where people can discuss and not only answer to the question. In SO, you are to answer the question and all the disscussions are moved to comments.

is only the OP that can set a reply as a best answer

You can allow moderators to select/unselect best answers in any threads.
 
@CMTV If it helps at all, I installed 2.1.0 to a test install and the table that is created is xf_CMTV_QT_best_answer, but the job that runs during installation is looking for xf_cmtv_qt_best_answer.

got the same errors when installing 2.1.2


CMTV, are u sure updated repo?
 
Upgraded and now getting:

Code:
XF\Db\Exception: MySQL query error [1364]: Field 'QT_best_answer_id' doesn't have a default value in src/XF/Db/AbstractStatement.php at line 217
XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 77
XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 94
XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 221
XF\Db\AbstractAdapter->insert() in src/XF/Mvc/Entity/Entity.php at line 1452
XF\Mvc\Entity\Entity->_saveToSource() in src/XF/Mvc/Entity/Entity.php at line 1184
XF\Mvc\Entity\Entity->save() in src/XF/Service/Thread/Creator.php at line 285
XF\Service\Thread\Creator->_save() in src/XF/Service/ValidateAndSavableTrait.php at line 40
XF\Service\Thread\Creator->save() in src/XF/Pub/Controller/Forum.php at line 750
XF\Pub\Controller\Forum->actionPostThread() in src/XF/Mvc/Dispatcher.php at line 321
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 248
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 100
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 50
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2177
XF\App->run() in src/XF.php at line 390
XF::runApp() in index.php at line 20


Logs also show this template error:
  • ErrorException: Template error: Template public:alert_post_QT_best_answer_selected is unknown
  • src/XF/Template/Templater.php:618

Code:
[internal function]: XF\Template\Templater->handleTemplateError(512, 'Template public...', 'src...', 618, Array)
#1 src/XF/Template/Templater.php(618): trigger_error('Template public...', 512)
#2 src/XF/Template/Templater.php(566): XF\Template\Templater->getTemplateData('public', 'alert_post_QT_b...')
#3 src/XF/Template/Templater.php(1300): XF\Template\Templater->getTemplateCode('public', 'alert_post_QT_b...')
#4 src/XF/Alert/AbstractHandler.php(80): XF\Template\Templater->renderTemplate('alert_post_QT_b...', Array)
#5 src/XF/Entity/UserAlert.php(69): XF\Alert\AbstractHandler->render(Object(XF\Entity\UserAlert))
#6 [internal function]: XF\Entity\UserAlert->render()
#7 src/XF/Template/Templater.php(985): call_user_func_array(Array, Array)
#8 internal_data/code_cache/templates/l1/s1/public/alert_macros.php(18): XF\Template\Templater->method(Object(XF\Entity\UserAlert), 'render', Array)
#9 src/XF/Template/Templater.php(701): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Array)
#10 internal_data/code_cache/templates/l1/s1/public/account_alerts.php(28): XF\Template\Templater->callMacro('alert_macros', 'row', Array, Array)
#11 src/XF/Template/Templater.php(1301): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array)
#12 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('account_alerts', Array)
#13 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#14 src/XF/Mvc/Dispatcher.php(418): XF\Mvc\Renderer\Html->renderView('XF:Account\\Aler...', 'public:account_...', Array)
#15 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#16 src/XF/Mvc/Dispatcher.php(360): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#17 src/XF/Mvc/Dispatcher.php(53): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#18 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#19 src/XF.php(390): XF\App->run()
#20 index.php(20): XF::runApp('XF\\Pub\\App')
#21 {main}
 
IDK what I'm doing wrong with the install and/or setup of this add-on.
But I cannot see basically ANY of the functionality that this add-on is supposed to provide once it's installed.
Usergroup permissions seem correct. But none of the options are appearing.
Any suggestions would be helpful.

Thanks! Really brilliant share. Just wish I could get to work properly...

J.
 
IDK what I'm doing wrong with the install and/or setup of this add-on.
But I cannot see basically ANY of the functionality that this add-on is supposed to provide once it's installed.
Usergroup permissions seem correct. But none of the options are appearing.
Any suggestions would be helpful.

Thanks! Really brilliant share. Just wish I could get to work properly...

J.
Hello?!...
@CMTV any suggestions please?
Thanks.

J.
 
Hi there,

I'm running the latest version and it threw about 1.500 pages of errors in three days:
Server error log
  • TypeError: Argument 1 passed to XF\Repository\UserAlert::alertFromUser() must be an instance of XF\Entity\User, null given, called in /pub.local/xxxx/src/addons/CMTV/QuestionThreads/Job/AlertWatchers.php on line 65
  • src/XF/Repository/UserAlert.php:85
  • Generated by: Unknown account
  • Jun 17, 2019 at 6:35 AM
Stack trace
#0 src/addons/CMTV/QuestionThreads/Job/AlertWatchers.php(65): XF\Repository\UserAlert->alertFromUser(NULL, Object(SV\SignupAbuseBlocking\XF\Entity\User), 'thread', 129499, 'marked_solved')
#1 src/XF/Job/AbstractRebuildJob.php(47): CMTV\QuestionThreads\Job\AlertWatchers->rebuildById(11441)
#2 src/XF/Job/Manager.php(253): XF\Job\AbstractRebuildJob->run(G)
#3 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#4 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#5 job.php(42): XF\Job\Manager->runQueue(false, 8)
#6 {main}

Request state
array(4) {
["url"] => string(20) "/synthesizer/job.php"
["referrer"] => string(60) "https://www.sequencer.de/synthesizer/whats-new/posts/398953/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}

I had the same issue a week ago and there where a lot of emails sent to all users through this.
Is there something I can do to make this stop?

Thank you
Fabian
 
From lack of reply by the add-on author - I suppose we can only assume the add-on is no longer supported.
I couldn't get it to work with XF 2.1.2 at all.

J.
 
It works fine with 2.1.2.
Basically a fresh install of XF 2.1.2 and nothing. Crickets...
I asked about it in an earlier post at the beginning of the month:
IDK what I'm doing wrong with the install and/or setup of this add-on.
But I cannot see basically ANY of the functionality that this add-on is supposed to provide once it's installed.
Usergroup permissions seem correct. But none of the options are appearing.
Any suggestions would be helpful.

Thanks! Really brilliant share. Just wish I could get to work properly...

J.
Hello?!...
@CMTV any suggestions please?
Thanks.

J.

And no reply :(

J.
 
This add-on is rewritten and superseded from its previous release and we upgraded from that release. Maybe you should do the same if you can find the previous release.
 
But beware of a testinstallation!
If you uninstall the tool in xf 2.1.2 there are errors and you have to reset your CodeCache, but i don't know how...

After uninstall:
  • ErrorException: Template error: Template public:news_feed_item_thread_marked_solved is unknown
  • src/XF/Template/Templater.php:618

  • Generiert von: Unbekanntes Konto
  • 1 Juli 2019 um 09:20
Stack-Trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, 'Template public...', '/var/www/vhosts...', 618, Array)
#1 src/XF/Template/Templater.php(618): trigger_error('Template public...', 512)
#2 src/XF/Template/Templater.php(566): XF\Template\Templater->getTemplateData('public', 'news_feed_item_...')
#3 src/XF/Template/Templater.php(1300): XF\Template\Templater->getTemplateCode('public', 'news_feed_item_...')
#4 src/XF/NewsFeed/AbstractHandler.php(102): XF\Template\Templater->renderTemplate('news_feed_item_...', Array)
#5 src/XF/Entity/NewsFeed.php(79): XF\NewsFeed\AbstractHandler->render(Object(XF\Entity\NewsFeed))
#6 [internal function]: XF\Entity\NewsFeed->render()
#7 src/XF/Template/Templater.php(985): call_user_func_array(Array, Array)
#8 internal_data/code_cache/templates/l2/s1/public/news_feed_macros.php(34): XF\Template\Templater->method(Object(XF\Entity\NewsFeed), 'render', Array)
#9 src/XF/Template/Templater.php(701): XF\Template\Templater->{closure}(Object(OzzModz\ReactionLike\XF\Template\Templater), Array, Array)
#10 internal_data/code_cache/templates/l2/s1/public/news_feed_macros.php(12): XF\Template\Templater->callMacro('news_feed_macro...', 'feed_item', Array, Array)
#11 src/XF/Template/Templater.php(701): XF\Template\Templater->{closure}(Object(OzzModz\ReactionLike\XF\Template\Templater), Array, Array)
#12 internal_data/code_cache/templates/l2/s1/public/latest_activity.php(25): XF\Template\Templater->callMacro('news_feed_macro...', 'feed_row', Array, Array)
#13 src/XF/Template/Templater.php(1301): XF\Template\Templater->{closure}(Object(OzzModz\ReactionLike\XF\Template\Templater), Array)
#14 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('latest_activity', Array)
#15 src/XF/Mvc/Renderer/Json.php(84): XF\Template\Template->render()
#16 src/XF/Mvc/Renderer/Json.php(68): XF\Mvc\Renderer\Json->renderHtmlFallback('XF:WhatsNew\\Lat...', 'public:latest_a...', Array)
#17 src/XF/Mvc/Dispatcher.php(418): XF\Mvc\Renderer\Json->renderView('XF:WhatsNew\\Lat...', 'public:latest_a...', Array)
#18 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#19 src/XF/Mvc/Dispatcher.php(360): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#20 src/XF/Mvc/Dispatcher.php(53): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'json')
#21 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#22 src/XF.php(390): XF\App->run()
#23 index.php(20): XF::runApp('XF\\Pub\\App')
#24 {main}



Status der Anfrage


array(4) {
["url"] => string(178) "/whats-new/latest-activity?before_id=120424&_xfRequestUri=%2Fwhats-new%2Flatest-activity&_xfWithData=1&_xfToken=1561964198%2C945877207a4887d5a18a9a5d8e7aa306&_xfResponseType=json"
["referrer"] => string(51) "https://www.domain.tld/whats-new/latest-activity"
["_GET"] => array(5) {
["before_id"] => string(6) "120424"
["_xfRequestUri"] => string(26) "/whats-new/latest-activity"
["_xfWithData"] => string(1) "1"
["_xfToken"] => string(43) "1561964198,945877207a4887d5a18a9a5d8e7aa306"
["_xfResponseType"] => string(4) "json"
}
["_POST"] => array(0) {
}
}

Any Suggestions about reset the Codecache?
 
Is it possible to mark several posts as solved via the moderator menu?

//Edit
I sent you a pull request ;)
 
Last edited:
Just a heads up @CMTV , we installed this add-on to try it out yesterday morning and it threw out about 1,800 errors in the past 24 hours, slowing our site down to a crawl. Disabled, uninstalled, restarted server, site's back to normal. Running on Xenforo 2.1.4. The error had an issue with "best answer," as it seems others have stated in prior posts.
 
We've found that posts marked as "Best answer" in Question threads which are in a hidden staff-only board are shown in that user's profile in their "Best answers" list. The problem is that all of these are shown to all users, regardless of whether the user should be able to see that particular post.

As a result of this, we had some internal discussion of user cases and how to handle their problematic behavior potentially leak out. Not a huge problem for us, but definitely still a problem.

I contacted the addon dev about this privately 2 weeks ago to give him a chance to fix it first, but he hasn't responded thus far. So, I've decided to go ahead and post about it here.


If you have any forums that are hidden to some users (like a moderator discussion forum) which you are also using Question Threads and marking posts as the Best Answer, be aware that those posts will be visible to everyone who can view the profile of the user who posted that Best Answer.
 
I got the following error once a thread with Question is posted.

nodes 136 and 96 don't exist.

1587551456494.png

Found out it's a conflict with another add-on.
 
Last edited:
Top Bottom