Currently the aggregator fails when it encounters a CSS like
background: url(/path/*file*)
because /*
is treated as the start of CSS comment.
A proposed fix will be attached in short time. It basically keeps unquoted url() intact.
This was discovered along with a discussion about the possibility of including //-style syntax on www-style, the mailing list for CSS spec development. If //-style comment are introduced in the future, we need this patch to deal with the very general
@import url( http://dont.com/even/look.css )
too, before //-style comments are removed.
Issue fork drupal-1761498
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #1
kennyluck CreditAttribution: kennyluck commentedThis patch doesn't handle cases like
u\rl(/path/*file*)
but I don't think we should bother.
Comment #2
kennyluck CreditAttribution: kennyluck commentedComment #3
kennyluck CreditAttribution: kennyluck commentedtweaks
Comment #4
Wim LeersNeeds reroll now that #352951: Make JS & CSS Preprocessing Pluggable has landed. Also needs test coverage. Please take a look at the patch at #2014851-5: Drupal CSS preprocessing breaks protocol-relative paths to get an idea of where to look and how to do it.
Comment #5
Wim Leers.
Comment #6
Wim Leersd.o fail.
Comment #7
mgiffordComment #10
neerajpandey CreditAttribution: neerajpandey at Google Code-In commentedReroll patch done.
Comment #15
chiranjeeb2410 CreditAttribution: chiranjeeb2410 at Google Summer of Code commented@Wim Leers,
Patch rerolled for #3. Expect a green flag!
Comment #17
chiranjeeb2410 CreditAttribution: chiranjeeb2410 at Google Summer of Code commentedComment #19
joelpittet@chiranjeeb2410 looks like you have the D7 branch or something in your patch, want to try again with 8.5.x branch?
Comment #20
chiranjeeb2410 CreditAttribution: chiranjeeb2410 at Google Summer of Code commented@joelpittet, will do it right away
Comment #21
chiranjeeb2410 CreditAttribution: chiranjeeb2410 at Google Summer of Code commented@joelpittet,
Patch rerolled against 8.5.x. Hope it shows green!
Please review.
Comment #23
joelpittet@chiranjeeb2410 see the size of the patch is 281KB. That's a bit big to review. It should be less than 1K like #3 I now realize it's #10 that was where things went askew.
Comment #24
chiranjeeb2410 CreditAttribution: chiranjeeb2410 at Google Summer of Code commented@joelpittet,
It's the reroll of the patch in comment #3, that's needed right, cause the one in #10 failed automated testing.
Comment #25
chiranjeeb2410 CreditAttribution: chiranjeeb2410 at Google Summer of Code commentedRerolled against latest core. Please review.
Comment #27
andypostPlease use patch from comment #3 & it still needs tests
Comment #28
chiranjeeb2410 CreditAttribution: chiranjeeb2410 at Google Summer of Code commented@andypost, been doing that all this time. Dunno why automated tests aren't complying.
Comment #29
andypostHere's a straight reroll for d8
Comment #30
andypostbtw
\Drupal\Tests\Core\Asset\CssOptimizerUnitTest
does not testprocessFile()
,loadFile()
Comment #31
chiranjeeb2410 CreditAttribution: chiranjeeb2410 at Google Summer of Code commented@andypost,
Thanks for the patch.
Works as intended. Straight RTBC for me!
Comment #32
alexpottThis reads like at least a normal bug to me. We need automated test coverage of this change. We can add the test coverage to \Drupal\Tests\Core\Asset\CssOptimizerUnitTest
Comment #37
bandanasharma CreditAttribution: bandanasharma as a volunteer and at gai Technologies Pvt Ltd for gai Technologies Pvt Ltd commentedRe-roll the patch for d9.
Comment #38
tanubansal CreditAttribution: tanubansal at Salsa Digital commentedTested #37 on 9.1
Working fine for me
RTBC +1
Comment #44
needs-review-queue-bot CreditAttribution: needs-review-queue-bot as a volunteer commentedThe Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #48
djsagar CreditAttribution: djsagar at OpenSense Labs commentedComment #49
needs-review-queue-bot CreditAttribution: needs-review-queue-bot as a volunteer commentedThe Needs Review Queue Bot tested this issue.
While you are making the above changes, we recommend that you convert this patch to a merge request. Merge requests are preferred over patches. Be sure to hide the old patch files as well. (Converting an issue to a merge request without other contributions to the issue will not receive credit.)
Comment #50
djsagar CreditAttribution: djsagar at OpenSense Labs commentedComment #51
needs-review-queue-bot CreditAttribution: needs-review-queue-bot as a volunteer commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #52
ameymudras CreditAttribution: ameymudras at Salsa Digital commentedI can confirm that the patch #37 still applies to 11.x and works as expected. Re rolling to a MR was not needed here. We might need a supporting test here.