Bienvenue, Invité
Nom d'utilisateur : Mot de passe :
Before asking for help please read "How to request help" by clicking on that tab above here.
  • Page :
  • 1

SUJET :

Media thumbnails not always displayed il y a 4 semaines 1 jour #1

Since upgrading to 2.0.3, I've see that when the filename for a media file contains a special character, such as an ampersand, the media thumbnail is sometimes not displayed. The filename displayed contains the html encoding for the ampersand, and so the file is not found. For example, for a file named "John & Mary Smith tombstone.jpg", sometimes the filename is displayed as "John &-a-m-p-; Mary Smith tombstone.jpg", (without the dashes), and of course, that file is not found, so no thumbnail is displayed. Sometimes, but not always, refreshing the page fixes the problem.

I really don't want to have to rename all the media files that include an ampersand. Any suggestion?

Thanks,
KateS

Connexion ou Créer un compte pour participer à la conversation.

Dernière édition: par KateS.

Media thumbnails not always displayed il y a 4 semaines 1 jour #2

  • fisharebest
  • Portrait de fisharebest
  • Hors Ligne
  • Administrator
  • Administrator
  • Messages : 13196
> I really don't want to have to rename all the media files that include an ampersand.

You should be able to use any character that is permitted by the operating system.

There are lots of places in webtrees where we display thumbnails.

Can you tell me exactly which one has this problem?
Greg Roach - Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser. - fisharebest.webtrees.net

Connexion ou Créer un compte pour participer à la conversation.

Media thumbnails not always displayed il y a 4 semaines 1 jour #3

  • fisharebest
  • Portrait de fisharebest
  • Hors Ligne
  • Administrator
  • Administrator
  • Messages : 13196
Also, can you just confirm for me that you data doesn't actually contain &-a-m-p-;

Visit the page for the media object. Click the edit button and select "Edit raw GEDCOM".
Look for a line containing the filename: "1 FILE ......jpeg"
Greg Roach - Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser. - fisharebest.webtrees.net

Connexion ou Créer un compte pour participer à la conversation.

Media thumbnails not always displayed il y a 4 semaines 1 jour #4

Most often I've seen it on the Events page of an individual, for a media object attached to a Burial record.

I Listed all the Media Objects filtered for an ampersand, and most of the first results were fine, but farther down the page there were more missing thumbs than displayed ones.

Connexion ou Créer un compte pour participer à la conversation.

Media thumbnails not always displayed il y a 4 semaines 1 jour #5

  • fisharebest
  • Portrait de fisharebest
  • Hors Ligne
  • Administrator
  • Administrator
  • Messages : 13196
I just created a media file with ampersands in the name, linked it to an individual event, and the thumbnail is created OK.

Is there a URL where I can see this happening on your site?
Greg Roach - Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser. - fisharebest.webtrees.net

Connexion ou Créer un compte pour participer à la conversation.

Media thumbnails not always displayed il y a 4 semaines 1 jour #6

The thumb displayed properly on the page for the media, and the "1 File " record lists the name properly, with only a simple ampersand. The file name is correct on the server file system, and recorded properly in the database.

Connexion ou Créer un compte pour participer à la conversation.

Media thumbnails not always displayed il y a 4 semaines 1 jour #7

  • fisharebest
  • Portrait de fisharebest
  • Hors Ligne
  • Administrator
  • Administrator
  • Messages : 13196
There are many reasons why a thumbnail could not be displayed.

> the media thumbnail is sometimes not displayed

Sometimes?

Perhaps the issue is not the character, but something else?

> Sometimes, but not always, refreshing the page fixes the problem.

Perhaps it is caused by a lack of server resources?

Did you see webtrees.net/faq/thumbnails/
Greg Roach - Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser. - fisharebest.webtrees.net

Connexion ou Créer un compte pour participer à la conversation.

Media thumbnails not always displayed il y a 4 semaines 1 jour #8

It's not always reproducible. The more I test this, the more I'm convinced it is a performance issue, as sometimes other thumbs aren't being displayed on pages where there is a lot to present. Yes I had read the FAQ. Would changing to ImageMagick have an effect at display time? Or only when creating the thumbnails?

Connexion ou Créer un compte pour participer à la conversation.

