Problem/Motivation

Web profiler is also overwriting html_response.attachments_processor but in a service provider so its happening later which mean if you use 'js' on an http response with both modules installed you still run into the hardcoded validation and get a fatal error.

This is probably core's fault more then anything but also kinda a bug with webprofiler but wanted to capture it incase someone else ran into the problem.

https://gitlab.com/drupalspoons/webprofiler/-/issues/94

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

neclimdul created an issue. See original summary.

gapple’s picture

It might not be possible to get around this conflict without core changes that allow everyone to decorate instead of replace the service
#3096061: [upstream] html_response.attachments_processor service must be replaced instead of decorated

neclimdul’s picture

agreed

gapple’s picture

Looks like Webprofiler has a decoration solution now:
https://git.drupalcode.org/project/webprofiler/-/commit/43e8aba836c7a696...

(though this: $this->dataCollector->setPlaceholders($attachments['big_pipe_placeholders'] ?? []); looks like it might not handle core's placeholders when bigpipe is disabled - $attached['html_response_attachment_placeholders'])

neclimdul’s picture

oh that looks promising. That does look a bit off but it's just their collection so shouldn't be a big deal.

Still agreed core needs a better setup in core but this should solve the immediate issue once its released.

gapple’s picture

Status: Active » Closed (duplicate)

With webprofiler's change I think this is no longer a problem. The older issue has details on changes needed in core to prevent future conflicts if another module needs to replace the same service.