Fatal error because plugin class is not loaded

Created on 29 March 2016, about 8 years ago
Updated 15 January 2024, 5 months ago

I get this error

PHP Fatal error: Class name must be a valid object or a string in /sites/all/modules/contrib/message_notify/message_notify.module on line 30

when I try to send the confirmation message with this module via rules and on commerce order creation.

This line fixes the error: ctools_include('plugins'); because by default "ctools_plugin_load_class" function is not loading the class when you use rules and cache backend like Redis (not sure about others, but it should be the same).


function message_notify_send_message(Message $message, array $options = array(), $notifier_name = 'email') {
  ctools_include('plugins');
  if (!$plugin = message_notify_get_notifier($notifier_name)) {
    throw new MessageNotifyException(format_string('Could not send notification using the "@notifier" notifier.'), array('@notifier' => $notifier_name));
   }

Please add the call for ctools plugins include.

πŸ› Bug report
Status

Closed: outdated

Version

2.5

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany a.dmitriiev

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024