Defer tag for JS not added when add the defer tag to all is selected

Created on 7 November 2022, over 1 year ago
Updated 25 August 2023, 10 months ago

Problem/Motivation

If add the defer tag to all script tags is set to all, the defer tag is not added.

Steps to reproduce

In the admin/config/development/performance/advagg/mod under JS > Adjust javascript location and execution, enable the all (might break things) radio. Inspect your bundled JS and notice the defer tag is missing.

Proposed resolution

It seems the DeferJs.php file is getting the wrong setting.
Instead of js_defer, it's getting css_defer_js_code, which is the CSS setting under Adjust CSS location and execution (Experimental). I think those two settings should not relay on one another and it seems it was just overlooked.

Remaining tasks

- write patch
- test/review

🐛 Bug report
Status

Needs review

Version

4.0

Component

Code

Created by

🇸🇮Slovenia DeaOm

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024