Problem/Motivation
Preconditions: A site which uses a lazy builder to render the commerce cart form.
When pressing the Checkout button, the site crashes inside CspResponseAttachmentsProcessor on line 50 because the RedirectResponse doesn't have the setAttachments() method.
This is caused by an early return in Drupal\Core\Render\HtmlResponseAttachmentsProcessor::processAttachments() if an EnforcedResponseException is thrown while rendering placeholders.
Steps to reproduce
Proposed resolution
Only call setAttachments on responses which implement the Drupal\Core\Render\AttachmentsInterface interface.
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #2
znerol commentedComment #4
gappleThank you