Problem/Motivation
I would like to use Webform in Drupal 9.0.6
Steps to reproduce
I upgraded my site from D8.9.6. After doing this, I got error:
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "phpmailer" plugin does not exist. Valid plugin IDs for Drupal\mailsystem\MailsystemManager are: swiftmailer, webform_php_mail, php_mail, test_mail_collector in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).
Proposed resolution
I uninstalled all the addons
Webform Access
Webform Attachment
Webform iCheck
Webform Image Select
Webform Location Geocomplete
Webform Submission Export/Import
Webform Submission Log
Webform Templates
Webform UI
Webform Node
which did not help. Finally, after I uninstalled Webform itself (in the GUI) Status Report started working again. I tried this procedure twice, hoping that an uninstall and reinstall would fix it. It did not.
Note that the phpmailer library is installed both in vendor/phpmailer and in libraries.
Remaining tasks
Why does Webform require the phpmailer plugin?
Where is Webform looking for it?
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 3175586-4.patch | 586 bytes | jrockowitz |
Comments
Comment #1
tjtj commentedtjtj created an issue.
I have other D9.0.6 installations with webform installed that do not do this!
Comment #2
jrockowitz commentedDo you have the phpmailer.module installed?
You might need to uninstall it before upgrading to D9
Comment #3
tjtj commentedthe phpmailer module is NOT installed. But phpmailer/phpmailer is installed--required by other things.
It was installed in D8, but I uninstalled it. Why is Webform triggering this?
Actually, uninstalling phpmailer in Drupal 8 triggers this exception when Status Report is run so long as Webform is installed. Uninstalling Webform removes trhe error, but I need Webform, and phpmailer seems to be abandoned.
Comment #4
jrockowitz commentedThe \Drupal\webform\WebformEmailProvider tracks which mail system is being used so that HTML email and attachments can be handled correctly.
You probably need to update your system.mail.yml settings and remove the reference to phpmailer
The attached patch tries to more gracefully handle this issue.
Comment #6
jrockowitz commentedComment #8
tjtj commentedThe patch seems to work!