Descendant indented tree: local workaround no longer working in 5.2.4, plus total failure in 6.0.1

Please provide your Firefox version and mention if that after you changed the config setting you restarted Firefox before using File open to view the file?

Also confirm that the chart you created contains information by check the file in the json output folder that you can open with a text editor please? Make sure each chart you create gets its own folder as you do not want to overwrite previous reports files etc…

  1. I’m using FF 137.0.2 and at the moment I’m on my Win 10 Pro machine, where Win 10 is patched as far as the Feb updates. The March ones will land in a few days time.

  2. I’ve not touched the config setting since I first made it months ago but FF has been opened, closed, restarted many times. It doesn’t matter if I open the generated report by double clicking it in File Explorer or going the long way round and using File | Open.

  3. The JSON file contains the information I expect.

1 Like

Some things to try:

  • Install Portable Firefox then apply the config setting and attempt to view the chart?

  • Check if any Firefox privacy addon is overriding the config setting?

  • Try Firefox using Troubleshoot Mode?

I’ll pass on those ideas for now as I’ve discovered that if I centre the descendant indented tree on someone a few generations down from my usual home person (who is my earliest known ancestor) then the report works.

While that’s better than nothing, it’s still weird that what used to work (having the report centred on my default home person) no longer works.

I’ll report back again when I’ve experimented further.

Much sooner than I expected, I’ve found the problem!

The descendant indented tree fails if, on the ‘Biography Content’ tab, ‘Include Photo/Images from Gallery’ is ticked.

I can live without images in this report so that’s not fatal for me but, assuming you can recreate this, perhaps this should be added to the wiki as a known issue?

2 Likes

Bumping this to ask again if anyone can confirm that, on Windows, it’s the inclusion / exclusion of images in the indented tree report that breaks / fixes it?

Thanks

On the Mac, it works correctly either way in FF.

Thanks, but that still doesn’t help me figure out if it’s just my two Windows machines (one Win 10, other Win 11) that are misbehaving or if it’s a Windows ‘feature’ that’s available to all.

If the latter, the wiki needs updating to mention this ‘feature’.

I agree it doesn’t work on Windows. The problem seems to be that the file names of the images contain '' in between directories. I edited the indentedtree-DescendantIndentedTree.json and replaced all the '' with ‘/’ and the tree began to work (with the Firefox config setting changed).

Problem was found by using the debug modes in Firefox. I’ll look into the specific addon code a bit later and see what can be done to fix it.

1 Like

It looks like this very specific issue can be fixed by changing the D3Charts/DescendantIndentedTree.py in the gramps plugins directory at line 359 (for gramps60/plugins) which originally looked like:

                        self.json_fp.write('%s"image_ref": "%s",\n' %
                            (self.pad_str(gen_pad+1), str(image_ref)))

with the following code;

                        self.json_fp.write(
                            '%s"image_ref": "%s",\n'
                            % (
                                self.pad_str(gen_pad + 1),
                                image_ref.replace("\\", "\\\\"),
                            )
                        )

the json decoder thinks that the '\' is an escape character, so needs to be used twice to get the the correct single backslash.

2 Likes

@stuck
Can you try this proposed fix. If it works for you, I will create a bug and a fix for it.

It makes sense that it was only on Win since Lin/Mac use the opposite slash in media path.

2 Likes

@GaryGriffin Yes! That works for me!

Big thank you too to @prculley for figuring it out.

I did not take the time to see if there were any other similar problems in the other two reports that are part of the D3 charts. So if you’re going to create a PR, you probably should scan those reports as well.

I checked the other reports and did not see any similar issue. I created the PR and committed/published it.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.