Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception in Phundament backend module #16

Closed
StalkAlex opened this issue Mar 31, 2017 · 0 comments
Closed

Exception in Phundament backend module #16

StalkAlex opened this issue Mar 31, 2017 · 0 comments

Comments

@StalkAlex
Copy link
Contributor

StalkAlex commented Mar 31, 2017

Error came after last update. Query is not supported by Postgres in a part of FIND_IN_SET
https://github.com/dmstr/yii2-db/blob/master/db/traits/ActiveRecordAccessTrait.php#L75

Next yii\db\Exception: SQLSTATE[42703]: Undefined column: 7 ERROR:  column "*,Admin,backend_default,pages_def" does not exist
LINE 1: ...(("access_owner"=$1) OR (FIND_IN_SET(access_read, "*,Admin,A...
                                                             ^
The SQL being executed was: SELECT * FROM "dmstr_page" WHERE (("access_owner"=1) OR (FIND_IN_SET(access_read, "*,Admin, long_list_of_permissions") > 0)) AND ("access_domain" IN ('ru', '*')) AND (("domain_id"='backend') AND ("access_domain" IN ('*', 'ru'))) in /app/vendor/yiisoft/yii2/db/Schema.php:636
Stack trace:
#0 /app/vendor/yiisoft/yii2/db/Command.php(917): yii\db\Schema->convertException(Object(PDOException), 'SELECT * FROM "...')
#1 /app/vendor/yiisoft/yii2/db/Command.php(376): yii\db\Command->queryInternal('fetch', NULL)
#2 /app/vendor/yiisoft/yii2/db/Query.php(253): yii\db\Command->queryOne()
#3 /app/vendor/yiisoft/yii2/db/ActiveQuery.php(295): yii\db\Query->one(NULL)
#4 /app/vendor/yiisoft/yii2/db/BaseActiveRecord.php(107): yii\db\ActiveQuery->one()
#5 /app/vendor/dmstr/yii2-pages-module/models/Tree.php(212): yii\db\BaseActiveRecord::findOne(Array)
#6 /app/src/modules/backend/views/layouts/_sidebar.php(75): dmstr\modules\pages\models\Tree::getMenuItems('backend')
#7 /app/vendor/yiisoft/yii2/base/View.php(328): require('/app/src/module...')
#8 /app/vendor/yiisoft/yii2/base/View.php(250): yii\base\View->renderPhpFile('/app/src/module...', '[]')
#9 /app/vendor/yiisoft/yii2/base/View.php(152): yii\base\View->renderFile('/app/src/module...', Array, NULL)
#10 /app/src/modules/backend/views/layouts/main.php(139): yii\base\View->render('_sidebar')
#11 /app/vendor/yiisoft/yii2/base/View.php(328): require('/app/src/module...')
#12 /app/vendor/yiisoft/yii2/base/View.php(250): yii\base\View->renderPhpFile('/app/src/module...', '[<span class="s...')
#13 /app/vendor/yiisoft/yii2/base/Controller.php(396): yii\base\View->renderFile('/app/src/module...', Array, Object(app\modules\backend\controllers\DefaultController))
#14 /app/vendor/yiisoft/yii2/base/Controller.php(382): yii\base\Controller->renderContent('<div class="row...')
#15 /app/src/modules/backend/controllers/DefaultController.php(68): yii\base\Controller->render('index')
#16 [internal function]: app\modules\backend\controllers\DefaultController->actionIndex()
#17 /app/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#18 /app/vendor/yiisoft/yii2/base/Controller.php(156): yii\base\InlineAction->runWithParams(Array)
#19 /app/vendor/yiisoft/yii2/base/Module.php(523): yii\base\Controller->runAction('', Array)
#20 /app/vendor/yiisoft/yii2/web/Application.php(102): yii\base\Module->runAction('backend', Array)
#21 /app/vendor/yiisoft/yii2/base/Application.php(380): yii\web\Application->handleRequest(Object(yii\web\Request))
#22 /app/web/index.php(13): yii\base\Application->run()
#23 {main}
Additional Information:
Array
(
    [0] => 42703
    [1] => 7
    [2] => ERROR:  column "*,Admin,backend_default,pages_def" does not exist
LINE 1: ...(("access_owner"=$1) OR (FIND_IN_SET(access_read, "*,Admin,...
                                                             ^
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant