Bienvenue, Invité
Nom d'utilisateur : Mot de passe :


This Help forum is for issues relates to the latest release (1.7.10/11/12). For issues related to development versions please use their own Help forum.
Before asking for help please read "How to request help" by clicking on that tab above here."

SUJET : [SOLVED] Media Ajax Eror After Changing Item Title

Media Ajax Eror After Changing Item Title il y a 1 semaine 1 jour #1

  • eh215
  • Portrait de eh215
  • Hors Ligne
  • Junior
  • Messages : 165
In changing the display title for a PDF object, I have created an error which prevents multiple objects from displaying, but since I can no longer view them, I'm having issues fixing it.


Yesterday I successfully uploaded and added 4 PDF objects to the Death event for this individual. The PDFs were uploaded to the server as part of the Add Media option, and I can see them in the raw Gedcom:
1 DEAT
...
2 OBJE @M825@
2 OBJE @M826@
2 OBJE @M827@
2 OBJE @M828@

The generic PDF thumbnail was displayed when viewing the individual, and clicking on one would display one of the PDFs.

I then went in via Lists -> Media Objects to correct the display title of one item because all 4 are similarly named.

After clicking <Save>, the individual media items disappeared, and I received an Ajax Error... which no longer pops up after I cleared cache + restarted.

Now, Lists -> Media Objects, when I search for them, they are found but do not display

In Firefox, I do see this error on the console, not sure if it is relevant:

11:30:11.298      Array.forEach is deprecated; use Array.prototype.forEach instead           template.js.php:9:303
11:30:11.303      Array.slice is deprecated; use Array.prototype.slice instead           template.js.php:13:197
11:30:11.542      Array.filter is deprecated; use Array.prototype.filter instead           template.js.php:83:98


I also note that if I search that media folder with no filter it finds 33 objects but displays 24

Eric
webtrees 1.7.14 at behunt.net/ft
PHP 7.2.19, MySQL 5.6.41-84.1
L'administrateur a désactivé l'accès en écriture pour le public.

Media Ajax Eror After Changing Item Title il y a 1 semaine 1 jour #2

  • fisharebest
  • Portrait de fisharebest
  • Hors Ligne
  • Administrator
  • Messages : 11221
> Array.forEach is deprecated; use Array.prototype.forEach instead template.js.php:9:303

Deprecation messages should not cause any problems. I don't think this is connected.

> Now, Lists -> Media Objects, when I search for them, they are found but do not display

Any messages in the webtrees error log?

Any other information that might help me to reproduce this or understand the 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
L'administrateur a désactivé l'accès en écriture pour le public.

Media Ajax Eror After Changing Item Title il y a 1 semaine 1 jour #3

  • eh215
  • Portrait de eh215
  • Hors Ligne
  • Junior
  • Messages : 165
Here are the 2 I am seeing :
/home1/behuntne/public_html/ft/app/Media.php:112 Call to a member function getNote() on null
#0 /app/Media.php:601 Error("Call to a member function getNote() on null")
#1/medialist.php:266 displayImage()
/home1/behuntne/public_html/ft/app/Media.php:112 Call to a member function getNote() on null
#0 /app/Media.php:601 Error("Call to a member function getNote() on null")
#1 /app/Functions/FunctionsPrintFacts.php:692 displayImage()
#2 /app/Functions/FunctionsPrintFacts.php:488 printMediaLinks('1 DEAT 2 NOTE Died Nov 27, 18…', 2)
#3 /app/Module/IndividualFactsTabModule.php:158 printFact([Fact 4089aa7d49245f8dd4a19a4a8b32466b@I152], [Individual I152@1])
#4 /app/Controller/IndividualController.php:123 getTabContent()
#5 /individual.php:42 ajaxRequest()

And here is a link to a copy of the log
webtrees 1.7.14 at behunt.net/ft
PHP 7.2.19, MySQL 5.6.41-84.1
Dernière édition: il y a 1 semaine 1 jour par eh215.
L'administrateur a désactivé l'accès en écriture pour le public.

Media Ajax Eror After Changing Item Title il y a 1 semaine 23 heures #4

  • fisharebest
  • Portrait de fisharebest
  • Hors Ligne
  • Administrator
  • Messages : 11221
> /home1/behuntne/public_html/ft/app/Media.php:112 Call to a member function getNote() on null

This error message indicates that you have a link from the media object to a note object - and that the note object does not exist.

Can you check the GEDCOM data for the individual, the media object, and the note.

Also, is this a media object in webtrees, or a link to a remote URL?
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
L'administrateur a désactivé l'accès en écriture pour le public.

Media Ajax Eror After Changing Item Title il y a 1 semaine 23 heures #5

  • eh215
  • Portrait de eh215
  • Hors Ligne
  • Junior
  • Messages : 165
These are all media objects located within webtrees, not external.

FIXED -

One item had a faulty link to a Shared Note.

I found + fixed it by going into Media Viewer for another unrelated item, and then one-by-one pasting each of the new M#### IDs into the URL On one of them I got a message that webtrees had deleted an invalid link to a Note. From that point everything worked, all items are now visible.

Thanks

Eric
webtrees 1.7.14 at behunt.net/ft
PHP 7.2.19, MySQL 5.6.41-84.1
L'administrateur a désactivé l'accès en écriture pour le public.

[SOLVED] Media Ajax Eror After Changing Item Title il y a 1 semaine 23 heures #6

  • eh215
  • Portrait de eh215
  • Hors Ligne
  • Junior
  • Messages : 165
Problem solved.
webtrees 1.7.14 at behunt.net/ft
PHP 7.2.19, MySQL 5.6.41-84.1
L'administrateur a désactivé l'accès en écriture pour le public.

Media Ajax Eror After Changing Item Title il y a 1 semaine 23 heures #7

  • fisharebest
  • Portrait de fisharebest
  • Hors Ligne
  • Administrator
  • Messages : 11221
I managed to recreate the problem by editing the database.

(It was not possible to create it using webtrees).

I have created a fix: github.com/fisharebest/webtrees/commit/4...dd60c4648247f6377804
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
L'administrateur a désactivé l'accès en écriture pour le public.

Media Ajax Eror After Changing Item Title il y a 1 semaine 8 heures #8

  • eh215
  • Portrait de eh215
  • Hors Ligne
  • Junior
  • Messages : 165
I believe I created the bad reference to a Note by typing an incorrect name into a "Shared Note" field and then saving
webtrees 1.7.14 at behunt.net/ft
PHP 7.2.19, MySQL 5.6.41-84.1
L'administrateur a désactivé l'accès en écriture pour le public.
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 :
Propulsé par Kunena