Opened 23 months ago
Closed 23 months ago
#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)
Change History (2)
comment:1 by , 23 months ago
| Component: | Core (Management commands) → contrib.staticfiles |
|---|---|
| Resolution: | → duplicate |
| Status: | new → closed |
| 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. |
by , 23 months ago
| Attachment: | Screenshot 2023-12-21 at 02.30.54_11zon.jpg added |
|---|
Error trying to make collectstatic with new jquery-ui
Duplicate of #21080.