﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
32218	storage.StaticFilesStorage.post_process substitutes relative URLs in comments	Gagan Deep	Gagan Deep	"While using {{{ STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage' }}} setting, the {{{ collectstatic }}} command was always failing because it was not able to find a certain file. I am getting the following error:

{{{

ValueError: The file 'netjsongraph/css/lib/""images/ui-icons_555555_256x240.png""' could not be found with <django.contrib.staticfiles.storage.ManifestStaticFilesStorage object at 0x7f773b3be520>.

}}}

The peculiar thing to notice is the name of the missing file contains {{{ "" }}}. Initially I thought it might me an error in the CSS, but even after removing all CSS properties using {{{ url() }}} functions, the error was still there.
The error disappeared only after I removed the comment in the CSS file which contained {{{ url(%22images%2Fui-icons_555555_256x240.png%22) }}} as a parameter to some URL. 

The {{{ post_process }}} should not try to make substitutions for {{{ url }}} keyword inside comments. Since it pattern matching is used to make substitutions, it will be better to process files without comments for pattern matching.

You can use [https://github.com/openwisp/openwisp-network-topology/blob/485a97bcc273fc4dfbb53f509f70a4825fab5a0f/openwisp_network_topology/static/netjsongraph/css/lib/jquery-ui.min.css this CSS file] for reproducing this bug."	Bug	closed	contrib.staticfiles	dev	Normal	duplicate	static		Unreviewed	0	0	0	0	0	0
