0

After upgrading to 5.54.1, most reports are failing to run for us, generating the error below:

Error thrown

Call to undefined method Html2Text\Html2Text::getText()

Some reports were seemingly ok but after some troubleshooting I can break these too. The reports with no filters enabled are fine, but as soon as any filter is selected, the error above appears on a new white page.

There's nothing being logged in the ConfigandLog file when this happens. Can reproduce at will. Not limited to any specific report or filter.

Any ideas? Thank you!

7
  • Can you reproduce this behaviour on dmaster.demo.civicrm.org ?
    – Aidan
    Nov 4, 2022 at 17:57
  • Can you add the report name? Nov 4, 2022 at 18:07
  • Aidan - no, it's working on the demo, altough mine is a Wordpress install, not Drupal PradeepNayak - Every report I tried, for example 'Contribution Summary' and 'Mail Bounces'
    – astroned
    Nov 4, 2022 at 18:32
  • wpmaster.demo.civicrm.org then
    – petednz - fuzion
    Nov 4, 2022 at 18:42
  • It's working as expected on your demo site, just not on mine.
    – astroned
    Nov 4, 2022 at 21:14

1 Answer 1

2

@astroned I just ran into this issue as well and traced it to a conflict with another plugin (mailpoet). It loads a php library called Html2Text that is completely different from what Civi includes (but accomplishes the same task). I modified CRM_Utils_String::htmlToText() to conditionally run the converting function based on which library was getting loaded (using method_exists to determine which). Not ideal but that function performs a pretty basic task and I'm not too concerned about which of the two libraries is used.

1
  • Thank you! We use Mailpoet also and I confirm that when it is deactivated, our reports run normally. Would you mind sharing your updated file with your fix please?
    – astroned
    Dec 10, 2022 at 18:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.