The neighborhood_blog_posts macro, eg on https://sourceforge.net/p/test-wiki/All%20project%20news/ , should ignore blog posts that contain bad markup, or perhaps just provide a link to the post, rather than having the entire macro fail.
File "/var/local/allura/Allura/allura/lib/macro.py", line 112, in neighborhood_blog_posts
for post in posts if security.has_access(post, 'read', project=post.app.project)() and
File "/var/local/allura/Allura/allura/lib/macro.py", line 112, in <genexpr>
for post in posts if security.has_access(post, 'read', project=post.app.project)() and
File "/var/local/env-allura/lib/python2.7/site-packages/Ming-0.3.2dev_20121101-py2.7.egg/ming/utils.py", line 18, in __get__
result = obj.__dict__[self.__name__] = self._func(obj)
File "/var/local/allura/Allura/allura/model/artifact.py", line 189, in app
if getattr(c, 'app', None) and c.app.config._id == self.app_config._id:
AttributeError: 'NoneType' object has no attribute '_id'
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
On master you can repro the error by installing a Blog tool, publishing a post, deleting the config for the blog tool document from mongo, then using the neighborhood_blog_posts macro.
The new code will just skip orphaned posts instead of causing an error.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Problem is tools that no longer exist:
forge:tv/5286
On master you can repro the error by installing a Blog tool, publishing a post, deleting the
config
for the blog tool document from mongo, then using theneighborhood_blog_posts
macro.The new code will just skip orphaned posts instead of causing an error.