solspace / craft-calendar

Calendar for Craft: The most reliable and powerful event management plugin for Craft.
http://docs.solspace.com/craft/calendar/v5
Other
15 stars 14 forks source link

Fresh database, existing project config install does not work #257

Closed Thijmen closed 7 months ago

Thijmen commented 7 months ago

Describe the bug or issue you're experiencing

Hi there, thank you for taking the time to look at my report. Here's what I am trying to achieve.

a) I have an existing project config b) I try to install a clean development database (the database is completely empty, no tables)

Running php craft install will eventually result in the following;

    > add foreign key craft_fk_hqcesegopmtqkbzfqzyalragikzuvgtxsmck: {{%volumefolders}} (volumeId) references {{%volumes}} (id) ... done (time: 0.005s)
    > add foreign key craft_fk_oumcilhtnanqhfycdqlslzbifxehbytvkdwr: {{%volumes}} (fieldLayoutId) references {{%fieldlayouts}} (id) ... done (time: 0.006s)
    > add foreign key craft_fk_wbmazowixbyystcxrpdogoukdlkqgjyyyyyd: {{%widgets}} (userId) references {{%users}} (id) ... done (time: 0.005s)
    > populating the info table ... done
    > can't apply existing project config: No plugin exists with the handle "contact-form".
    > moving config/project/ to storage/config-backups/project-2024-02-05-185943 ... done
    > saving default site data ... Exception: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'craft.craft_calendar_events' doesn't exist
The SQL being executed was: SELECT `ei18n`.*
FROM `craft_elements_sites` `ei18n`
INNER JOIN `craft_calendar_events` `e` ON ei18n.`elementId` = e.id
WHERE ei18n.`siteId`=6 (/app/vendor/yiisoft/yii2/db/Schema.php:676)
#0 /app/vendor/yiisoft/yii2/db/Command.php(1307): yii\db\Schema->convertException()
#1 /app/vendor/yiisoft/yii2/db/Command.php(1168): yii\db\Command->internalExecute()
#2 /app/vendor/yiisoft/yii2/db/Command.php(410): yii\db\Command->queryInternal()
#3 /app/vendor/yiisoft/yii2/db/Query.php(249): yii\db\Command->queryAll()
#4 /app/vendor/craftcms/cms/src/db/Query.php(247): yii\db\Query->all()
#5 /app/vendor/solspace/craft-calendar/packages/plugin/src/Services/EventsService.php(387): craft\db\Query->all()
#6 [internal function]: Solspace\Calendar\Services\EventsService->addSiteHandler()
#7 /app/vendor/yiisoft/yii2/base/Event.php(312): call_user_func()
#8 /app/vendor/yiisoft/yii2/base/Component.php(642): yii\base\Event::trigger()
#9 /app/vendor/craftcms/cms/src/services/Sites.php(813): yii\base\Component->trigger()
#10 /app/vendor/craftcms/cms/src/base/ApplicationTrait.php(1841): craft\services\Sites->handleChangedSite()
#11 /app/vendor/craftcms/cms/src/services/ProjectConfig.php(1137): craft\console\Application->craft\base\{closure}()
#12 [internal function]: craft\services\ProjectConfig->handleChangeEvent()
#13 /app/vendor/yiisoft/yii2/base/Component.php(633): call_user_func()
#14 /app/vendor/craftcms/cms/src/models/ProjectConfigData.php(82): yii\base\Component->trigger()
#15 /app/vendor/craftcms/cms/src/services/ProjectConfig.php(1249): craft\models\ProjectConfigData->commitChanges()
#16 /app/vendor/craftcms/cms/src/services/ProjectConfig.php(1271): craft\services\ProjectConfig->craft\services\{closure}()
#17 /app/vendor/craftcms/cms/src/services/ProjectConfig.php(611): craft\services\ProjectConfig->_applyChanges()
#18 /app/vendor/craftcms/cms/src/migrations/Install.php(1147): craft\services\ProjectConfig->applyConfigChanges()
#19 /app/vendor/craftcms/cms/src/migrations/Install.php(77): craft\migrations\Install->insertDefaultData()
#20 /app/vendor/craftcms/cms/src/db/Migration.php(49): craft\migrations\Install->safeUp()
#21 /app/vendor/craftcms/cms/src/db/MigrationManager.php(233): craft\db\Migration->up()
#22 /app/vendor/craftcms/cms/src/console/controllers/InstallController.php(213): craft\db\MigrationManager->migrateUp()
#23 [internal function]: craft\console\controllers\InstallController->actionCraft()
#24 /app/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()
#25 /app/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams()
#26 /app/vendor/yiisoft/yii2/console/Controller.php(180): yii\base\Controller->runAction()
#27 /app/vendor/craftcms/cms/src/console/ControllerTrait.php(90): yii\console\Controller->runAction()
#28 /app/vendor/craftcms/cms/src/console/Controller.php(217): craft\console\Controller->traitRunAction()
#29 /app/vendor/yiisoft/yii2/base/Module.php(552): craft\console\Controller->runAction()
#30 /app/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction()
#31 /app/vendor/craftcms/cms/src/console/Application.php(91): yii\console\Application->runAction()
#32 /app/vendor/yiisoft/yii2/console/Application.php(147): craft\console\Application->runAction()
#33 /app/vendor/craftcms/cms/src/console/Application.php(122): yii\console\Application->handleRequest()
#34 /app/vendor/yiisoft/yii2/base/Application.php(384): craft\console\Application->handleRequest()
#35 /app/craft(22): yii\base\Application->run()
#36 {main}

This issue looks related to https://github.com/solspace/craft-calendar/issues/40 but is closed.

Expected behavior

I am able to install Craft on an empty database with an existing project config.

Craft & Plugin Info (please complete the following information):

Thijmen commented 7 months ago

Closing, was apparently due to having plugins in the project.yml which are not available anymore.