Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] bootstrap issue after pulling latest image #382

Closed
belzebubek opened this issue Jun 25, 2020 · 12 comments · Fixed by #384
Closed

[BUG] bootstrap issue after pulling latest image #382

belzebubek opened this issue Jun 25, 2020 · 12 comments · Fixed by #384
Labels

Comments

@belzebubek
Copy link

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?)

@belzebubek belzebubek added the bug label Jun 25, 2020
@issue-label-bot
Copy link

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

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

@danil-smirnov
Copy link
Contributor

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...

@belzebubek
Copy link
Author

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.

@danil-smirnov
Copy link
Contributor

@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.

@belzebubek
Copy link
Author

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

@Ristridin
Copy link

@danil-smirnov worked for me - thanks :)

@belzebubek
Copy link
Author

For me it is not working - internal server error.

Traceback:

File "/usr/lib/python3.6/site-packages/compressor/base.py" in precompile
282. mod = import_module(mod_name)

File "/usr/lib/python3.6/importlib/init.py" in import_module
126. return _bootstrap._gcd_import(name[level:], package, level)

File "" in _gcd_import
994.

File "" in _find_and_load
971.

File "" in _find_and_load_unlocked
953.

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
34. response = get_response(request)

File "/usr/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
145. response = self.process_exception_by_middleware(e, request)

File "/usr/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
143. response = response.render()

File "/usr/lib/python3.6/site-packages/django/template/response.py" in render
106. self.content = self.rendered_content

File "/usr/lib/python3.6/site-packages/django/template/response.py" in rendered_content
83. content = template.render(context, self._request)

File "/usr/lib/python3.6/site-packages/django/template/backends/django.py" in render
61. return self.template.render(context)

File "/usr/lib/python3.6/site-packages/django/template/base.py" in render
171. return self._render(context)

File "/usr/lib/python3.6/site-packages/django/template/base.py" in _render
163. return self.nodelist.render(context)

File "/usr/lib/python3.6/site-packages/django/template/base.py" in render
937. bit = node.render_annotated(context)

File "/usr/lib/python3.6/site-packages/django/template/base.py" in render_annotated
904. return self.render(context)

File "/usr/lib/python3.6/site-packages/django/template/loader_tags.py" in render
150. return compiled_parent._render(context)

File "/usr/lib/python3.6/site-packages/django/template/base.py" in _render
163. return self.nodelist.render(context)

File "/usr/lib/python3.6/site-packages/django/template/base.py" in render
937. bit = node.render_annotated(context)

File "/usr/lib/python3.6/site-packages/django/template/base.py" in render_annotated
904. return self.render(context)

File "/usr/lib/python3.6/site-packages/django/template/loader_tags.py" in render
150. return compiled_parent._render(context)

File "/usr/lib/python3.6/site-packages/django/template/base.py" in _render
163. return self.nodelist.render(context)

File "/usr/lib/python3.6/site-packages/django/template/base.py" in render
937. bit = node.render_annotated(context)

File "/usr/lib/python3.6/site-packages/django/template/base.py" in render_annotated
904. return self.render(context)

File "/usr/lib/python3.6/site-packages/compressor/templatetags/compress.py" in render
143. 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
119. rendered_output = compressor.output(mode, forced=forced, basename=file_basename)

File "/usr/lib/python3.6/site-packages/compressor/css.py" in output
46. ret.append(subnode.output(*args, **kwargs))

File "/usr/lib/python3.6/site-packages/compressor/css.py" in output
48. return super(CssCompressor, self).output(*args, **kwargs)

File "/usr/lib/python3.6/site-packages/compressor/base.py" in output
314. output = '\n'.join(self.filter_input(forced))

File "/usr/lib/python3.6/site-packages/compressor/base.py" in filter_input
254. for hunk in self.hunks(forced):

File "/usr/lib/python3.6/site-packages/compressor/base.py" in hunks
228. precompiled, value = self.precompile(value, **options)

File "/usr/lib/python3.6/site-packages/compressor/base.py" in precompile
287. return True, filter.input(**kwargs)

File "/usr/lib/python3.6/site-packages/compressor/filters/base.py" in input
239. return super(CachedCompilerFilter, self).input(**kwargs)

File "/usr/lib/python3.6/site-packages/compressor/filters/base.py" in input
206. 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

@danil-smirnov
Copy link
Contributor

@belzebubek No ideas then :(

This has been discussed here with no luck either:

https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/Z327W5N4LB7BNNZW6UO7I2VIY3XYBAJC/

@belzebubek
Copy link
Author

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

@maxking
Copy link
Owner

maxking commented Jun 26, 2020

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.

@maxking
Copy link
Owner

maxking commented Jun 26, 2020

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

@belzebubek
Copy link
Author

Worked. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants