sehmaschine / django-grappelli

A jazzy skin for the Django Admin-Interface (official repository).
http://www.grappelliproject.com
Other
3.77k stars 657 forks source link

Collectstatic errors after upgrading from 2.15.6 to 2.15.7 #1043

Closed jordanvs closed 7 months ago

jordanvs commented 11 months ago

When running collectstatic, I get the following error (building a docker container). It appears downgrading back to 2.15.6 solves this issue.

There appears to be a jQueryUI upgrade in 2.15.7. Perhaps this is the cause. Googling the error message points to years-old struggles with URLs in jquery ui css comments. Removing those comments seems to fix that problem for people.

 => ERROR [22/22] RUN python manage.py collectstatic --noinput                                                                                                                                                                                                                                                                                                                                            7.2s
------
 > [22/22] RUN python manage.py collectstatic --noinput:
6.318 Found another file with the destination path 'admin/js/actions.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
6.353 Found another file with the destination path 'admin/js/admin/DateTimeShortcuts.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
6.353 Found another file with the destination path 'admin/js/admin/RelatedObjectLookups.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
6.669 Post-processing 'grappelli/jquery/ui/jquery-ui.theme.css' failed!
6.669 
6.671 Traceback (most recent call last):
6.671   File "/usr/src/app/src/manage.py", line 34, in <module>
6.671     main()
6.671   File "/usr/src/app/src/manage.py", line 30, in main
6.671     execute_from_command_line(sys.argv)
6.671   File "/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
6.671     utility.execute()
6.671   File "/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py", line 413, in execute
6.671     self.fetch_command(subcommand).run_from_argv(self.argv)
6.671   File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 354, in run_from_argv
6.671     self.execute(*args, **cmd_options)
6.671   File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 398, in execute
6.671     output = self.handle(*args, **options)
6.671   File "/usr/local/lib/python3.9/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 187, in handle
6.671     collected = self.collect()
6.671   File "/usr/local/lib/python3.9/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 134, in collect
6.671     raise processed
6.671 whitenoise.storage.MissingFileError: The file 'grappelli/jquery/ui/"images/ui-icons_555555_256x240.png"' could not be found with <whitenoise.storage.CompressedManifestStaticFilesStorage object at 0x7f4eb74470d0>.
6.671 
6.671 The CSS file 'grappelli/jquery/ui/jquery-ui.theme.css' references a file which could not be found:
6.671   grappelli/jquery/ui/"images/ui-icons_555555_256x240.png"
6.671 
6.671 Please check the URL references in this CSS file, particularly any
6.671 relative paths which might be pointing to the wrong location.
6.671 
sehmaschine commented 11 months ago

ah ... not again! sorry about that. I've added a fix – can you please check this (if it works, I'll do another release).

myii commented 8 months ago

@sehmaschine I can confirm that 70d7f976ec5999f05db00fcaaa4aa73bebcb6728 fixes the issue, thanks for providing that.

jordanvs commented 7 months ago

thank you @sehmaschine! I will verify this as well and post back if there's anything more.