hartenthaler / hh_extended_family

webtrees - showing the extended family of an individual (like cousins and uncles, aunts, ...)
GNU General Public License v3.0
23 stars 9 forks source link

2.1.5.0 - Undefined class constant 'VALUE_BIRTH' error when adding 2 PEDI foster #152

Closed TheDutchJewel closed 2 years ago

TheDutchJewel commented 2 years ago

In webtrees 2.0.19 I tried to add a foster relation for an individual bij adding 2 PEDI foster below the 1 FAMC @Fxxx@ line.

But then I get this error message:

Undefined class constant 'VALUE_BIRTH' …\modules_v4\hh_extended_family\src\Factory\Objects\ExtendedFamilySupport.php:248

#0 …\modules_v4\hh_extended_family\src\Factory\Objects\ExtendedFamilySupport.php(224): Hartenthaler\Webtrees\Module\ExtendedFamily\ExtendedFamilySupport::generatePedigreeLabel(Object(Fisharebest\Webtrees\Individual))
#1 …\modules_v4\hh_extended_family\ExtendedFamily.php(167): Hartenthaler\Webtrees\Module\ExtendedFamily\ExtendedFamilySupport::generateChildLabels(Object(Fisharebest\Webtrees\Individual))
#2 …\modules_v4\hh_extended_family\ExtendedFamilyPersonExists.php(71): Hartenthaler\Webtrees\Module\ExtendedFamily\ExtendedFamily->constructProband(Object(Fisharebest\Webtrees\Individual))
#3 …\modules_v4\hh_extended_family\ExtendedFamilyTabModule.php(126): Hartenthaler\Webtrees\Module\ExtendedFamily\ExtendedFamilyPersonExists->__construct(Object(Fisharebest\Webtrees\Individual), Object(stdClass))
#4 …\modules_v4\hh_extended_family\ExtendedFamilyTabModule.php(555): Hartenthaler\Webtrees\Module\ExtendedFamily\ExtendedFamilyTabModule->personExistsInExtendedFamily(Object(Fisharebest\Webtrees\Individual))
#5 …\resources\views\individual-page.phtml(117): Hartenthaler\Webtrees\Module\ExtendedFamily\ExtendedFamilyTabModule->isGrayedOut(Object(Fisharebest\Webtrees\Individual))
#6 …\app\View.php(184): include('D:\\xampp\\htdocs...')
#7 …\app\View.php(281): Fisharebest\Webtrees\View->render()
#8 …\app\Helpers\functions.php(200): Fisharebest\Webtrees\View::make('individual-page', Array)
#9 …\app\Http\ViewResponseTrait.php(51): view('individual-page', Array)
#10 …\app\Http\RequestHandlers\IndividualPage.php(153): Fisharebest\Webtrees\Http\RequestHandlers\IndividualPage->viewResponse('individual-page', Array)
#11 …\app\Http\Middleware\WrapHandler.php(83): Fisharebest\Webtrees\Http\RequestHandlers\IndividualPage->handle(Object(Nyholm\Psr7\ServerRequest))
#12 …\vendor\oscarotero\middleland\src\Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\WrapHandler->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#13 …\app\Module\HitCountFooterModule.php(157): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#14 …\vendor\oscarotero\middleland\src\Dispatcher.php(136): Fisharebest\Webtrees\Module\HitCountFooterModule->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#15 …\app\Http\Middleware\CheckCsrf.php(75): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#16 …\vendor\oscarotero\middleland\src\Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CheckCsrf->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#17 …\vendor\oscarotero\middleland\src\Dispatcher.php(118): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#18 …\app\Http\Middleware\Router.php(166): Middleland\Dispatcher->dispatch(Object(Nyholm\Psr7\ServerRequest))
#19 …\vendor\oscarotero\middleland\src\Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\Router->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#20 …\app\Http\Middleware\BootModules.php(62): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#21 …\vendor\oscarotero\middleland\src\Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BootModules->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#22 …\app\Http\Middleware\LoadRoutes.php(76): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#23 …\vendor\oscarotero\middleland\src\Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\LoadRoutes->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#24 …\app\Http\Middleware\UseTransaction.php(45): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#25 …\vendor\illuminate\database\Concerns\ManagesTransactions.php(29): Fisharebest\Webtrees\Http\Middleware\UseTransaction::Fisharebest\Webtrees\Http\Middleware\{closure}(Object(Illuminate\Database\MySqlConnection))
#26 …\app\Http\Middleware\UseTransaction.php(46): Illuminate\Database\Connection->transaction(Object(Closure), 3)
#27 …\vendor\oscarotero\middleland\src\Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseTransaction->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#28 …\app\Http\Middleware\DoHousekeeping.php(74): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#29 …\vendor\oscarotero\middleland\src\Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\DoHousekeeping->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#30 …\app\Http\Middleware\UseTheme.php(70): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#31 …\vendor\oscarotero\middleland\src\Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseTheme->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#32 …\app\Http\Middleware\CheckForMaintenanceMode.php(51): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#33 …\vendor\oscarotero\middleland\src\Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CheckForMaintenanceMode->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#34 …\app\Http\Middleware\UseLanguage.php(70): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#35 …\vendor\oscarotero\middleland\src\Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseLanguage->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#36 …\app\Http\Middleware\UseSession.php(71): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#37 …\vendor\oscarotero\middleland\src\Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseSession->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#38 …\app\Http\Middleware\UpdateDatabaseSchema.php(58): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#39 …\vendor\oscarotero\middleland\src\Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UpdateDatabaseSchema->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#40 …\app\Http\Middleware\UseDebugbar.php(67): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#41 …\vendor\oscarotero\middleland\src\Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseDebugbar->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#42 …\app\Http\Middleware\UseDatabase.php(117): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#43 …\vendor\oscarotero\middleland\src\Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseDatabase->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#44 …\app\Http\Middleware\BadBotBlocker.php(223): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#45 …\vendor\oscarotero\middleland\src\Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BadBotBlocker->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#46 …\app\Http\Middleware\CompressResponse.php(75): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#47 …\vendor\oscarotero\middleland\src\Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CompressResponse->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#48 …\app\Http\Middleware\ContentLength.php(40): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#49 …\vendor\oscarotero\middleland\src\Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ContentLength->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#50 …\vendor\middlewares\client-ip\src\ClientIp.php(81): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#51 …\app\Http\Middleware\ClientIp.php(47): Middlewares\ClientIp->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#52 …\vendor\oscarotero\middleland\src\Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ClientIp->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#53 …\app\Http\Middleware\HandleExceptions.php(90): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#54 …\vendor\oscarotero\middleland\src\Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\HandleExceptions->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#55 …\app\Http\Middleware\BaseUrl.php(77): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#56 …\vendor\oscarotero\middleland\src\Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BaseUrl->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#57 …\app\Http\Middleware\ReadConfigIni.php(69): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#58 …\vendor\oscarotero\middleland\src\Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ReadConfigIni->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#59 …\app\Http\Middleware\SecurityHeaders.php(48): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#60 …\vendor\oscarotero\middleland\src\Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\SecurityHeaders->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#61 …\app\Http\Middleware\EmitResponse.php(57): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#62 …\vendor\oscarotero\middleland\src\Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\EmitResponse->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#63 …\vendor\oscarotero\middleland\src\Dispatcher.php(118): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#64 …\app\Webtrees.php(241): Middleland\Dispatcher->dispatch(Object(Nyholm\Psr7\ServerRequest))
#65 …\app\Webtrees.php(228): Fisharebest\Webtrees\Webtrees::dispatch(Object(Nyholm\Psr7\ServerRequest), Array)
#66 …\index.php(44): Fisharebest\Webtrees\Webtrees->httpRequest()
#67 {main}

