Docker-mailman: [BUG] bootstrap issue after pulling latest image

Created on 25 Jun 2020  ·  12Comments  ·  Source: maxking/docker-mailman

Tag/version of Container Images
Choose from: latest, rolling, 0.2, 0.2.*

After pulling latest image from docker and starting image - when I click on 'login' link I'm getting the following error:

FilterError at /accounts/login/
Error: It's not clear which file to import for '@import "../libs/bootstrap/=
stylesheets/bootstrap"'.
      Candidates:
        ../libs/bootstrap/stylesheets/_bootstrap.scss
        ../libs/bootstrap/stylesheets/bootstrap.scss
      Please delete or rename all but one of these files.
       on line 2 of ../mailman-web-data/static/hyperkitty/sass/hyperkitty.=
scss
@import "../libs/bootstrap/stylesheets/bootstrap";

I've noticed there are two files:
static/hyperkitty/libs/bootstrap/stylesheets/_bootstrap.scss
static/hyperkitty/libs/bootstrap/stylesheets/bootstrap.scss

Renaming bootstrap.scss to bootstrap.scss.OLD made web interface usable again but I need to do that each time container is restarted. This file is auto getting created each start. Plus interface looks probably not as it should (using incorrect bootstrap files?)

bug

All 12 comments

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.82. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Hey @belzebubek ! My solution was to delete _bootstrap.scss which seems older. It's definitely the bug of the image upgrade.

Another upgrade issue is necessity to delete browser cache after upgrade.

It would be great to generate unique static files names on upgrade to avoid browser cache issues...

After deleting/renaming _bootstrap.scss I saw many errors, unfortunately I deleted the mail with exact information. Only leaving the older one brought back service to life.

@belzebubek Those errors might be related to browser cache issue. I'd suggest to try to delete the file, then check if it works in browser Incognito mode.

Thanks I will give it a try and get back with results later.

@danil-smirnov worked for me - thanks :)

For me it is not working - internal server error.

Traceback:

File "/usr/lib/python3.6/site-packages/compressor/base.py" in precompile

  1. mod = import_module(mod_name)

File "/usr/lib/python3.6/importlib/__init__.py" in import_module

  1. return _bootstrap._gcd_import(name[level:], package, level)

File "" in _gcd_import

File "" in _find_and_load

File "" in _find_and_load_unlocked

During handling of the above exception (No module named 'sassc -t compressed {infile} {outfile}'), another exception occurred:

File "/usr/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner

  1. response = get_response(request)

File "/usr/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response

  1. response = self.process_exception_by_middleware(e, request)

File "/usr/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response

  1. response = response.render()

File "/usr/lib/python3.6/site-packages/django/template/response.py" in render

  1. self.content = self.rendered_content

File "/usr/lib/python3.6/site-packages/django/template/response.py" in rendered_content

  1. content = template.render(context, self._request)

File "/usr/lib/python3.6/site-packages/django/template/backends/django.py" in render

  1. return self.template.render(context)

File "/usr/lib/python3.6/site-packages/django/template/base.py" in render

  1. return self._render(context)

File "/usr/lib/python3.6/site-packages/django/template/base.py" in _render

  1. return self.nodelist.render(context)

File "/usr/lib/python3.6/site-packages/django/template/base.py" in render

  1. bit = node.render_annotated(context)

File "/usr/lib/python3.6/site-packages/django/template/base.py" in render_annotated

  1. return self.render(context)

File "/usr/lib/python3.6/site-packages/django/template/loader_tags.py" in render

  1. return compiled_parent._render(context)

File "/usr/lib/python3.6/site-packages/django/template/base.py" in _render

  1. return self.nodelist.render(context)

File "/usr/lib/python3.6/site-packages/django/template/base.py" in render

  1. bit = node.render_annotated(context)

File "/usr/lib/python3.6/site-packages/django/template/base.py" in render_annotated

  1. return self.render(context)

File "/usr/lib/python3.6/site-packages/django/template/loader_tags.py" in render

  1. return compiled_parent._render(context)

File "/usr/lib/python3.6/site-packages/django/template/base.py" in _render

  1. return self.nodelist.render(context)

File "/usr/lib/python3.6/site-packages/django/template/base.py" in render

  1. bit = node.render_annotated(context)

File "/usr/lib/python3.6/site-packages/django/template/base.py" in render_annotated

  1. return self.render(context)

File "/usr/lib/python3.6/site-packages/compressor/templatetags/compress.py" in render

  1. return self.render_compressed(context, self.kind, self.mode, forced=forced)

File "/usr/lib/python3.6/site-packages/compressor/templatetags/compress.py" in render_compressed

  1. rendered_output = compressor.output(mode, forced=forced, basename=file_basename)

File "/usr/lib/python3.6/site-packages/compressor/css.py" in output

  1. ret.append(subnode.output(args, *kwargs))

File "/usr/lib/python3.6/site-packages/compressor/css.py" in output

  1. return super(CssCompressor, self).output(args, *kwargs)

File "/usr/lib/python3.6/site-packages/compressor/base.py" in output

  1. output = '\n'.join(self.filter_input(forced))

File "/usr/lib/python3.6/site-packages/compressor/base.py" in filter_input

  1. for hunk in self.hunks(forced):

File "/usr/lib/python3.6/site-packages/compressor/base.py" in hunks

  1. precompiled, value = self.precompile(value, **options)

File "/usr/lib/python3.6/site-packages/compressor/base.py" in precompile

  1. return True, filter.input(**kwargs)

File "/usr/lib/python3.6/site-packages/compressor/filters/base.py" in input

  1. return super(CachedCompilerFilter, self).input(**kwargs)

File "/usr/lib/python3.6/site-packages/compressor/filters/base.py" in input

  1. raise FilterError(err)

Exception Type: FilterError at /accounts/login/ Exception Value: Error: Undefined variable: "$screen-xs-min".
on line 23 of ../mailman-web-data/static/hyperkitty/sass/bootstrap/_custom-variables.scss
from line 4 of ../mailman-web-data/static/hyperkitty/sass/hyperkitty.scss

$screen-tn-max: ($screen-xs-min - 1) !default;

------------------------------^

Request information:
USER: AnonymousUser

GET:
next = '/postorius/lists/'

POST: No POST data

FILES: No FILES data

COOKIES: No cookie data

@belzebubek No ideas then :(

This has been discussed here with no luck either:

https://lists.mailman3.org/archives/list/[email protected]/thread/Z327W5N4LB7BNNZW6UO7I2VIY3XYBAJC/

It looks like the issue is related to bootstrap. As I mentioned opposite rename to yours solve issue.

Exception Type: FilterError at /accounts/login/ Exception Value: Error: Undefined variable: "$screen-xs-min".
on line 23 of ../mailman-web-data/static/hyperkitty/sass/bootstrap/_custom-variables.scss
from line 4 of ../mailman-web-data/static/hyperkitty/sass/hyperkitty.scss

Can you please try:

 sudo rm -rf /opt/mailman/web/static

Turns out the docker images do not clear the old static files from before the upgrade causing such errors when trying to actually compile the static files.

I also released 0.3.4 (should take a couple of minutes to build and publish the images).

Worked. Thank you!

Was this page helpful?
0 / 5 - 0 ratings