Opened 8 years ago

Closed 7 years ago

#736 closed defect (fixed)

BlogShow fails with StopIteration

Reported by: JamesMills Owned by: pacopablo
Priority: highest Component: TracBlogPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10


The BlowShow macro fails with:

2006-09-24 00:07:35,661 Trac[formatter] DEBUG: Executing Wiki macro BlogShow by 
provider <tBlog.web_ui.TracBlogPlugin object at 0xb6e4c6cc> 
2006-09-24 00:07:35,664 Trac[formatter] ERROR: Macro BlogShow(blog,news,hidecal=
true,num_posts=4) failed 
Traceback (most recent call last): 
  File "/usr/lib/python2.4/site-packages/trac/wiki/", line 437, in _
    return macro.process(self.req, args, True) 
  File "/usr/lib/python2.4/site-packages/trac/wiki/", line 112, in p
    text = self.processor(req, text) 
  File "/usr/lib/python2.4/site-packages/trac/wiki/", line 100, in _
    return self.macro_provider.render_macro(req,, text) 
  File "build/bdist.linux-i686/egg/tBlog/", line 178, in render_macro 
  File "build/bdist.linux-i686/egg/tBlog/", line 267, in _generate_blog

I believe it's a combination of having
the following plugins installed:

  • Tags
  • TinyMCE

I have the following versions:

  • Trac r3587
  • Tags 0.3.1
  • TinyMCE 0.2 (with patches I've created to work with 0.10dev)
  • Blog 0.2.1

Attachments (0)

Change History (6)

comment:1 Changed 8 years ago by pacopablo

  • Status changed from new to assigned

Are you still experiencing this issue? The line that is indicated as the culprit is:

version, post_time, author, comment, ipnr = page.get_history().next()

However, the only way that that should cause a stop iteration is if the wiki page doesn't exist. And I can't imagine that the tags interface is returning a page that is tagged, yet doesn't exist.

Anyway, if you're still having this issue with 0.10.2 + the blog plugin, let me know. I'll keep the ticket open for a week or so, and then close it as worksforme if I don't hear anything by then.

comment:2 Changed 8 years ago by coderanger

This is possible currently as things like WikiRename and Datamover don't handle tags at all, so you can end up with orphaned entries. I have also seen this error when people were using the TimingAndEstimationPlugin, since it injected a malformed wiki page into the DB.

comment:3 Changed 8 years ago by anonymous

the same problem.
I think some wiki is broken.

comment:4 Changed 8 years ago by pacopablo

(In [1846])

  • Refs #736
  • Added a check when trying to load a WikiPage. This should compensate for empty Wiki pages.
  • Please test and close this bug if it does indeed solve the problem. I currently can't duplicate the issue

comment:5 Changed 8 years ago by athomas

Hmmm. Perhaps this should be treated as a TagsPlugin bug? Ideally it wouldn't return pages that don't exist, though it's a bit of a PITA to check for the existence of each page.

comment:6 Changed 7 years ago by pacopablo

  • Resolution set to fixed
  • Status changed from assigned to closed

I'm going to close this as fixed as I believe my fix works, and while having the TagsPlugin take care of this would probably be ideal, I have a sufficiently easy work-around.

Add Comment

Modify Ticket

as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from pacopablo. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.