Tested with all other modules disabled, but same problem.

It works fine in webtrees 2.1.5, and also with the previous version of the module (2.1.0.1) in webtrees 2.0.19.

Note: the reason why I still use webtrees 2.0.19 is because later versions are unfortunately unsuitable for a production environment because a missing fix for the too strict markdown implementation in webtrees 2.0.19+, and webtrees 2.1.x still has problems with shared notes.

hartenthaler commented 2 years ago

I'm sorry but 2.1.5.0 is not compatible with webtrees 2.0 (as it is written in the READme). There was a major change in webtrees between 2.0 and 2.1. The needed variable VALUE_BIRTH is only defined in webtrees 2.1.

You should at least upgrade to 2.0.20 because there was a major security issue. I thought that the shared note problems are fixed with 2.1.5. If not you should maybe raise an issue again.

TheDutchJewel commented 2 years ago

The needed variable VALUE_BIRTH is only defined in webtrees 2.1.

Clear.

You should at least upgrade to 2.0.20 because there was a major security issue.

For now, I'll stick with version 2.0.19 because it's the latest 2.0.x version that works for me without any problems.

I thought that the shared note problems are fixed with 2.1.5.

No, issue #4371 is not fixed.

hartenthaler commented 2 years ago

Yes, I just have seen that issue #4371 is not fixed.

2.0.24 was the fix with improved security, but I see that you have to stay at 2.0.19 for the moment.

hartenthaler commented 2 years ago

It should be possible to use the newest version of the extended family module together with 2.0.19 by replacing one function by the code for this function used in the version you are running at the moment: "function generatePedigreeLabel(Individual $child)" in src/Factory/Objects/ExtendedFamilySupport.php (near line 240). No guarantee, but maybe you like to try this.

TheDutchJewel commented 2 years ago

Thank you so much for your support!

I would like to try that, but what should I change there?

hartenthaler commented 2 years ago
TheDutchJewel commented 2 years ago

Thank you again!

Replacing the new function with the old function results in another error message: Class 'Hartenthaler\Webtrees\Module\ExtendedFamily\GedcomCodePedi' not found

But after adding also the following line from the old code to the use section, it works fine: use Fisharebest\Webtrees\GedcomCode\GedcomCodePedi;

hartenthaler commented 2 years ago

Yes, this was necessary, too. Very good that you found it!