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

Compatibility with Django compressor? #5454

Closed
itbabu opened this issue Jun 24, 2016 · 4 comments
Closed

Compatibility with Django compressor? #5454

itbabu opened this issue Jun 24, 2016 · 4 comments

Comments

@itbabu
Copy link
Contributor

itbabu commented Jun 24, 2016

I'm using django-compressor with sekizai:

{% render_block "js" postprocessor "compressor.contrib.sekizai.compress" %}

After this commit 4f2ec23 a script with type text/cms-template was moved inside an addtoblock "js" block.

Django-compressor doesn't know how to handle it and it raises an error.
So when I try to edit a page I get:

Couldn't find any precompiler in COMPRESS_PRECOMPILERS setting for mimetype 'text/cms-template'.

Here the file: cms/templates/cms/toolbar/placeholder.html

Is it possible to move the script outside the addtoblock "js" block and the language block?

@czpython
Copy link
Contributor

@itbabu
Thanks for the report.
@vxsx let's discuss.

@vxsx
Copy link
Contributor

vxsx commented Jun 26, 2016

@czpython separate sekizai block?

vxsx added a commit to vxsx/django-cms that referenced this issue Jun 28, 2016
We use script tag with invalid type to have the template for child
classes available but not rendered. Django compressor doesn't know
how to handle this type and breaks, so moving that template script
out of the sekizai solves the problem.

Ref: django-cms#5454
@vxsx vxsx added this to the 3.3.1 milestone Jun 28, 2016
@vxsx
Copy link
Contributor

vxsx commented Jun 28, 2016

Should be fixed by #5463

vxsx added a commit to vxsx/django-cms that referenced this issue Jun 28, 2016
We use script tag with invalid type to have the template for child
classes available but not rendered. Django compressor doesn't know
how to handle this type and breaks, so moving that template script
out of the sekizai solves the problem.

Ref: django-cms#5454
vxsx added a commit to vxsx/django-cms that referenced this issue Jun 29, 2016
In commit 4f2ec23, a ``<script type="text/cms-template">`` (for
holding client-side content that is not to be rendered until
runtime, and which we will use until the HTML element
``<template>`` is fully supported) was placed inside a Sekizai
block where it would not interfere with page rendering.

Unfortunately, this turned out to be incompatible with Django
Compressor django-cms#5454, which
raises an error on the (deliberately invalid)
``type="text/cms-template"``.

It has been moved out of the Sekizai block to fix this problem. The
render-blocking effects of the script are negligible.
vxsx added a commit to vxsx/django-cms that referenced this issue Jun 29, 2016
In commit 4f2ec23, a ``<script type="text/cms-template">`` (for
holding client-side content that is not to be rendered until
runtime, and which we will use until the HTML element
``<template>`` is fully supported) was placed inside a Sekizai
block where it would not interfere with page rendering.

Unfortunately, this turned out to be incompatible with Django
Compressor django-cms#5454, which
raises an error on the (deliberately invalid)
``type="text/cms-template"``.

It has been moved out of the Sekizai block to fix this problem. The
render-blocking effects of the script are negligible.
vxsx added a commit to vxsx/django-cms that referenced this issue Jun 30, 2016
In commit 4f2ec23, a ``<script type="text/cms-template">`` (for
holding client-side content that is not to be rendered until
runtime, and which we will use until the HTML element
``<template>`` is fully supported) was placed inside a Sekizai
block where it would not interfere with page rendering.

Unfortunately, this turned out to be incompatible with Django
Compressor django-cms#5454, which
raises an error on the (deliberately invalid)
``type="text/cms-template"``.

It has been moved out of the Sekizai block to fix this problem. The
render-blocking effects of the script are negligible.
evildmp pushed a commit to evildmp/django-cms that referenced this issue Jul 2, 2016
In commit 4f2ec23, a ``<script type="text/cms-template">`` (for
holding client-side content that is not to be rendered until
runtime, and which we will use until the HTML element
``<template>`` is fully supported) was placed inside a Sekizai
block where it would not interfere with page rendering.

Unfortunately, this turned out to be incompatible with Django
Compressor django-cms#5454, which
raises an error on the (deliberately invalid)
``type="text/cms-template"``.

It has been moved out of the Sekizai block to fix this problem. The
render-blocking effects of the script are negligible.
evildmp pushed a commit to evildmp/django-cms that referenced this issue Jul 2, 2016
In commit 4f2ec23, a ``<script type="text/cms-template">`` (for
holding client-side content that is not to be rendered until
runtime, and which we will use until the HTML element
``<template>`` is fully supported) was placed inside a Sekizai
block where it would not interfere with page rendering.

Unfortunately, this turned out to be incompatible with Django
Compressor django-cms#5454, which
raises an error on the (deliberately invalid)
``type="text/cms-template"``.

It has been moved out of the Sekizai block to fix this problem. The
render-blocking effects of the script are negligible.
@czpython
Copy link
Contributor

czpython commented Jul 8, 2016

Fixed by #5463

@czpython czpython closed this as completed Jul 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants