tikiatua/internal-assets-plugin

Craft 4 Version Doesn't Specify Proper Schema Version

timnolte opened this issue · 6 comments

After upgrading to the latest version of the plugin for our Craft v4 upgrade we are now receiving the following error when attempting to apply Project configurations.

Your project config files were created for different versions of Craft and/or plugins than what’s currently installed.

Internal Assets is installed with schema version of 1.0.0 while 2.0.0 was expected.

Try running `composer install` from your terminal to resolve.

I believe you need to add

"schemaVersion": "2.0.0",

Into the extra section of your composer.json.

Actually, this may not be enough, looks like you'll most likely also need to include it in the main plugin Class property setup. https://github.com/tikiatua/internal-assets-plugin/blob/craft4/src/Plugin.php

    /**
     * @inheritdoc
     */
    public string $schemaVersion = '2.0.0';

FYI, I patched the plugin via Composer and did confirm that adding the public string $schemaVersion = '2.0.0'; to the Plugin.php file did in fact fix the issue.

Hi @timnolte

I am currently checking if the plugin works with Craft version 5 and also wanted to look into this issue. Do you know if there any documentation available for the $schemaVersion feature? I could not find anything.

@tikiatua it's been a bit but I think you'd have to look at the plugin development documentation. This may also be a case of looking at the Craft classes that are being extended to see what they specify. We won't be upgrading the site I am managing to Craft v4 as the site is in the planning stages of a rebuild and we won't be using Craft for the rebuild.

Closing this, as this seems to be a special case.

I hit this too, I dropped my schemaVersion to 1.0.0 in the project.yaml file to bypass this.