#35055 closed Bug (duplicate)

`collectstatic` tries to parse commented out lines in CSS files.

Reported by: Denis Pechenev Owned by: nobody
Component: contrib.staticfiles Version: 4.2
Severity: Normal Keywords: collectstatic, ManifestStaticFilesStorage
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Recently jQuery developers released the new version of jquery-ui ( https://blog.jqueryui.com/2022/07/jquery-ui-1-13-2-released/ ). This version contains a commented out line in jqery-ui.min.css. The comment line contains the following url(%22images%2Fui-icons_555555_256x240.png%22).

When running collectstatic command Django tries to parse the whole file with regular expression and finds strings like url(%22images%2Fui-icons_555555_256x240.png%22) as a valid urls to files. So it builds the url path like the following css/vendor/"images/ui-icons_555555_256x240.png" and tries to open a file with such URL. Because of extra quotes in the path it throws an exception that the file doesn't exist.

Attachments (1)

Screenshot 2023-12-21 at 02.30.54_11zon.jpg (130.4 KB ) - added by Denis Pechenev 11 months ago.
Error trying to make collectstatic with new jquery-ui

Download all attachments as: .zip

Change History (2)

comment:1 by Mariusz Felisiak, 11 months ago

Component: Core (Management commands)contrib.staticfiles
Resolution: duplicate
Status: newclosed
Summary: `collectstatic` tries to parse commented out lines in CSS files as a valid code with `ManifestStaticFilesStorage ``collectstatic` tries to parse commented out lines in CSS files.

Duplicate of #21080.

by Denis Pechenev, 11 months ago

Error trying to make collectstatic with new jquery-ui

Note: See TracTickets for help on using tickets.
Back to Top