-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
Description
Description
When triggering any redirect, our Craft instance throws the following error:
yii\base\ErrorException: Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'siteId' in 'where clause' in /var/www/html/vendor/yiisoft/yii2/db/Command.php:1320
Stack trace:
#0 /var/www/html/vendor/yiisoft/yii2/db/Command.php(1320): PDOStatement->execute()
#1 /var/www/html/vendor/yiisoft/yii2/db/Command.php(1186): yii\db\Command->internalExecute()
#2 /var/www/html/vendor/yiisoft/yii2/db/Command.php(443): yii\db\Command->queryInternal()
#3 /var/www/html/vendor/yiisoft/yii2/db/Query.php(304): yii\db\Command->queryScalar()
#4 /var/www/html/vendor/barrelstrength/sprout/src/redirects/RedirectsSettings.php(136): yii\db\Query->scalar()
#5 /var/www/html/vendor/barrelstrength/sprout/src/redirects/RedirectsSettings.php(147): BarrelStrength\Sprout\redirects\RedirectsSettings->getSiteExcludedUrlPatterns()
#6 /var/www/html/vendor/barrelstrength/sprout/src/redirects/redirects/Redirects.php(73): BarrelStrength\Sprout\redirects\RedirectsSettings->getExcludedUrlPatterns()
#7 /var/www/html/vendor/barrelstrength/sprout/src/redirects/redirects/Redirects.php(54): BarrelStrength\Sprout\redirects\redirects\Redirects->processRedirectsForCurrentRequest()
#8 /var/www/html/vendor/barrelstrength/sprout/src/redirects/RedirectsModule.php(162): BarrelStrength\Sprout\redirects\redirects\Redirects->handleRedirectsOnException()
#9 [internal function]: BarrelStrength\Sprout\redirects\RedirectsModule::BarrelStrength\Sprout\redirects\{closure}()
#10 /var/www/html/vendor/yiisoft/yii2/base/Event.php(312): call_user_func()
#11 /var/www/html/vendor/yiisoft/yii2/base/Component.php(654): yii\base\Event::trigger()
#12 /var/www/html/vendor/craftcms/cms/src/web/ErrorHandler.php(55): yii\base\Component->trigger()
#13 [internal function]: craft\web\ErrorHandler->handleException()
#14 {main}
Next yii\db\Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'siteId' in 'where clause'
The SQL being executed was: SELECT `settings`
FROM `sprout_settings`
WHERE (`siteId`=1) AND (`moduleId`='sprout-module-redirects') AND (`name`='siteExcludedUrlPatterns') in /var/www/html/vendor/yiisoft/yii2/db/Schema.php:676
Stack trace:
#0 /var/www/html/vendor/yiisoft/yii2/db/Command.php(1325): yii\db\Schema->convertException()
#1 /var/www/html/vendor/yiisoft/yii2/db/Command.php(1186): yii\db\Command->internalExecute()
#2 /var/www/html/vendor/yiisoft/yii2/db/Command.php(443): yii\db\Command->queryInternal()
#3 /var/www/html/vendor/yiisoft/yii2/db/Query.php(304): yii\db\Command->queryScalar()
#4 /var/www/html/vendor/barrelstrength/sprout/src/redirects/RedirectsSettings.php(136): yii\db\Query->scalar()
#5 /var/www/html/vendor/barrelstrength/sprout/src/redirects/RedirectsSettings.php(147): BarrelStrength\Sprout\redirects\RedirectsSettings->getSiteExcludedUrlPatterns()
#6 /var/www/html/vendor/barrelstrength/sprout/src/redirects/redirects/Redirects.php(73): BarrelStrength\Sprout\redirects\RedirectsSettings->getExcludedUrlPatterns()
#7 /var/www/html/vendor/barrelstrength/sprout/src/redirects/redirects/Redirects.php(54): BarrelStrength\Sprout\redirects\redirects\Redirects->processRedirectsForCurrentRequest()
#8 /var/www/html/vendor/barrelstrength/sprout/src/redirects/RedirectsModule.php(162): BarrelStrength\Sprout\redirects\redirects\Redirects->handleRedirectsOnException()
#9 [internal function]: BarrelStrength\Sprout\redirects\RedirectsModule::BarrelStrength\Sprout\redirects\{closure}()
#10 /var/www/html/vendor/yiisoft/yii2/base/Event.php(312): call_user_func()
#11 /var/www/html/vendor/yiisoft/yii2/base/Component.php(654): yii\base\Event::trigger()
#12 /var/www/html/vendor/craftcms/cms/src/web/ErrorHandler.php(55): yii\base\Component->trigger()
#13 [internal function]: craft\web\ErrorHandler->handleException()
#14 {main}
Additional Information:
Array
(
[0] => 42S22
[1] => 1054
[2] => Unknown column 'siteId' in 'where clause'
)
thrown in /var/www/html/vendor/yiisoft/yii2/db/Schema.php:676
Stack trace:
#0 [internal function]: yii\base\ErrorHandler->handleFatalError()
#1 {main}
Using the Lite version with no Multisite support, the site_id column is indeed missing in the database.
How to reproduce
- Install the Lite plugin
- Configure any redirect
- Trigger the redirect
Sprout Version
Redirects 5.0.3, Data Studio 5.0.3, Sprout package 5.0.6
Craft Version
5.7.5
Database Type Version
MariaDB 10.4.x