Can't customize portal_skins/plone_templates/rss_template TTW

Bug #151312 reported by Encolpe Degoute
2
Affects Status Importance Assigned to Milestone
Plone
Fix Released
Unknown
Zope 2
Fix Released
Medium
Andreas Jung

Bug Description

First, it comes from this bug report on Plone:
https://dev.plone.org/plone/ticket/7183

Investigating around this I found a bug in PageTemplate in Zope 2.10:

In PageTemplate/ZopePageTemplate.py, Src class, pt_edit method:

content_type variable is supposed to be like 'app/type' but with XML template like RSS feed content_type is like 'text/xml;charset=xxx'.
'''content_type in ('text/xml',)''' is always False with such a content_type.

In PageTemplate/utils, convertToUnicode function always test content type with '''content_type.startswith('app/type')'''. It seems a good way to fix this bug.

Revision history for this message
Encolpe Degoute (encolpe) wrote :

The real problem is that encoding is not defined in <?xml ?> but set in content_type with 'text/xml; charset=utf-8'

Revision history for this message
Andreas Jung (ajung) wrote :

Do you have commit permissions? If yes, please commit it to the 2.10 branch and trunk.

Revision history for this message
Encolpe Degoute (encolpe) wrote :

I never asked for them.

Andreas Jung (ajung)
Changed in zope2:
assignee: nobody → ajung
importance: Undecided → Medium
status: New → Confirmed
Changed in plone:
status: Unknown → Confirmed
Revision history for this message
Andreas Jung (ajung) wrote :

The patch won't apply properly - neither against the 2.10 branch nor the trunk

ajung@galactica:~/sandboxes/Zope-2.10/Zope/lib/python/Products> patch -p0 <~/PageTemplates.patch
patching file PageTemplates/tests/testZopePageTemplate.py
Hunk #6 succeeded at 126 with fuzz 2.
Hunk #7 succeeded at 197 (offset 18 lines).
Hunk #8 succeeded at 235 (offset 18 lines).
patching file PageTemplates/ZopePageTemplate.py
Hunk #2 FAILED at 126.
Hunk #3 succeeded at 249 (offset -1 lines).
Hunk #4 succeeded at 485 (offset -1 lines).
1 out of 4 hunks FAILED -- saving rejects to file PageTemplates/ZopePageTemplate.py.rej

Revision history for this message
Encolpe Degoute (encolpe) wrote :

Here a new patch version against trunk.
It seems that Hannosh fixed the bug before me.
The patch mainly includes non-regression tests and fix also some indentation problems.

Changed in plone:
status: Confirmed → Fix Released
Changed in zope2:
status: Confirmed → Fix Released
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.