Avez-vous besoin d'une solution d'hébergement web pour votre site webtrees ?
Si vous préférez un hébergeur spécialisé de webtrees, la page suivante en liste quelques-uns capables de vous offrir ce type de service :

Media thumbnails not always displayed il y a 4 semaines 1 jour #9

  • fisharebest
  • Portrait de fisharebest
  • Hors Ligne
  • Administrator
  • Administrator
  • Messages : 13196
Thumbnails are only created once. They are stored in a folder data/thumbnail-cache

If you can install ImageMagick, then you should.
Greg Roach - Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser. - fisharebest.webtrees.net

Connexion ou Créer un compte pour participer à la conversation.

Media thumbnails not always displayed il y a 3 semaines 20 heures #10

You were correct that the special character in the filename has nothing to do with whether a thumbnail displays. Often, when opening the Families tab of an individual, only some of the thumbnails are displayed. Refreshing the page results in a different number of thumbnails displaying, seemingly at random. You can try it at: silverloom.com/FamilyAlbum/webtrees/inde...demote#tab-relatives

Tracing the browser network traffic shows status code: Error 500, Internal server error.
The server error log only shows: "SoftException in Application.cpp:630: Could not execute script." for ".../webtrees/index.php"
Not much to go on.

Other notes of possible interest:
Both GD and ImageMagick are enabled on the server.
Max_user_connections for SQL is set to 25 (and not modifiable)

I see there are others having problems with thumbnails not displaying, and it may be that calling php to load them is too resource intensive for some hosting configurations. If they could be loaded through simple HTML references, they could be cached in the browser, and significantly improve performance.

Connexion ou Créer un compte pour participer à la conversation.

Media thumbnails not always displayed il y a 3 semaines 19 heures #11

You were correct that the special character in the filename has nothing to do with whether a thumbnail displays. Often, when opening the Families tab of an individual, only some of the thumbnails are displayed. Refreshing the page results in a different number of thumbnails displaying, seemingly at random. You can try it at: silverloom.com/FamilyAlbum/webtrees/inde...demote#tab-relatives

Tracing the browser network traffic shows status code: Error 500, Internal server error.
The server error log only shows: "SoftException in Application.cpp:630: Could not execute script." for ".../webtrees/index.php"
Not much to go on.

Other notes of possible interest:
Both GD and ImageMagick are enabled on the server.
Max_user_connections for SQL is set to 25 (and not modifiable)

I see there are others having problems with thumbnails not displaying, and it may be that calling php to load them is too resource intensive for some hosting configurations. If they could be loaded through simple HTML references, they could be cached in the browser, and significantly improve performance.

Connexion ou Créer un compte pour participer à la conversation.

Media thumbnails not always displayed il y a 3 semaines 15 heures #12

  • fisharebest
  • Portrait de fisharebest
  • Hors Ligne
  • Administrator
  • Administrator
  • Messages : 13196
> If they could be loaded through simple HTML references, they could be cached in the browser, and significantly improve performance.

We need to provide privacy/access controls for media files.

So requests must go through webtrees.

But this script is very "light". It checks access, reads the file from disk, and sends it with the response.

It also adds "cache headers", so that the browser will cache it.




However, I just learned that there is a PHP.INI configuration option (session.cache_limiter) which will automatically add headers to prevent caching...

So, webtrees creates caching headers - and on some sites, PHP removes them!
I can fix this...
Greg Roach - Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser. - fisharebest.webtrees.net

Connexion ou Créer un compte pour participer à la conversation.

Dernière édition: par fisharebest.

Media thumbnails not always displayed il y a 3 semaines 14 heures #13

  • fisharebest
  • Portrait de fisharebest
  • Hors Ligne
  • Administrator
  • Administrator
  • Messages : 13196
> I can fix this...

That seems to work nicely. I'll do some more testing tomorrow.
Greg Roach - Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser. - fisharebest.webtrees.net

Connexion ou Créer un compte pour participer à la conversation.

Media thumbnails not always displayed il y a 1 semaine 3 jours #14

Fixed in 2.0.6! Great job! Thank you!

Connexion ou Créer un compte pour participer à la conversation.

  • Page :
  • 1
Propulsé par Kunena