I just upgraded from 4.6.23 to 4.6.26. I'm on wordpress. Everything else seems to work fine. When I start a new mailing I get this error:

PHP Fatal error: Call to undefined method CRM_Mailing_BAO_Mailing: :getTemplateTypes() in ...wp-content/plugins/civicrm/civicrm/CRM/Mailing/Info.php on line 168, referer: ...

I see that getTemplateTypes is new for 4.6.26. I see in civicrm/CRM/Mailing/BAO/Mailing.php that the function is defined there.

I've commented out the reference to getTemplateTypes in civicrm/CRM/Mailing/Info.php and that allows me to start a new mailing, but now I'm getting this PHP warning:

PHP Warning: call_user_func() expects parameter 1 to be a valid c allback, class 'CRM_Mailing_BAO_Mailing' does not have a method 'getTemplateTypeNames' in .../civicrm/CRM/Core/PseudoConstant.php on line 277, ...

  • Since you see the method there but it doesn't find it, maybe you have a caching issue. You might try doing the same thing from a private or incognito browswer session and see if that works. It could be on the civi side so you could try to clear all of civi's caches.
    – Paul-Tahoe
    Mar 6, 2017 at 23:09
  • I've tried your suggestions and it doesn't seem to be a caching problem. Mar 9, 2017 at 19:59
  • Did you ever manage to resolve this? I've just had the same thing updating from 4.6.24 to 4.6.28 - starting a new mailing throws a HTTP Error 500 and creates the 'Call to undefined method CRM_Mailing_BAO_Mailing: :getTemplateTypes()' error in the server log.
    – Rich Smith
    Jun 27, 2017 at 12:58
  • No. Not resolved. As I stated in the last paragraph, after commenting out the reference to getTemplateTypes... I can start and complete mailings. Jun 28, 2017 at 14:08
  • Rich Smith, just alerting you to the answer below. Aug 11, 2017 at 22:53

1 Answer 1


This means CRM_Mailing_BAO_Mailing class is overriden somewhere. This could be due to a civicrm extension like mailjet that overrides Mailing.php

Please check which extension is overriding it and either disable that extension or update Mailing.php in it.

Let me know if it works!


  • Thanks! I have a sendgrid extension that must be doing what you say. I'll check for an update to that extension. Aug 11, 2017 at 22:05

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.