[TH] Question and Answer Forums [Deleted]

@Lukas W. Still getting Server error log from Rebuild search index. Please let me know that how can re-run Rebuild search index?

200428

Code:
XFES\Elasticsearch\BulkRequestException: Elasticsearch indexing error: Elasticsearch bulk action error (first error: [post-39383] failed to parse field [thbestanswer] of type [boolean] in document with id 'post-39383') src/addons/XFES/Elasticsearch/Api.php:430

Generated by: Nirjonmela Apr 16, 2019 at 10:47 PM

Stack trace

#0 src/addons/XFES/Elasticsearch/Api.php(180): XFES\Elasticsearch\Api->bulkRequest('{"index":{"_ind...')
#1 src/addons/XFES/Search/Source/Elasticsearch.php(82): XFES\Elasticsearch\Api->indexBulk(Array)
#2 src/XF/Search/Source/AbstractSource.php(36): XFES\Search\Source\Elasticsearch->flushBulkIndexing()
#3 src/XF/Search/Search.php(98): XF\Search\Source\AbstractSource->disableBulkIndexing()
#4 src/XF/Search/Search.php(62): XF\Search\Search->disableBulkIndexing()
#5 src/XF/Search/Search.php(85): XF\Search\Search->indexEntities('post', Object(XF\Mvc\Entity\ArrayCollection))
#6 src/XF/Job/SearchRebuild.php(57): XF\Search\Search->indexRange('post', 38895, '500')
#7 src/XF/Job/Manager.php(253): XF\Job\SearchRebuild->run(G)
#8 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#9 src/XF/Job/Manager.php(111): XF\Job\Manager->runJobEntry(Array, G)
#10 src/XF/Admin/Controller/Tools.php(120): XF\Job\Manager->runByIds(Array, 8)
#11 src/XF/Mvc/Dispatcher.php(321): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#12 src/XF/Mvc/Dispatcher.php(244): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(NF\Discord\XF\Admin\Controller\Tools), NULL)
#13 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(NF\Discord\XF\Admin\Controller\Tools), NULL)
#14 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#15 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#16 src/XF.php(390): XF\App->run()
#17 admin.php(13): XF::runApp('XF\\Admin\\App')
#18 {main}

Request state

array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(46) "/admin.php?tools/run-job"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(56) "/admin.php?tools/rebuild&success=1"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(5) "17328"
  }
}
 
@Lukas W. Still getting Server error log from Rebuild search index. Please let me know that how can re-run Rebuild search index?

View attachment 200428

Code:
XFES\Elasticsearch\BulkRequestException: Elasticsearch indexing error: Elasticsearch bulk action error (first error: [post-39383] failed to parse field [thbestanswer] of type [boolean] in document with id 'post-39383') src/addons/XFES/Elasticsearch/Api.php:430

Generated by: Nirjonmela Apr 16, 2019 at 10:47 PM

Stack trace

#0 src/addons/XFES/Elasticsearch/Api.php(180): XFES\Elasticsearch\Api->bulkRequest('{"index":{"_ind...')
#1 src/addons/XFES/Search/Source/Elasticsearch.php(82): XFES\Elasticsearch\Api->indexBulk(Array)
#2 src/XF/Search/Source/AbstractSource.php(36): XFES\Search\Source\Elasticsearch->flushBulkIndexing()
#3 src/XF/Search/Search.php(98): XF\Search\Source\AbstractSource->disableBulkIndexing()
#4 src/XF/Search/Search.php(62): XF\Search\Search->disableBulkIndexing()
#5 src/XF/Search/Search.php(85): XF\Search\Search->indexEntities('post', Object(XF\Mvc\Entity\ArrayCollection))
#6 src/XF/Job/SearchRebuild.php(57): XF\Search\Search->indexRange('post', 38895, '500')
#7 src/XF/Job/Manager.php(253): XF\Job\SearchRebuild->run(G)
#8 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#9 src/XF/Job/Manager.php(111): XF\Job\Manager->runJobEntry(Array, G)
#10 src/XF/Admin/Controller/Tools.php(120): XF\Job\Manager->runByIds(Array, 8)
#11 src/XF/Mvc/Dispatcher.php(321): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#12 src/XF/Mvc/Dispatcher.php(244): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(NF\Discord\XF\Admin\Controller\Tools), NULL)
#13 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(NF\Discord\XF\Admin\Controller\Tools), NULL)
#14 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#15 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#16 src/XF.php(390): XF\App->run()
#17 admin.php(13): XF::runApp('XF\\Admin\\App')
#18 {main}

Request state

array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(46) "/admin.php?tools/run-job"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(56) "/admin.php?tools/rebuild&success=1"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(5) "17328"
  }
}
Gonna tag @Jon W on this as well.
 
I'm trying to change a question back to a thread, but can't due to the following error:

LogicException: Attempted to set 'th_answered_qaforum' while a save was pending without forceSet in src/XF/Mvc/Entity/Entity.php at line 575

