I'm trying to install the jquery-ui-dist package, and when I run collectstatic, whitenoise seems to have trouble when a url is inside quotations in a stylesheet.
The error I get is:
MissingFileError: The file 'jquery-ui-dist/"images/ui-icons_555555_256x240.png"' could not be found with <whitenoise.storage.CompressedManifestStaticFilesStorage object at 0x7fb16b7000b8>.
The CSS file 'jquery-ui-dist/jquery-ui.css' references a file which could not be found:
jquery-ui-dist/"images/ui-icons_555555_256x240.png"
Please check the URL references in this CSS file, particularly any
relative paths which might be pointing to the wrong location.
I see that it seems to think it's looking for a bad filename, as it keeps the quotations around it, and I assumed that the reason was because the source file has url("images/ui-icons_555555_256x240.png")
when the quotations are unnecessary, so I ran sed -i 's/\"images\/ui-icons_555555_256x240.png\"/images\/ui-icons_555555_256x240.png/g' jquery-ui.css
on the source file, which removed the quotation marks, but I still get the error.
I'm assuming there is a problem with either whitenoise or the jquery-ui-dist package, but until the problem is fixed on their end, I at least need a temporary solution, and I'm not even sure where the actual problem lies.
EDIT:
I found that it is the comments in the css files that are causing the issue. I don't know why whitenoise is parsing comments though, nor do I know what I can do about it other than manually remove those comments.