timmyomahony / craft-matrix-field-preview

Configure a screenshot preview for all your matrix field blocks, giving your clients a better publishing experience.
https://plugins.craftcms.com/matrix-field-preview
Other
16 stars 4 forks source link

Update to 4.0.1 #83

Closed DTesch-Reem closed 2 years ago

DTesch-Reem commented 2 years ago

Cannot update because of error: Type of weareferal\matrixfieldpreview\MatrixFieldPreview::$schemaVersion must not be defined (as in class craft\base\Plugin)

timmyomahony commented 2 years ago

Can you add a bit of detail on how you are upgrading? Have you already upgraded to Craft 4 and just trying to upgrade the plugin separately, or updating both at once. Can you add your composer.json.

DTesch-Reem commented 2 years ago

Still on Craft CMS 3.7.44 Upgrade does not work through the interface or through the composer my composer json: { "require": { "craftcms/cms": "3.7.44", "craftcms/feed-me": "4.5.3", "craftcms/redactor": "2.10.8", "craftcms/webhooks": "2.4.1", "lukasformulare/lukas-formulare": "^1.0", "mmikkel/incognito-field": "^1.3", "sebastianlenz/linkfield": "2.0.0-rc.2", "spicyweb/craft-embedded-assets": "2.10.7", "thejoshsmith/craft-fab-permissions": "2.0.2", "verbb/smith": "1.2.3", "vlucas/phpdotenv": "^5.4.0", "weareferal/matrix-field-preview": "4.0.1", "yiisoft/yii2-redis": "~2.0.0" }, "require-dev": { "yiisoft/yii2-shell": "^2.0.3" }, "autoload": { "psr-4": { "modules\": "modules/" } }, "config": { "allow-plugins": { "craftcms/plugin-installer": true, "yiisoft/yii2-composer": true }, "sort-packages": true, "optimize-autoloader": true, "platform": { "php": "7.2.5" } }, "scripts": { "post-root-package-install": [ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ] }, "minimum-stability": "dev", "prefer-stable": true, "repositories": [ { "type": "path", "url": "./plugins/lukasformulare" } ] }

timmyomahony commented 2 years ago

Ah. Version 4.X of the plug-in is intended for Craft 4. You can stick with version 3.X of the plug-in for Craft 3 (it has all of the latest features).

On 14 Jun 2022, at 12:46, DTesch-Reem @.***> wrote:

 Still on Craft CMS 3.7.44 Upgrade does not work through the interface or through the composer my composer json: { "require": { "craftcms/cms": "3.7.44", "craftcms/feed-me": "4.5.3", "craftcms/redactor": "2.10.8", "craftcms/webhooks": "2.4.1", "lukasformulare/lukas-formulare": "^1.0", "mmikkel/incognito-field": "^1.3", "sebastianlenz/linkfield": "2.0.0-rc.2", "spicyweb/craft-embedded-assets": "2.10.7", "thejoshsmith/craft-fab-permissions": "2.0.2", "verbb/smith": "1.2.3", "vlucas/phpdotenv": "^5.4.0", "weareferal/matrix-field-preview": "4.0.1", "yiisoft/yii2-redis": "~2.0.0" }, "require-dev": { "yiisoft/yii2-shell": "^2.0.3" }, "autoload": { "psr-4": { "modules\": "modules/" } }, "config": { "allow-plugins": { "craftcms/plugin-installer": true, "yiisoft/yii2-composer": true }, "sort-packages": true, "optimize-autoloader": true, "platform": { "php": "7.2.5" } }, "scripts": { "post-root-package-install": [ @.*** -r "file_exists('.env') || copy('.env.example', '.env');"" ] }, "minimum-stability": "dev", "prefer-stable": true, "repositories": [ { "type": "path", "url": "./plugins/lukasformulare" } ] }

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

timmyomahony commented 2 years ago

(In other words, version 3.0.2 of the plugin is the one you should be targeting)

timmyomahony commented 2 years ago

I think that the underlying issue here is that you were suggested to upgrade to 4.0.1 in the first place (through the interface) even though you are using Craft 3.

The reason for this was that I still had Craft 3 as a valid dependency in the Craft 4 version compose.json. I'm fixing this now so the Craft 4 version shouldn't show up in the Craft 3 upgrades.

Apologies for the mix up

DTesch-Reem commented 2 years ago

Thank you :)

timmyomahony commented 2 years ago

This should hopefully be fixed now. I've re-released version 4.0.0 and 4.0.1 with updated composer.json files, so they should no longer appear for Craft 3 users.

Let me know if you've any further issues.