Unable to manually compress js and css

Bug #1574082 reported by Marcin Zbik
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
horizon (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Unable to compress js and css after cleaning /usr/share/openstack-dashboard/static (needed to do this when changing default path from /horizon to /) on Mitaka and Ubuntu 16.04

Steps to reproduce:
1. Install openstack-dashboard
2. clean /usr/share/openstack-dashboard/static directory
3. Do /usr/share/openstack-dashboard/manage.py collectstatic
     It will collect 1285 static files
4. Then try to compress and it will fail:

# /usr/share/openstack-dashboard/manage.py compress
Found 'compress' tags in:
        /usr/share/openstack-dashboard/openstack_dashboard/templates/horizon/_conf.html
        /usr/share/openstack-dashboard/openstack_dashboard/templates/_stylesheets.html
        /usr/share/openstack-dashboard/openstack_dashboard/templates/horizon/_scripts.html
Compressing... CommandError: An error occurred during rendering /usr/share/openstack-dashboard/openstack_dashboard/templates/_stylesheets.html: Couldn't find anything to import: /dashboard/scss/horizon.scss
Extensions: <NamespaceAdapterExtension>, <DjangoExtension>, <CompassExtension>
Search path:

on line 1 of u'string:0c838b58954113a8:\n // My Themes\n@import "/themes/default/variables";\n\n// Horizon\n@import "/dashboard/scss/horizon.'

Even disabling ubuntu theme does not help.

openstack-dashboard: Version: 2:9.0.0-0ubuntu2
python-django-horizon: Version: 2:9.0.0-0ubuntu2

# lsb_release -rd
Description: Ubuntu 16.04 LTS
Release: 16.04

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in horizon (Ubuntu):
status: New → Confirmed
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Hello Marcin, What version of python-django-compressor do you have installed?

Revision history for this message
Marcin Zbik (zbikmarc+launchpad) wrote :

Hello Corey,
I think its latest one from repository: 2.0-1ubuntu1 (this version is installed)

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Are you deleting all of the contents from /usr/share/openstack-dashboard/static/ prior to collecting/compressing static assets?

If so, I don't think this is something that you should be doing, since part of the package install copies the contents of openstack_dashboard/ to /usr/share/openstack-dashboard.

If you're deleting all of the contents of the static directory, then you'll still be missing files even if you re-collect/re-compress static assets. In particular the app and dashboard directories. For reference, here is upstream's 9.0.0 static contents:
https://github.com/openstack/horizon/tree/master/openstack_dashboard/static

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Hello Marcin, Hopefully you've made some progress to work around this. I've gone ahead and marked this bug as invalid based on my prior comment.

Changed in horizon (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Marcin Zbik (zbikmarc+launchpad) wrote :

Hi Corey,
I dropped that as lower priority than other my task, its why I did not respond.

Answering your question, yes Im deleting content of that directory, because it was working with Liberty. It does not without ;)

I will reinwestigate it later and in case of futher problems will reopen this bug.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.