Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
renderRoot() call in SwiftMailer::format method causes Renderer logic exception when email needs to be sent via AJAX call:
LogicException: A stray renderRoot() invocation is causing bubbling of attached assets to break
Steps to reproduce:
- Implement form with ajax submission (I faced this problem when tried to send email on hook_comment_insert() with ajax_comments module enabled)
- Try to submit the form
- Exception will be thrown
May be it's better to replace renderRoot with renderPlain call inside SwiftMailer::format() method?
Comment | File | Size | Author |
---|---|---|---|
#3 | 2825362_change_render_function.patch | 610 bytes | DiDebru |
Comments
Comment #2
DiDebrusubscribe.
Comment #3
DiDebruComment #4
DiDebruComment #5
StryKaizerIssue occured here too (webform with ajax submit, rendered as a field in a paragraph, sending emails)
Patch fixed the issue, thx!
Comment #7
webflo CreditAttribution: webflo at UEBERBIT GmbH commented