Code:
    XF\Mvc\Entity\Entity->set() in src/XF/Mvc/Entity/Entity.php at line 548
    XF\Mvc\Entity\Entity->__set() in src/addons/ThemeHouse/QAForums/XF/Entity/Post.php at line 162
    ThemeHouse\QAForums\XF\Entity\Post->_postSave() in src/addons/SV/UserEssentials/XF/Entity/Post.php at line 135
    SV\UserEssentials\XF\Entity\Post->_postSave() in src/XF/Mvc/Entity/Entity.php at line 1208
    XF\Mvc\Entity\Entity->save() in src/addons/ThemeHouse/QAForums/XF/Entity/Thread.php at line 79
    ThemeHouse\QAForums\XF\Entity\Thread->removeBestAnswer() in src/addons/ThemeHouse/QAForums/XF/Entity/Thread.php at line 57
    ThemeHouse\QAForums\XF\Entity\Thread->_postSave() in src/addons/xenMade/STUTC/XF/Entity/Thread.php at line 31
    xenMade\STUTC\XF\Entity\Thread->_postSave() in src/addons/SV/UserEssentials/XF/Entity/Thread.php at line 318
    SV\UserEssentials\XF\Entity\Thread->_postSave() in src/XF/Mvc/Entity/Entity.php at line 1208
    XF\Mvc\Entity\Entity->save() in src/XF/Service/Thread/Editor.php at line 225
    XF\Service\Thread\Editor->_save() in src/XF/Service/ValidateAndSavableTrait.php at line 40
    XF\Service\Thread\Editor->save() in src/XF/Pub/Controller/Thread.php at line 676
    XF\Pub\Controller\Thread->actionEdit() in src/addons/SV/MultiPrefix/XF/Pub/Controller/Thread.php at line 61
    SV\MultiPrefix\XF\Pub\Controller\Thread->actionEdit() 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
This only happens when a "best answer" is set.
 
I'm trying to change a question back to a thread, but can't due to the following error:

LogicException: Attempted to set 'th_answered_qaforum' while a save was pending without forceSet in src/XF/Mvc/Entity/Entity.php at line 575

Code:
    XF\Mvc\Entity\Entity->set() in src/XF/Mvc/Entity/Entity.php at line 548
    XF\Mvc\Entity\Entity->__set() in src/addons/ThemeHouse/QAForums/XF/Entity/Post.php at line 162
    ThemeHouse\QAForums\XF\Entity\Post->_postSave() in src/addons/SV/UserEssentials/XF/Entity/Post.php at line 135
    SV\UserEssentials\XF\Entity\Post->_postSave() in src/XF/Mvc/Entity/Entity.php at line 1208
    XF\Mvc\Entity\Entity->save() in src/addons/ThemeHouse/QAForums/XF/Entity/Thread.php at line 79
    ThemeHouse\QAForums\XF\Entity\Thread->removeBestAnswer() in src/addons/ThemeHouse/QAForums/XF/Entity/Thread.php at line 57
    ThemeHouse\QAForums\XF\Entity\Thread->_postSave() in src/addons/xenMade/STUTC/XF/Entity/Thread.php at line 31
    xenMade\STUTC\XF\Entity\Thread->_postSave() in src/addons/SV/UserEssentials/XF/Entity/Thread.php at line 318
    SV\UserEssentials\XF\Entity\Thread->_postSave() in src/XF/Mvc/Entity/Entity.php at line 1208
    XF\Mvc\Entity\Entity->save() in src/XF/Service/Thread/Editor.php at line 225
    XF\Service\Thread\Editor->_save() in src/XF/Service/ValidateAndSavableTrait.php at line 40
    XF\Service\Thread\Editor->save() in src/XF/Pub/Controller/Thread.php at line 676
    XF\Pub\Controller\Thread->actionEdit() in src/addons/SV/MultiPrefix/XF/Pub/Controller/Thread.php at line 61
    SV\MultiPrefix\XF\Pub\Controller\Thread->actionEdit() 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
This only happens when a "best answer" is set.
Gone ahead and reported this on our issue tracker, thanks for the report.
 
ThemeHouse updated [TH] Question and Answer Forums with a new update entry:

Version 1.1.1 released

Important! This add-on no longer supports XenForo 2.0. Please upgrade to XenForo 2.1 first, before updating to this version.

Bugs Fixed:
  • Fixed an issue that caused prefix toggle javascript to not work with the quick thread function
  • Fixed an issue that caused an error when attempting to change a question back to a thread that has a best answer status
  • Fixed an issue that caused an error when rebuilding the search index

Enhancements:
  • Added new user criteria: User has posted at least X questions, and User has posted no more than X questions
  • Added structure data...

Read the rest of this update entry...
 
Last edited:
How can enable/disable structure data functionality and where this info showing? Also not working Up and down vote controls location and Best answer control location > Next to user controls.
 
@ThemeHouse bug identified with 1.1.1

Setting for "Add question status to threads by default (permission required)" seems to be ignored, and question status is being added by default regardless.
 
There's a small CSS mistake. The controls are taking up quite some space on mobile devices.
201443
There's a line of CSS:
CSS:
@media (max-width: 650px) {
    .th__qaControls__vote {
        display: inline-block;
    }
}
but it is because of the desktop styling that is more specific:
CSS:
.message-cell--qaControls .th__qaControls__vote {
    display: block;
}
and therefore wins from the mobile styling.

I've been able to reproduce this on your test-forum as well: http://5mnvsry3e.xf2.demo.themehouse.com/index.php?threads/test.1/&view=date#post-3
 
Top Bottom