#48 RSS feed dies with comments

closed
nobody
None
5
2004-04-29
2004-04-05
Robert Kaye
No

The RSS feed feature dies whenever it attempts to
process a change that has a comment filled out.

This is moin moin 1.2 and 1.2.1:

Python Python 2.3.3: /usr/bin/python
Linux grunt 2.4.24 #2 Thu Jan 15 14:08:29 PST 2004 i686
MoinMoin Release 1.2.1 [Revision 1.184]
Mon Apr 5 14:08:32 2004

Discussion

  • Michael P. Soulier

    Logged In: YES
    user_id=470843

    I'm not sure if it's when there's a comment, but mine is
    certainly dying.

    http://opag.ca/wiki/RecentChanges?action=rss_rc

    I'd love a fix for this. I prefer to track wiki changes via
    the rss feed.

     
  • fuji-climb

    fuji-climb - 2004-04-22

    Logged In: YES
    user_id=1014218

    I sent a patch for this to the list, but got no response
    from anyone.
    This patch solved this issue, at least for me.

    --- orig/MoinMoin/wikixml/util.py
    +++ mod/MoinMoin/wikixml/util.py
    @@ -50,6 +50,32 @@
    self.endPrefixMapping(prefix or None)
    saxutils.XMLGenerator.endDocument(self)

    + def startElementNS(self, name, qname, attrs):
    + # this code is a bit modified version of
    python2.3/xml/sax/saxutils.py
    + # i needed this because startElementNS() in saxutils.py
    + # cannot handle attr whose name[0] is None, and
    action/rss_rc.py
    + # set this to None (ex. name = (None, 'link')).
    + if name[0] is None:
    + # if the name was not namespace-scoped, use the
    unqualified part
    + name = name[1]
    + else:
    + # else try to restore the original prefix from
    the namespace
    + name = self._current_context[name[0]] + ":" +
    name[1]
    + self._out.write('<' + name)
    +
    + for pair in self._undeclared_ns_maps:
    + self._out.write(' xmlns:%s="%s"' % pair)
    + self._undeclared_ns_maps = []
    +
    + for (name, value) in attrs.items():
    + if name[0] is None:
    + # if the name was not namespace-scoped, use
    the unqualified part
    + name = name[1]
    + else:
    + name = self._current_context[name[0]] + ":"
    + name[1]
    + self._out.write(' %s=%s' % (name,
    saxutils.quoteattr(value)))
    + self._out.write('>')
    +

    class RssGenerator(XMLGenerator):
    default_xmlns = {

     
  • Michael P. Soulier

    Logged In: YES
    user_id=470843

    This patch just worked beautifully for me. Hopefully someone
    will pay attention and incorporate it!

    Thanks.

     
  • Thomas Waldmann

    Thomas Waldmann - 2004-04-29
    • status: open --> closed
     
  • Thomas Waldmann

    Thomas Waldmann - 2004-04-29

    Logged In: YES
    user_id=100649

    The problematic code will be removed in 1.2.2.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks