verbb / navigation

A Craft CMS plugin to create navigation menus for your site.
Other
90 stars 22 forks source link

Craft 3 -> 4 upgrade error #357

Closed sander-lameco closed 1 year ago

sander-lameco commented 1 year ago

Describe the bug

I'm currently upgrading a project to Craft 4. I first updated Craft and all plugins to the latest versions of Craft 3. After that I changed all versions in composer.json, updated composer.json and tried running the migrate command.

When the migration is at the Navigation migrations I get the following:

*** applying m220428_000000_custom_node_type
    > update in {{%navigation_nodes}} ... done (time: 0.004s)
    > update in {{%navigation_nodes}} ... done (time: 0.000s)
    > update in {{%navigation_nodes}} ... done (time: 0.000s)
    > update in {{%navigation_nodes}} ... done (time: 0.000s)
    > update in {{%navigation_nodes}} ... done (time: 0.000s)
    > update in {{%navigation_nodes}} ... done (time: 0.000s)
    > update in {{%navigation_nodes}} ... done (time: 0.000s)
    > update in {{%navigation_nodes}} ... done (time: 0.000s)
    > update in {{%navigation_nodes}} ... done (time: 0.000s)
    > update in {{%navigation_nodes}} ... done (time: 0.000s)
PHP Compile Error 'yii\base\ErrorException' with message 'Type of modules\fields\MarginSetting::$optgroups must be bool (as in class craft\fields\Dropdown)'

I'm not sure if this is related to the Navigation plugin or not, but because the error is triggered for this migration im assuming it is.

Steps to reproduce

Not sure if you will encounter it, might be content/config related.

  1. Update Craft + plugin(s) to latest Craft 3 versions
  2. Update composer.json
  3. run composer update
  4. run php craft migrate/all

Craft CMS version

3.8.13

Plugin version

1.4.32

Multi-site?

Yes

Additional context

composer.json:

        "born05/craft-twofactorauthentication": "^3.2",
        "craftcms/aws-s3": "^2.0",
        "craftcms/cms": "^4.0",
        "craftcms/feed-me": "^5.1",
        "craftcms/redactor": "^3.0",
        "doublesecretagency/craft-cpcss": "^2.3",
        "nilsenpaul/complete-cookie-consent": "^1.1",
        "nystudio107/craft-cookies": "^4.0",
        "nystudio107/craft-retour": "^4.1",
        "nystudio107/craft-seomatic": "^4.0",
        "perfectwebteam/craft-mailchimp-transactional": "^2.0",
        "presseddigital/linkit": "4.0",
        "putyourlightson/craft-elements-panel": "^2.0",
        "solspace/craft-freeform": "^4.0",
        "spacecatninja/imager-x": "^4.1",
        "verbb/navigation": "^2.0",
        "verbb/super-table": "^3.0",
sander-lameco commented 1 year ago

Sorry, I should have looked into the code/error some more. This is a Craft project we took over from and apparently there is some custom Module code that is causing this error.