tillsc / GVExport

Repository for GVExport module for Webtrees
GNU General Public License v2.0
3 stars 2 forks source link

`null` Exception #1

Closed tillsc closed 3 years ago

tillsc commented 3 years ago

From https://www.webtrees.net/index.php/en/forum/4-customising/35801-display-complex-all-in-on-tree-with-gvexport#85569

Trying to access array offset on value of type null …/modules_v4/GVExport/functions_dot.php:741

0 …/modules_v4/GVExport/functions_dot.php(741): Fisharebest\Webtrees\Webtrees::Fisharebest\Webtrees{closure}()

1 …/modules_v4/GVExport/functions_dot.php(238): vendor\WebtreesModules\gvexport\Dot->printFamily()

2 …/modules_v4/GVExport/functions_dot.php(184): vendor\WebtreesModules\gvexport\Dot->createDOTDump()

3 …/modules_v4/GVExport/module.php(470): vendor\WebtreesModules\gvexport\Dot->getDOTDump()

4 …/modules_v4/GVExport/module.php(275): vendor\WebtreesModules\gvexport\GVExport->createGraphVizDump()

5 …/modules_v4/GVExport/module.php(206): vendor\WebtreesModules\gvexport\GVExport->saveDOTFile()

6 …/app/Http/RequestHandlers/ModuleAction.php(88): vendor\WebtreesModules\gvexport\GVExport->postChartAction()

7 …/app/Http/Middleware/WrapHandler.php(83): Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction->handle()

Gunnar-GO commented 3 years ago

Got the samy beginning error:

`Trying to access array offset on value of type null …/modules_v4/GVExport/functions_dot.php:741

0 …/modules_v4/GVExport/functions_dot.php(741): Fisharebest\Webtrees\Webtrees::Fisharebest\Webtrees{closure}(8, 'Trying to acces...', '/data/web/1/000...', 741, Array)

1 …/modules_v4/GVExport/functions_dot.php(238): vendor\WebtreesModules\gvexport\Dot->printFamily('F3')

2 …/modules_v4/GVExport/functions_dot.php(184): vendor\WebtreesModules\gvexport\Dot->createDOTDump()

3 …/modules_v4/GVExport/module.php(470): vendor\WebtreesModules\gvexport\Dot->getDOTDump()

4 …/modules_v4/GVExport/module.php(275): vendor\WebtreesModules\gvexport\GVExport->createGraphVizDump(Object(Fisharebest\Webtrees\Tree), Object(Cissee\WebtreesExt\IndividualExt), '/tmp/c4ca4238a0...', true)

5 …/modules_v4/GVExport/module.php(206): vendor\WebtreesModules\gvexport\GVExport->saveDOTFile(Object(Fisharebest\Webtrees\Tree), Object(Cissee\WebtreesExt\IndividualExt), true)

6 …/app/Http/RequestHandlers/ModuleAction.php(88): vendor\WebtreesModules\gvexport\GVExport->postChartAction(Object(Nyholm\Psr7\ServerRequest))

7 …/app/Http/Middleware/WrapHandler.php(83): Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction->handle(Object(Nyholm\Psr7\ServerRequest))

8 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\WrapHandler->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))

9 …/modules_v4/vesta_classic_look_and_feel/ClassicLAFModule.php(174): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))

10 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Cissee\Webtrees\Module\ClassicLAF\ClassicLAFModule->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))

11 …/app/Http/Middleware/CheckCsrf.php(75): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))

12 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CheckCsrf->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))

13 …/vendor/oscarotero/middleland/src/Dispatcher.php(118): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))

14 …/app/Http/Middleware/Router.php(166): Middleland\Dispatcher->dispatch(Object(Nyholm\Psr7\ServerRequest))

15 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\Router->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))

16 …/app/Http/Middleware/BootModules.php(62): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))

17 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BootModules->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))

18 …/app/Http/Middleware/LoadRoutes.php(76): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))

19 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\LoadRoutes->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))

20 …/app/Http/Middleware/UseTransaction.php(45): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))

21 …/vendor/illuminate/database/Concerns/ManagesTransactions.php(29): Fisharebest\Webtrees\Http\Middleware\UseTransaction::Fisharebest\Webtrees\Http\Middleware{closure}(Object(Illuminate\Database\MySqlConnection))

22 …/app/Http/Middleware/UseTransaction.php(46): Illuminate\Database\Connection->transaction(Object(Closure), 3)

23 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseTransaction->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))

24 …/app/Http/Middleware/DoHousekeeping.php(74): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))

25 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\DoHousekeeping->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))

26 …/app/Http/Middleware/UseTheme.php(70): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))

27 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseTheme->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))

28 …/app/Http/Middleware/CheckForMaintenanceMode.php(51): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))

29 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CheckForMaintenanceMode->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))

30 …/app/Http/Middleware/UseLanguage.php(70): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))

31 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseLanguage->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))

32 …/app/Http/Middleware/UseSession.php(71): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))

33 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseSession->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))

34 …/app/Http/Middleware/UpdateDatabaseSchema.php(58): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))

35 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UpdateDatabaseSchema->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))

36 …/app/Http/Middleware/UseDebugbar.php(67): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))

37 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseDebugbar->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))

38 …/app/Http/Middleware/UseDatabase.php(117): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))

39 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseDatabase->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))

40 …/app/Http/Middleware/BadBotBlocker.php(222): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))

41 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BadBotBlocker->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))

42 …/app/Http/Middleware/CompressResponse.php(75): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))`

schuco commented 3 years ago

Torven posted in the webtrees forum he got it working:
To get it working I commented out lines 741, 742, 743 in the file functions_dot.php
The lines now look like this: // $func="datelocalisation{$lang_short_cut[$LANGUAGE]}"; // if (!function_exists($func)) // $func="DefaultDateLocalisation";

My understanding of PHP is fairly poor so don't ask me what I've changed.
You can test it here if you like: zeffertt.uk/webtrees/
Cheers, Torven

tillsc commented 3 years ago

Was unused code from previous maintainers... So commenting this out was actually a very good solution :)

I removed it to fix the problem permanently