Skip to content

[4.x|5.x]: Fresh install of project with plugins in project config fails #15559

@qrazi

Description

@qrazi

What happened?

Description

Since 4.11.2 and 5.3.3 the installation of Craft CMS checks the \craft\base\Plugin::$schemaVersion of all plugins against the schema version defined in project config. If not the same, the install stops.

I encountered this with the plugins:

  • solspace/craft-calendar
  • cooltronicpl/document-helpers

I have not checked the other plugins in this project yet.

The direct cause is the recent change in combination with these plugins not defining the \craft\base\Plugin::$schemaVersion. From the documentation I would assume this is actually required for a plugin. Perhaps the default value in \craft\base\PluginTrait could be null? Or some other way to make it required?

Background

Steps to reproduce

  1. Given an existing Craft CMS project
  2. Given project config lists plugin calendar (https://github.com/solspace/craft-calendar) with key "schemaVersion" is "5.0.0"
  3. Install Craft CMS with ./craft install/craft

Expected behavior

See message: Success installed

Actual behavior

See error

*** installing Craft

Project config validation failed: Calendar is installed with schema version 1.0.0, but project.yaml expects 5.0.0.

Run `composer install` or remove your `config/project/` folder and try again.

Aborting install.

Craft CMS version

4.11.3

PHP version

8.2.6

Operating system and version

Alpine Linux (Docker container)

Database type and version

MySQL 8.0.29

Image driver and version

GD 8.2.6

Installed plugins and versions

Name                       Handle                     Package Name                          Version         Installed  Enabled
    -------------------------  -------------------------  ------------------------------------  --------------  ---------  -------
    Amazon S3                  aws-s3                     craftcms/aws-s3                       2.2.1           Yes        Yes    
    Blitz                      blitz                      putyourlightson/craft-blitz           4.22.0          Yes        Yes    
    Breadcrumb                 breadcrumb                 youandmedigital/breadcrumb            2.0.0           Yes        Yes    
    Calendar                   calendar                   solspace/craft-calendar               5.0.7           Yes        Yes    
    Compress                   compress                   venveo/craft-compress                 4.0.1           Yes        Yes    
    Craftagram                 craftagram                 jsmrtn/craftagram                     3.0.0           Yes        Yes    
    Doxter                     doxter                     verbb/doxter                          5.0.6           Yes        Yes    
    Element API                element-api                craftcms/element-api                  4.1.0           Yes        Yes    
    Elements Panel             elements-panel             putyourlightson/craft-elements-panel  2.0.0           Yes        Yes    
    Embedded Assets            embeddedassets             spicyweb/craft-embedded-assets        4.1.1           Yes        Yes    
    Facebook Conversion        facebook-conversion        dwy/facebook-conversion               v1.3.3          Yes        Yes    
    Feed Me                    feed-me                    craftcms/feed-me                      5.7.0           Yes        Yes    
    Formie                     formie                     verbb/formie                          2.1.26          Yes        Yes    
    Hide Admin                 hide-admin                 jalendport/craft-hideadmin            2.0.0-beta.1    Yes        Yes    
    HTTP Basic Authentication  basicauth                  codemonauts/craft-basicauth           2.0.0           Yes        Yes    
    Image Base64               craft-twig-imagebase64     kisonay/craft-twig-imagebase64        1.1.1           Yes        Yes    
    Imager                     imager                     aelvan/imager                         dev-dev-craft4  Yes        Yes    
    Linkit                     linkit                     presseddigital/linkit                 4.0.4.1         Yes        Yes    
    Maps                       simplemap                  ether/simplemap                       4.0.8           Yes        Yes    
    Mix                        mix                        misterbk/mix                          v1.7.1          Yes        Yes    
    Navigation                 navigation                 verbb/navigation                      2.1.0           Yes        Yes    
    Neo                        neo                        spicyweb/craft-neo                    4.2.10          Yes        Yes    
    Password Policy            password-policy            craftpulse/craft-password-policy      4.1.0           Yes        Yes    
    PDF Generator              document-helpers           cooltronicpl/document-helpers         2.3.2           Yes        Yes    
    Redactor                   redactor                   craftcms/redactor                     3.1.0           Yes        Yes    
    Redactor Custom Styles     redactor-custom-styles     carlcs/craft-redactorcustomstyles     4.0.3           Yes        Yes    
    Retour                     retour                     nystudio107/craft-retour              4.1.18          Yes        Yes    
    Scout                      scout                      studioespresso/craft-scout            4.1.1           Yes        Yes    
    SEOmatic                   seomatic                   nystudio107/craft-seomatic            4.1.2           Yes        Yes    
    Shortcodes                 shortcodes                 verbb/shortcodes                      3.0.0           Yes        Yes    
    Simple Logger              simple-logger              leowebguy/simple-logger               1.0.2           Yes        Yes    
    Spoon                      spoon                      doublesecretagency/craft-spoon        4.0.4           Yes        Yes    
    Two-Factor Authentication  two-factor-authentication  born05/craft-twofactorauthentication  3.4.0           Yes        Yes    
    Vite                       vite                       nystudio107/craft-vite                4.0.10          Yes        Yes    

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions