ConnectedCommunities / humhub-modules-questionanswer

GNU Affero General Public License v3.0
28 stars 18 forks source link

QA Menu in Top Navigation fails when Q&A Mode is on "Spaces" setting #57

Closed exocode closed 5 years ago

exocode commented 6 years ago

freshly installed humhub fails with newly installed q/a module...

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'humhub.space_module' doesn't exist in /var/www/html/humhub/protected/vendor/yiisoft/yii2/db/Command.php:1258
Stack trace:
#0 /var/www/html/humhub/protected/vendor/yiisoft/yii2/db/Command.php(1258): PDOStatement->execute()
#1 /var/www/html/humhub/protected/vendor/yiisoft/yii2/db/Command.php(1148): yii\db\Command->internalExecute('SELECT * FROM `...')
#2 /var/www/html/humhub/protected/vendor/yiisoft/yii2/db/Command.php(399): yii\db\Command->queryInternal('fetchAll', NULL)
#3 /var/www/html/humhub/protected/vendor/yiisoft/yii2/db/Query.php(237): yii\db\Command->queryAll()
#4 /var/www/html/humhub/protected/vendor/yiisoft/yii2/db/ActiveQuery.php(133): yii\db\Query->all(NULL)
#5 /var/www/html/humhub/protected/modules/questionanswer/models/Category.php(86): yii\db\ActiveQuery->all()
#6 /var/www/html/humhub/protected/modules/questionanswer/controllers/QuestionController.php(124): humhub\modules\questionanswer\models\Category::all()
#7 [internal function]: humhub\modules\questionanswer\controllers\QuestionController->actionIndex()
#8 /var/www/html/humhub/protected/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#9 /var/www/html/humhub/protected/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#10 /var/www/html/humhub/protected/vendor/yiisoft/yii2/base/Module.php(528): yii\base\Controller->runAction('index', Array)
#11 /var/www/html/humhub/protected/vendor/yiisoft/yii2/web/Application.php(103): yii\base\Module->runAction('questionanswer/...', Array)
#12 /var/www/html/humhub/protected/vendor/yiisoft/yii2/base/Application.php(386): yii\web\Application->handleRequest(Object(humhub\components\Request))
#13 /var/www/html/humhub/index.php(25): yii\base\Application->run()
#14 {main}

Next yii\db\Exception: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'humhub.space_module' doesn't exist
The SQL being executed was: SELECT * FROM `space_module` WHERE `module_id`='questionanswer' in /var/www/html/humhub/protected/vendor/yiisoft/yii2/db/Schema.php:664
Stack trace:
#0 /var/www/html/humhub/protected/vendor/yiisoft/yii2/db/Command.php(1263): yii\db\Schema->convertException(Object(PDOException), 'SELECT * FROM `...')
#1 /var/www/html/humhub/protected/vendor/yiisoft/yii2/db/Command.php(1148): yii\db\Command->internalExecute('SELECT * FROM `...')
#2 /var/www/html/humhub/protected/vendor/yiisoft/yii2/db/Command.php(399): yii\db\Command->queryInternal('fetchAll', NULL)
#3 /var/www/html/humhub/protected/vendor/yiisoft/yii2/db/Query.php(237): yii\db\Command->queryAll()
#4 /var/www/html/humhub/protected/vendor/yiisoft/yii2/db/ActiveQuery.php(133): yii\db\Query->all(NULL)
#5 /var/www/html/humhub/protected/modules/questionanswer/models/Category.php(86): yii\db\ActiveQuery->all()
#6 /var/www/html/humhub/protected/modules/questionanswer/controllers/QuestionController.php(124): humhub\modules\questionanswer\models\Category::all()
#7 [internal function]: humhub\modules\questionanswer\controllers\QuestionController->actionIndex()
#8 /var/www/html/humhub/protected/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#9 /var/www/html/humhub/protected/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#10 /var/www/html/humhub/protected/vendor/yiisoft/yii2/base/Module.php(528): yii\base\Controller->runAction('index', Array)
#11 /var/www/html/humhub/protected/vendor/yiisoft/yii2/web/Application.php(103): yii\base\Module->runAction('questionanswer/...', Array)
#12 /var/www/html/humhub/protected/vendor/yiisoft/yii2/base/Application.php(386): yii\web\Application->handleRequest(Object(humhub\components\Request))
#13 /var/www/html/humhub/index.php(25): yii\base\Application->run()
#14 {main}
Additional Information:
Array
(
    [0] => 42S02
    [1] => 1146
    [2] => Table 'humhub.space_module' doesn't exist
)
baoc75 commented 5 years ago

A pull request have been made here, and it fixed https://github.com/ConnectedCommunities/humhub-modules-questionanswer/pull/59

benmag commented 5 years ago

Resolved by #60