Some css source code has {{{url()}}} statement inside the comment {{{/*
*/}}} with wrong relatative path to img/font.
During running command {{{python manage.py collectstatic}}} I get error
message.
{{{
Traceback (most recent call last):
File "manage.py", line 26, in <module>
execute_from_command_line(sys.argv)
File "/home/test/.local/share/virtualenvs/klub-v-nnivlwsY/lib/python3.6
/site-packages/django/core/management/__init__.py", line 381, in
execute_from_command_line
utility.execute()
File "/home/test/.local/share/virtualenvs/klub-v-nnivlwsY/lib/python3.6
/site-packages/django/core/management/__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/test/.local/share/virtualenvs/klub-v-nnivlwsY/lib/python3.6
/site-packages/django/core/management/base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/test/.local/share/virtualenvs/klub-v-nnivlwsY/lib/python3.6
/site-packages/django/core/management/base.py", line 364, in execute
output = self.handle(*args, **options)
File "/home/test/.local/share/virtualenvs/klub-v-nnivlwsY/lib/python3.6
/site-
packages/django/contrib/staticfiles/management/commands/collectstatic.py",
line 188, in handle
collected = self.collect()
File "/home/test/.local/share/virtualenvs/klub-v-nnivlwsY/lib/python3.6
/site-
packages/django/contrib/staticfiles/management/commands/collectstatic.py",
line 134, in collect
raise processed
whitenoise.storage.MissingFileError: The file 'colorPicker/_blank.gif'
could not be found with
<whitenoise.storage.CompressedManifestStaticFilesStorage object at
0x7fe6c456c8d0>.
The CSS file 'colorPicker/index.css' references a file which could not be
found:
colorPicker/_blank.gif
Please check the URL references in this CSS file, particularly any
relative paths which might be pointing to the wrong location.
}}}
{{{ url('_blank.gif') }}} statement is inside comment in the css source
code.
Problem is that {{{@import}}} rule and {{{url()}}} statement are checked
in all css file source code content, include code between css comment
{{{/* */}}}.
( regex pattern for the match rule/statement {{{
django.contrib.staticfiles.storage.HashedFilesMixin.patterns}}})
I write patch which match this rule and statement only outside of the css
comment in css file source code.
--
Ticket URL: <https://code.djangoproject.com/ticket/31000>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Old description:
New description:
[https://github.com/django/django/pull/12104 PR]
--
--
Ticket URL: <https://code.djangoproject.com/ticket/31000#comment:1>
* status: new => closed
* resolution: => duplicate
* version: 2.2 => master
* type: Uncategorized => Bug
Comment:
Duplicate of #21080.
--
Ticket URL: <https://code.djangoproject.com/ticket/31000#comment:2>
--
Ticket URL: <https://code.djangoproject.com/ticket/31000#comment:3>