From 9c847462a08649727ca081164d2322bb34145045 Mon Sep 17 00:00:00 2001 From: Tim G L Lyons Date: Sun, 12 May 2013 16:45:06 +0000 Subject: [PATCH] 0006515: Error building narrated web MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Circular references (either direct or indirect) involving media->citation->media or media->citation->source->media cause NarrativeWeb to crash with "maximum recursion depth exceeded". Fix NarrativeWeb when constructing list of objects to be output by checking whether a media object has already been encountered. Also fixes 0006418: Navweb crashes alpha4 0006630: Export Erzählende Webseite 0006643: Crash during making webstek report 0006652: [NarrativeWeb] Circular References lead to endless recursion (crash) 0006654: Unable to created narrated web report svn: r22270 --- gramps/plugins/webreport/narrativeweb.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gramps/plugins/webreport/narrativeweb.py b/gramps/plugins/webreport/narrativeweb.py index e6356aef4..dcdf755da 100644 --- a/gramps/plugins/webreport/narrativeweb.py +++ b/gramps/plugins/webreport/narrativeweb.py @@ -7470,6 +7470,8 @@ class NavWebReport(Report): self._add_media(media_handle, Citation, citation_handle) def _add_media(self, media_handle, bkref_class, bkref_handle): + if self.obj_dict[MediaObject].get(media_handle): + return media = self.database.get_object_from_handle(media_handle) media_name = "Media" if self.inc_gallery: