Mailpoet plugin conflict with Html2Text breaks reports and emails
Overview
After upgrading to 5.54.1 back in November (and several subsequent upgrades), a conflict with MailPoet plugin is causing the error below to occur when receipt emails are being sent resulting in failure to send. It is also affecting the running of any report if any filter is enabled on report.
Error thrown
Call to undefined method Html2Text\Html2Text::getText()
See stack exchange:
https://civicrm.stackexchange.com/questions/42921/reports-failing-after-upgrade-whenany-filter-enabled and https://civicrm.stackexchange.com/questions/43502/civicrm-mailpoet-plugin-conflict-with-html2text
Reproduction steps
Disable MailPoet plugin and all works perfectly. With plugin enabled, error as above in the situations noted. Manual email receipts also failing when MailPoet enabled.
Current behaviour
We can fix this temporarily by replacing the MailPoet version of html2text with the CiviCRM version, but this is overwritten every time MailPoet is upgraded.
Expected behaviour
There was no compatibility issue for the last 7 years between MailPoet and CiviCRM re this issue.
Environment information
- CiviCRM: From 5.54.1 onwards (currently 5.55.0) but we hadn't upgraded in some time so unclear when bug was introduced.
- PHP: 7.4 & also 8.1
- CMS: Wordpress 6.1.1
- MailPoet: 4.6.2 and earlier
Comments
Happy to open ticket with MailPoet if necessary.