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

PostgreSQL error #1

Closed
angrybrad opened this issue Sep 20, 2018 · 1 comment
Closed

PostgreSQL error #1

angrybrad opened this issue Sep 20, 2018 · 1 comment
Labels

Comments

@angrybrad
Copy link

When saving a flag name:

PDOException: SQLSTATE[42703]: Undefined column: 7 ERROR:  column "about" does not exist
LINE 3: WHERE FIND_IN_SET("about",flags)
                          ^ in /path/to/vendor/yiisoft/yii2/db/Command.php:1258
Stack trace:
#0 /path/to/vendor/yiisoft/yii2/db/Command.php(1258): PDOStatement->execute()
#1 /path/to/vendor/yiisoft/yii2/db/Command.php(1148): yii\db\Command->internalExecute('SELECT "cacheId...')
#2 /path/to/vendor/yiisoft/yii2/db/Command.php(425): yii\db\Command->queryInternal('fetchColumn', 0)
#3 /path/to/vendor/yiisoft/yii2/db/Query.php(291): yii\db\Command->queryScalar()
#4 /path/to/vendor/craftcms/cms/src/db/Query.php(197): yii\db\Query->scalar(NULL)
#5 /path/to/vendor/mmikkel/cache-flag/src/services/CacheFlagService.php(244): craft\db\Query->scalar()
#6 /path/to/vendor/mmikkel/cache-flag/src/variables/CpVariable.php(75): mmikkel\cacheflag\services\CacheFlagService->flagsHasCaches(Array)
#7 /path/to/vendor/twig/twig/lib/Twig/Extension/Core.php(1619): mmikkel\cacheflag\variables\CpVariable->flagsHasCaches('about')
#8 /path/to/vendor/craftcms/cms/src/helpers/Template.php(73): twig_get_attribute(Object(craft\web\twig\Environment), Object(Twig_Source), Object(mmikkel\cacheflag\variables\CpVariable), 'flagsHasCaches', Array, 'method', false, false)
#9 /path/to/compiled_templates/8e/8e73945e8dbc3832611fff592ed03a639f3f9b46d34ba50a54eac7e6485de042.php(175): craft\helpers\Template::attribute(Object(craft\web\twig\Environment), Object(Twig_Source), Object(mmikkel\cacheflag\variables\CpVariable), 'flagsHasCaches', Array, 'method')
#10 /path/to/vendor/twig/twig/lib/Twig/Template.php(390): __TwigTemplate_d24235d60e3c9c078a7f02210601cc74e94390cb414839df28fbc29699f683c8->doDisplay(Array, Array)
#11 /path/to/vendor/craftcms/cms/src/web/twig/Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array)
#12 /path/to/vendor/twig/twig/lib/Twig/Template.php(367): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#13 /path/to/vendor/craftcms/cms/src/web/twig/Template.php(31): Twig_Template->display(Array, Array)
#14 /path/to/vendor/twig/twig/lib/Twig/Template.php(375): craft\web\twig\Template->display(Array)
#15 /path/to/vendor/twig/twig/lib/Twig/Environment.php(289): Twig_Template->render(Array)
#16 /path/to/vendor/craftcms/cms/src/web/View.php(331): Twig_Environment->render('cache-flag', Array)
#17 /path/to/vendor/craftcms/cms/src/web/View.php(378): craft\web\View->renderTemplate('cache-flag', Array)
#18 /path/to/vendor/craftcms/cms/src/web/Controller.php(155): craft\web\View->renderPageTemplate('cache-flag', Array)
#19 /path/to/vendor/craftcms/cms/src/controllers/TemplatesController.php(78): craft\web\Controller->renderTemplate('cache-flag', Array)
#20 [internal function]: craft\controllers\TemplatesController->actionRender('cache-flag', Array)
#21 /path/to/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#22 /path/to/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#23 /path/to/vendor/craftcms/cms/src/web/Controller.php(103): yii\base\Controller->runAction('render', Array)
#24 /path/to/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('render', Array)
#25 /path/to/vendor/craftcms/cms/src/web/Application.php(282): yii\base\Module->runAction('templates/rende...', Array)
#26 /path/to/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('templates/rende...', Array)
#27 /path/to/vendor/craftcms/cms/src/web/Application.php(271): yii\web\Application->handleRequest(Object(craft\web\Request))
#28 /path/to/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#29 /path/to/web/index.php(5): yii\base\Application->run()
#30 {main}

FIND_IN_SET is a MySQL specific concept, but there are PostgreSQL compatible ways of doing it: https://www.google.com/search?q=FIND_IN_SET+postgres

Can work on a pull request after DotAll if you don't get around to it, too.

@mmikkel mmikkel added the bug label Sep 21, 2018
@mmikkel
Copy link
Owner

mmikkel commented Sep 21, 2018

It should be good now – thanks @angrybrad!

@mmikkel mmikkel closed this as completed Sep 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants