Hyperkitty href url to css cache files is not correct
Hello guys
i just created my first mailing list on uberspace.
Everything works fine at the moment but I have a problem with the stylesheets of hyperkitty.
I recognized that hyperkitty creates for each new access to its website a css CACHE file which is stored at '/static/CACHE/css/'. The url in the HTML file sets the href to /static/CACHE/css/ but the files are only accessible with '/hyperkitty/static/CACHE/css/'.
I tried out some probably solutions but nothing works...
Could you guys help me?
On 10/5/23 08:37, Alexander Maier wrote:
I recognized that hyperkitty creates for each new access to its website a css CACHE file which is stored at '/static/CACHE/css/'. The url in the HTML file sets the href to /static/CACHE/css/ but the files are only accessible with '/hyperkitty/static/CACHE/css/'.
What are your Django settings for
BASE_DIR STATIC_ROOT STATIC_URL STATICFILES_DIRS STATICFILES_FINDERS
Also in your web server, you need to alias the STATIC_URL value to the
STATIC_ROOT value and finally run the Django admin command
collectstatic --clear --noinput
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hello Mark,
BASE_DIR = '/home/pocovobe/var/' STATIC_ROOT = '/home/pocovobe/webserver/static' STATIC_URL = '/static/' STATICFILES__DIRS = empty STATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', #'django.contrib.staticfiles.finders.DefaultStorageFinder', 'compressor.finders.CompressorFinder', )
On 10/5/23 12:47, Alexander Maier wrote:
Hello Mark,
BASE_DIR = '/home/pocovobe/var/' STATIC_ROOT = '/home/pocovobe/webserver/static' STATIC_URL = '/static/' STATICFILES__DIRS = empty STATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', #'django.contrib.staticfiles.finders.DefaultStorageFinder', 'compressor.finders.CompressorFinder', )
OK. You now should have
ALIAS /static/ /home/pocovobe/webserver/static/
in your web server config (or whatever the equivalent directive is for your web server if not apache.
and you should run the django admin commands
collectstatic --clear --noinput
compress
and if they haven't been run recently
compilemessages
migrate
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Alexander Maier
-
Mark Sapiro