Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.1.0 - silhouette images are not displayed #13

Closed
TheDutchJewel opened this issue Jan 9, 2021 · 14 comments
Closed

1.1.0 - silhouette images are not displayed #13

TheDutchJewel opened this issue Jan 9, 2021 · 14 comments

Comments

@TheDutchJewel
Copy link
Contributor

The silhouette images (webtrees\modules_v4\webtrees-pedigree-chart\resources\images) are not loaded in my browsers (latest versions of Edge and Firefox) on Win10 x64 20H2.

Edge shows a default picture:
image

Firefox shows no picture:
image

Any idea how to fix this?

@magicsunday
Copy link
Owner

Are the images of the individuals loaded correctly?
Did the silhouette images got loaded in the previous version?

Please try the latest version from master branch. I added some error logging to the image loading method. Do you get any errors in the console log?

I do not get any errors in my Firefox and Edge.

@TheDutchJewel
Copy link
Contributor Author

Are the images of the individuals loaded correctly?

Which images? I don't use images.
Or do you mean the silhouette images in the standard pedigree chart and on the individual page?
These are displayed correctly. The only incorrect displayed images are the silhouette images in your nice Pedigree chart.

Did the silhouette images got loaded in the previous version?

I didn't test the initial release, only v1.1.0.
But now also tested in v1.0.0: same problem.

Please try the latest version from master branch.

Done. Same problem.

I added some error logging to the image loading method. Do you get any errors in the console log?

Here's the content of the console log in Edge:

vendor.min.js?v=2.0.11:2 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.

send @ vendor.min.js?v=2.0.11:2
ajax @ vendor.min.js?v=2.0.11:2
T._evalUrl @ vendor.min.js?v=2.0.11:2
Re @ vendor.min.js?v=2.0.11:2
append @ vendor.min.js?v=2.0.11:2
(anonymous) @ vendor.min.js?v=2.0.11:2
U @ vendor.min.js?v=2.0.11:2
html @ vendor.min.js?v=2.0.11:2
(anonymous) @ vendor.min.js?v=2.0.11:2
l @ vendor.min.js?v=2.0.11:2
fireWith @ vendor.min.js?v=2.0.11:2
x @ vendor.min.js?v=2.0.11:2
(anonymous) @ vendor.min.js?v=2.0.11:2
load (async)
send @ vendor.min.js?v=2.0.11:2
ajax @ vendor.min.js?v=2.0.11:2
T.fn.load @ vendor.min.js?v=2.0.11:2
(anonymous) @ webtrees.min.js?v=2.0.11:1
each @ vendor.min.js?v=2.0.11:2
each @ vendor.min.js?v=2.0.11:2
(anonymous) @ webtrees.min.js?v=2.0.11:1
u @ vendor.min.js?v=2.0.11:2
c @ vendor.min.js?v=2.0.11:2
setTimeout (async)
(anonymous) @ vendor.min.js?v=2.0.11:2
l @ vendor.min.js?v=2.0.11:2
fireWith @ vendor.min.js?v=2.0.11:2
fire @ vendor.min.js?v=2.0.11:2
l @ vendor.min.js?v=2.0.11:2
fireWith @ vendor.min.js?v=2.0.11:2
ready @ vendor.min.js?v=2.0.11:2
q @ vendor.min.js?v=2.0.11:2

Here's the content of the console log in Firefox:

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help http://xhr.spec.whatwg.org/

@magicsunday
Copy link
Owner

Strange. Maybe you can give me access to the site so that I can see for myself?

@TheDutchJewel
Copy link
Contributor Author

I sent you an email with the link.

@magicsunday
Copy link
Owner

magicsunday commented Jan 11, 2021

I didn't get any email.

@TheDutchJewel
Copy link
Contributor Author

Oops, I sent it to the wrong Ric...

New mail sent to you.

Anyway, I just installed a fresh webtrees as test, with only your Fan and Pedigree chart modules.

And I found something interesting: photos are displayed correctly, silhouette images are not displayed!

I've added two trees with a dummy info, one with and one without photos.

I tested your Pedigree chart on both trees:
tree with photos:
-> photos are displayed correctly.

tree without photos:
-> silhouette images are not displayed, while they are displayed correctly in the Fan chart.

I hope this will help to solve the problem.

@magicsunday
Copy link
Owner

magicsunday commented Jan 11, 2021

Ok. Seems a problem with the pretty URLs I dont use until now.

There is also a bug in webtrees: fisharebest/webtrees#3665 preventing the display of SVG images.

@magicsunday
Copy link
Owner

I changed the way returning the images from the module. Now its up to webtrees to return the correct mime type for SVG images in order to display them correctly..

@magicsunday magicsunday reopened this Jan 11, 2021
@magicsunday
Copy link
Owner

With latest webtrees master and with latest master from this repo, the error should be fixed.

@06Games
Copy link
Contributor

06Games commented Jan 12, 2021

Even with the last commit, I also encounter this bug. This was not happening with the code of my pull request. You must have changed something that you shouldn't have in the meantime ;)
I will look tomorrow if I can fix that

@06Games
Copy link
Contributor

06Games commented Jan 13, 2021

After investigation, it seems that in my case, it is 8237be7 which caused the problem.
Before this one, I do not encounter any problem.
Hoping that your pull request fixes the problem of loading SVGs from assetUrl but with Webtrees 2.0.10 it doesn't work

@magicsunday
Copy link
Owner

@TheDutchJewel Did it work for you?

@magicsunday
Copy link
Owner

@06Games You have to use latest version from master-branch of webtrees as this contains the fix. fisharebest/webtrees@91694fa

@TheDutchJewel
Copy link
Contributor Author

@magicsunday Yes, the latest version from the master-branch works fine with the latest webtrees master. Thanks for fixing!

And thanks to the fix you mentioned, I can use your Pedigree chart in the stable webtrees version too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants