webtrees-faces icon indicating copy to clipboard operation
webtrees-faces copied to clipboard

Error when opening tab "Faces"

Open hartenthaler opened this issue 3 years ago • 3 comments

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()

hartenthaler avatar Jun 05 '22 18:06 hartenthaler

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

UksusoFF avatar Jun 10 '22 09:06 UksusoFF

Yes, 2.7.1.

hartenthaler avatar Jun 19 '22 11:06 hartenthaler

Can you send database backup to email?

UksusoFF avatar Jul 11 '22 11:07 UksusoFF

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)

hartenthaler avatar Dec 07 '22 00:12 hartenthaler

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.

UksusoFF avatar Dec 07 '22 14:12 UksusoFF

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?

harrywesterman avatar Dec 16 '22 11:12 harrywesterman

@harrywesterman are you on 2.7.2?

UksusoFF avatar Jan 26 '23 12:01 UksusoFF

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

harrywesterman avatar Feb 28 '23 10:02 harrywesterman