gramps-project / gramps-web-api

A RESTful web API for Gramps - backend of Gramps Web
https://www.grampsweb.org
GNU Affero General Public License v3.0
81 stars 43 forks source link

Relationship chart fails if "public" person have "private" parents/families #524

Open ant20879g opened 3 months ago

ant20879g commented 3 months ago

Gramps 5.2.2 Gramps Web API 2.3.1 Gramps Web Frontend 24.6.0 Gramps QL 0.3.0 locale: en multi-tree: false task queue: true

Error happens in UI

13d5169a.js:10989 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'father_handle') at 13d5169a.js:10989:1248 at new jI (13d5169a.js:10989:1948) at PI (13d5169a.js:10989:5671) at RM.renderChart (13d5169a.js:11006:9) at RM.render (13d5169a.js:11005:201) at RM.update (13d5169a.js:2:14988) at RM.performUpdate (13d5169a.js:2:6055) at RM.scheduleUpdate (13d5169a.js:2:5702) at RM._$EC (13d5169a.js:2:5610)

Observation:

Call GET /api/people/?rules=%7B%22function%22%3A%22or%22%2C%22rules%22%3A%5B%7B%22name%22%3A%22DegreesOfSeparation%22%2C%22values%22%3A%5B%22I0006%22%2C2%5D%7D%5D%7D&locale=en&profile=self&extend=event_ref_list,primary_parent_family,family_list returns null in extended.primary_parent_family for person of interest. For person without parent family similar GET call returns [] (empty array) and relationship chart is rendered without issue.

DavidMStraub commented 3 months ago

Did you check in the logs whether this is actually the same error as #523?

ant20879g commented 3 months ago

Nope, I do not see anything similar to #523. I, however, see different message:

grampsweb-1  | ERROR:root:Error parsing list of recent DBs from file /root/.gramps/recent-files-gramps.xml: no element found: line 1, column 0.
grampsweb-1  | This might indicate a damage to your files.
grampsweb-1  | If you're sure there is no problem with other files, delete it, and restart Gramps.

File of question (recent-files-gramps.xml) looks kosher to me:

<?xml version="1.0" encoding="utf-8"?>
<RecentFiles>
  <RecentItem>
    <Path><![CDATA[/root/.gramps/grampsdb/e7a6f0ad-6bf0-4ed3-8f67-25cd43b35048]]></Path>
    <Name><![CDATA[Gramps Web]]></Name>
    <Timestamp>1721428998</Timestamp>
  </RecentItem>
</RecentFiles>
DavidMStraub commented 3 months ago

That's unrelated, you can ignore that error.