Upgarde to 4.4.9 via Composer fails with unefined constant

Your software
My Mautic version is: 4.4.9
My PHP version is: 8.0
My Database type and version is: MariaDB

Your problem
My problem is: When I try to run database migrations after the latest composer update, I get the following error message:

Migration 20230522115137 failed during Execution. Error Undefined constant MauticPlugin\MauticCitrixBundle\Integration\CitrixAbstractIntegration::DEPRECATION_MESSAGE

In Version20230522115137.php line 38:
  Undefined constant MauticPlugin\MauticCitrixBundle\Integration\CitrixAbstractIntegration::DEPRECATION_MESSAGE  

Steps I have tried to fix the problem:

  • Cleared cache
  • Validated issue exists on multiple boxes

After a quick look i think there is an issue in the migration file, there is no constant declared in the bundle class and yet the migration is referring to it.

Further more all this migration does is insert some warning that I guess is telling you that citrix is deprecated. If you deactivate the plugin and try to run the migration again it should be ok.

You can also “fix” the issue by changing the line here:

to something like this:

$message = "Citrix is not available on Mautic 5";

Hope this helps.

Regards, M.

@steverobinson would you mind raising it as a bug on GitHub?

I think it’s hopefully a quick fix which we can push out in the next patch release.

Thanks! I ended up skipping (deleting) the migration for now since we’re not running the plugin at this time, but your fix is a lot more elegant!

@rcheesley Bug created

1 Like