` tag and remove only the
attributes "background-image: initial; background-attachment: initial;
background-origin: initial; background-clip: initial;"
from the `
` still doesn't work (so these are not the reason):
>>> obj.responsibilities = '
\n\n
\n- Unterhalt und Reinigung der Büros, Versammlungsräume, Pausenräume, Flure, Sanitären Anlagen.
\n
\n
\n
'
>>> obj.save()
>>> obj.clear_cache()
>>> pprint(ses.run(obj.do_print)) #doctest: +NORMALIZE_WHITESPACE
Traceback (most recent call last):
...
AttributeError: 'NoneType' object has no attribute 'getDocumentIndexes'
The `color: blue !important;` part also is not the culprit:
>>> obj.responsibilities = '
\n\n
\n- Unterhalt und Reinigung der Büros, Versammlungsräume, Pausenräume, Flure, Sanitären Anlagen.
\n
\n
\n
'
>>> obj.save()
>>> obj.clear_cache()
>>> pprint(ses.run(obj.do_print)) #doctest: +NORMALIZE_WHITESPACE
Traceback (most recent call last):
...
AttributeError: 'NoneType' object has no attribute 'getDocumentIndexes'
Tilt! *Inverting the ordering* of `
` and `` tags
finally does make it work:
>>> obj.responsibilities = '
\n
\n\n- Unterhalt und Reinigung der Büros, Versammlungsräume, Pausenräume, Flure, Sanitären Anlagen.
\n
\n\n
'
>>> obj.save()
>>> obj.clear_cache()
>>> pprint(ses.run(obj.do_print)) #doctest: +NORMALIZE_WHITESPACE
{'message': u'Dokument Art.60\xa77-Konvention#1 (Charlotte Collard) wurde generiert.',
'open_url': u'/media/cache/appypdf/jobs.Contract-1.pdf',
'refresh': True,
'success': True}
So this is the reason. Let's simplify the HTML and formulate our statement:
appy_pod has a problem with the following chunk:
>>> obj.responsibilities = '
Some text
'
>>> obj.save()
>>> obj.clear_cache()
>>> pprint(ses.run(obj.do_print)) #doctest: +NORMALIZE_WHITESPACE
Traceback (most recent call last):
...
AttributeError: 'NoneType' object has no attribute 'getDocumentIndexes'
Test cases like this one should not modify the demo database because
the test suite runner doesn't reinisitialize the database for each case.
So we restore the original value (which was an empty string):
>>> obj.responsibilities = ''
>>> obj.save()
Wrote another page for Gaëtan to reproduce all this without Lino
installed:
.. toctree::
:maxdepth: 2
0821/bug
As explained there, I then understood that
a `
` inside a `` is simply invalid XHTML,
so instead of filing a bug for Gaëtan
I fixed it and added a test case in my own code:
:mod:`lino.utils.html2xhtml`.
(So what?
I worked more than 3 hours to understand and fix a little bug:
is that cool? No, *that*'s not cool, but *Lino* is cool:
all this would have taken many days without the possibility
of reproducing the original problem in a simple blog entry!)