verbb / comments

A Craft CMS plugin for managing comments directly within the CMS.
Other
137 stars 33 forks source link

SchemaVersion not set in project config #283

Closed ryssbowh closed 8 months ago

ryssbowh commented 1 year ago

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

engram-design commented 1 year ago

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"

engram-design commented 8 months ago

Fixed in 1.9.6