magicsunday / webtrees-descendants-chart

SVG based descendants chart module for webtrees genealogy application.
GNU General Public License v3.0
26 stars 8 forks source link

Changes in displaying names breaks layout of pedigree and descendants charts #56

Closed HRN65 closed 3 months ago

HRN65 commented 3 months ago

Describe the bug Recently I discovered that pedigree and descendants charts are no longer displayed correctly for some individuals in my family tree. Choosing left or right orientation, all chart-boxes are missing, and only lines are displayed. When choosing up or down orientation, the charts are displayed correctly. After some debugging, I found missing/unknown names (in webtrees displayed as ... ...) among some of the ancestors/descendants to be the reason.

To Reproduce Download gedcom of Charles II of Spain: https://paginas.fe.up.pt/~jlborges/visualgenealogy/charles_II_of_spain.ged

Go to Descendent chart of James I (I722). This displays correctly up to 4 generation an all orientation. Select 5 generations, and the chart will not display in left and right orientation.

The reason for the error seem to be individual I737 in generation 5, which has no name (no 1 MAME) Adding a name to I737, results in correctly displayed descendants chart in all directions for 5 generation. However, if you select 6 generations, a new " bug" appairs in generation because of missing name in I739

Expected behavior Expect names in descendants and pedigree charts to be displayed as in 1 NAME

Screenshots Screenshot of descendants chart 5 generations, right and down orientation

Desktop (please complete the following information):

Additional context VM540:1 Uncaught TypeError: n[1] is not iterable at SVGTextElement. (:1:64736) at Te.data (:1:25441) at $i.addNameElements (:1:65260) at :1:64636 at Te.call (:1:26941) at $i.appendName (:1:64335) at Ri.drawNode (:1:74205) at :1:72529 at Te.call (:1:26941) at Ri.nodeEnter (:1:72515)

dc_down dc_right

Norwegian-Sardines commented 3 months ago

All names displayed in webtrees should come from the NAME tag, if no NAME tag exists then the displayed name should be rendered as unknown!

magicsunday commented 3 months ago

@HRN65, could you please test with the latest version from branch 2.1, if this fixes your issues?

HRN65 commented 3 months ago

Testing with latest version from branch 2.1, both names and layout seems to display correctly. Also tested pedigree and fan chart with same result. Just one small nit: Missing name/unknown renders ... instead of ... .... When hovering over name ... ... is displayed.

Thank you very much Rico!

HRN65 commented 3 months ago

Well, the latest version from branch 2.1 works fine on my local install (wampserver php 8.2.13 / 8.3.0) Testing on my live site running php 8.1.27, I only got a spinning wheel and following console message:

Uncaught DOMException: Failed to execute 'setItem' on 'Storage': Setting the value of 'webtrees-descendants-chart' exceeded the quota. at e.Storage.write (https://visitusinmaputo.com/webtree/module/_webtrees-descendants-chart_/Asset?asset=js%2Fdescendants-chart-storage.min.js&hash=1712089392:1:573) at e.Storage.onInput (https://visitusinmaputo.com/webtree/module/_webtrees-descendants-chart_/Asset?asset=js%2Fdescendants-chart-storage.min.js&hash=1712089392:1:410) at e.Storage.register (https://visitusinmaputo.com/webtree/module/_webtrees-descendants-chart_/Asset?asset=js%2Fdescendants-chart-storage.min.js&hash=1712089392:1:297) at https://visitusinmaputo.com/webtree/tree/familie/webtrees-descendants-chart/I5785:896:9

Pedigree and fanchart with latest fix works fine when testing on live site.

magicsunday commented 3 months ago

Please only make one error per issue, otherwise it quickly becomes confusing. This is now covered in #57.