Error when subscribing using subscription porltlet
Bug #410238 reported by
Mr. Jolly
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Singing & Dancing |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The issue is with StoneageHTML and the cssutils package that it uses. The latest version cssutils 0.9.6b3 causes the problems. Pinning version cssutils=0.9.6b1 in the buildout fixes this.
Changed in singing-dancing: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
This happens when you have added a style sheet (well, some css lines) in the composer. It can be tested simply by rendering the preview of the news letter. Using cssutils=0.9.6b1 indeed fixes it for me too. But that gives problems with some css lines; for example with this css it fails too:
* {
margin: 0;
padding: 0;
}
Those lines are given to me by the local css guru, so I assume they are fine. :-)
Traceback is then this, apparently because '*' is not recognized by StoneageHTML as a selector:
Traceback (innermost last): PDBDebugMode. pdbzope. runcall, line 60, in pdb_runcall dancing. browser. preview, line 67, in __call__ singing. scheduler, line 109, in render_message dancing. composer, line 230, in render volatile, line 272, in replacement dancing. composer, line 220, in _render stoneagehtml, line 91, in compactify stoneagehtml, line 228, in compactify stoneagehtml, line 271, in distributeCSSDe claration stoneagehtml, line 292, in distributeCSSRule
Module ZPublisher.Publish, line 119, in publish
Module ZPublisher.mapply, line 88, in mapply
Module Products.
Module ZPublisher.Publish, line 42, in call_object
Module collective.
Module collective.
Module collective.
Module plone.memoize.
Module collective.
Module stoneagehtml.
Module stoneagehtml.
Module stoneagehtml.
Module stoneagehtml.
IndexError: list index out of range
Might it be a good idea to use stoneagehtml only when it works and just use the original html otherwise? So something like this:
html = method_ to_render_ original_ html() compactify( html).decode( 'utf-8' ) warn('Exception while compacting html with stoneagehtml; using original instead.')
try:
html = stoneagehtml.
except:
logger.