verbb / comments

A Craft CMS plugin for managing comments directly within the CMS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SchemaVersion not set in project config

ryssbowh opened this issue · comments

Describe the bug

On Craft 3.7.68 the schemaVersion is not set in the project config when you install the plugin, which can create issues when deploying to other environments.

This is due to the plugin saving the settings there before the plugin is fully installed. Somehow Craft won't update the project config when you do that, I've seen that before.

This also causes the plugin to be installed in a disabled state.

On my own plugins I would use a job to go around this problem, or check the state of Yaml files.

Steps to reproduce

  1. Install plugin

Craft CMS version

3.7.68

Plugin version

1.9.5

Multi-site?

No

Additional context

Minimal installation with no extra plugins

I've tried a few times to narrow down what causes this behaviour. Looks like the afterInstall() function method fires before the Plugins::EVENT_AFTER_INSTALL_PLUGIN event, so moving it to that certainly feels like the right move.

Fixed for the next release. To get this early run composer require verbb/comments:"dev-craft-3 as 1.9.5"

Fixed in 1.9.6