UksusoFF / webtrees-faces

webtrees module for mark people on photos
https://www.webtrees.net/index.php/en/forum/2-open-discussion/30219-how-to-mark-individuals-on-group-photo
37 stars 8 forks source link

Error when opening tab "Faces" #58

Closed hartenthaler closed 1 year ago

hartenthaler commented 2 years ago

at webtrees 2.1.5 and the latest version of this module there is an error:

Call to a member function mediaFiles() on null …/modules_v4/faces/resources/views/tab.phtml:4
#0 …/app/View.php(183): include()
#1 …/app/View.php(278): Fisharebest\Webtrees\View->render()
#2 …/app/Helpers/functions.php(145): Fisharebest\Webtrees\View::make()
#3 …/modules_v4/faces/src/Modules/FacesModule.php(217): view()
#4 …/app/Module/ModuleTabTrait.php(144): UksusoFF\WebtreesModules\Faces\Modules\FacesModule->getTabContent()
#5 …/app/Http/RequestHandlers/ModuleAction.php(85): UksusoFF\WebtreesModules\Faces\Modules\FacesModule->getTabAction()
#6 …/app/Http/Middleware/RequestHandler.php(54): Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction->handle()
#7 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\RequestHandler->process()
UksusoFF commented 2 years ago

Tested on 2.1.5 without error. Are you on v2.7.1?

hartenthaler commented 2 years ago

Yes, 2.7.1.

UksusoFF commented 2 years ago

Can you send database backup to email?

hartenthaler commented 1 year ago

Sorry, sending a backup was not possible because of security reasons.

I think that this issue is related to #23 because the reason for this error was, that in the database table wt_media_faces there was a record with a link to a media object (in column f_m_id), that did not exist anymore. For all persons which are referenced in this record, the faces tab could not be used anymore.

I suggest, that your module checks if the media object and the media files are still available. Otherwise, the record in this database table should be deleted.

(this was tested with webtrees 2.1.12 and version 2.7.2 of this module)

UksusoFF commented 1 year ago

Nope, #23 is webtrees core changed issue.

I suggest, that your module checks if the media object and the media files are still available. Otherwise, the record in this database table should be deleted.

It's can be founded in admin panel: /admin/faces-admin/config

image

You can try find it or remove if media missed.

harrywesterman commented 1 year ago

I have the same error, faces is not working anymore. I am on the newest webtrees version.

In the website log: Call to undefined method Fisharebest\Webtrees\Fact::getMedia() …/modules_v4/faces/src/Http/Controllers/DataController.php:236 #0 [internal function]: UksusoFF\WebtreesModules\Faces\Http\Controllers\DataController->UksusoFF\WebtreesModules\Faces\Http\Controllers{closure}

In the faces control panel I see the pictures. Do you need any help to fix this? Logging, or something else that I can do?

UksusoFF commented 1 year ago

@harrywesterman are you on 2.7.2?

harrywesterman commented 1 year ago

I just upgraded to 2.7.2, and it is fixed. Excuse me for reacting so late. Thx for your excellent software!!