Problem/Motivation
The collection renderer service provided by the module has the potential to render empty <style> tags in unexpected places. For example, after enabling the module with big_pipe also enabled, the action attribute on forms is broken.
Example
/admin/modules/uninstall/confirm" method="post" id="system-modules-uninstall-confirm-form" accept-charset="UTF-8">
is added to the attribute action
Replicated with
PHP 8.0.12
Drupal 9.3.3
Proposed solution
The solution should be simple: prevent the asset collection renderer from writing a <style> element into the DOM response if there are no styles to render.
Comments
Comment #2
luke.leberHi, sorry to hear you're having issues. The good news is that I'm able to replicate this.
I'm promoting the issue priority to critical.
Comment #3
luke.leberI believe that this has something to do with the
big_pipemodule. Are you able to test out uninstallingbig_pipeon a development environment to confirm? In the meantime, I'll see what I can do to resolve the conflict.Thanks!
Comment #4
luke.leberComment #5
luke.leberUploaded test-only patch that should fail.
Comment #6
luke.leberComment #8
luke.leberThe current merge request should resolve the issue at hand.
I'll wait a few days for affirmative feedback from the community before merging the solution in and cutting a new release.
@proweb.ua - thanks so much for your bug report!
Comment #9
proweb.ua commented#5 applied to dev version
is not added to forms now.
But I also don't see inline css.
Cleared the cache. Advagg enabled / disabled.
Comment #10
luke.leberAdded related issue.
Comment #11
luke.leberI've opened https://www.drupal.org/project/inline_all_css/issues/3260846 as a related issue here.
I think that what you're running into is that the head of the dev version adds an additional configuration option to enable / disable the inline behavior. When I committed that feature, I did neglect to provide an update hook to auto-enable things for users that had already installed the module.
If you check the 'enable' box under Configuration -> System -> Inline all css configuration, do things seem to work?
Thanks for bearing with me on this.
Comment #13
luke.leberCommitted and pushed to 1.0.x! Thanks for the bug report.
I'll be landing https://www.drupal.org/project/inline_all_css/issues/3260846 this weekend and cutting rc3.