Opened 10 years ago

Closed 10 years ago

# BlogShow fails with StopIteration

Reported by: Owned by: James Mills John Hampton highest TracBlogPlugin normal 0.10

### Description

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/formatter.py", line 437, in _
macro_formatter
return macro.process(self.req, args, True)
File "/usr/lib/python2.4/site-packages/trac/wiki/formatter.py", line 112, in p
rocess
text = self.processor(req, text)
File "/usr/lib/python2.4/site-packages/trac/wiki/formatter.py", line 100, in _
macro_processor
return self.macro_provider.render_macro(req, self.name, text)
File "build/bdist.linux-i686/egg/tBlog/web_ui.py", line 178, in render_macro
File "build/bdist.linux-i686/egg/tBlog/web_ui.py", line 267, in _generate_blog

StopIteration


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

### comment:1 Changed 10 years ago by John Hampton

Status: new → 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 10 years ago by Noah Kantrowitz

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 10 years ago by anonymous

the same problem. I think some wiki is broken.

### comment:4 Changed 10 years ago by John Hampton

(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 10 years ago by Alec Thomas

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 10 years ago by John Hampton

Resolution: → fixed assigned → 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.

### Modify Ticket

Action
as closed The owner will remain John Hampton.
The resolution will be deleted. Next status will be 'reopened'.