PeWu / topola-webtrees

Webtrees addon that displays the Topola Genealogy Viewer
GNU General Public License v3.0
25 stars 6 forks source link

Replace deprecated Function that breaks plugin in 2.1.0 #15

Open Samurai336 opened 2 years ago

Samurai336 commented 2 years ago

https://github.com/PeWu/topola-webtrees/blob/7b5badc54516478c8a922669b1e7df75d25ffc08/src/Module.php#L237

This function was marked for deprecation in the main project two years ago.

It looks like it should be replaced with the export function in the GedcomExportService class in app/Services/GedcomExportService.php of webtrees.

I have not done any php nor am I super familiar with the webtrees code base so I'm not sure entirely sure how to test this fix myself, or I would of tried it first.

below is the stack trace that I used to come to the above conclusion.

<b>Class &#039;Fisharebest\Webtrees\Functions\FunctionsExport&#039; not found …/modules_v4/topola/src/Module.php:237</b> #0 …/app/Http/RequestHandlers/ModuleAction.php(85): LilaElephant\Webtrees\Topola\Module-&gt;getGedcomAction() #1 …/app/Http/Middleware/RequestHandler.php(54): Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction-&gt;handle() #2 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\RequestHandler-&gt;process() #3 …/app/Module/HitCountFooterModule.php(154): Middleland\Dispatcher-&gt;handle() #4 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Module\HitCountFooterModule-&gt;process() #5 …/app/Http/Middleware/CheckCsrf.php(76): Middleland\Dispatcher-&gt;handle() #6 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CheckCsrf-&gt;process() #7 …/vendor/oscarotero/middleland/src/Dispatcher.php(118): Middleland\Dispatcher-&gt;handle() #8 …/app/Webtrees.php(265): Middleland\Dispatcher-&gt;dispatch() #9 …/app/Http/Middleware/Router.php(153): Fisharebest\Webtrees\Webtrees::dispatch() #10 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\Router-&gt;process() #11 …/app/Http/Middleware/BootModules.php(60): Middleland\Dispatcher-&gt;handle() #12 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BootModules-&gt;process() #13 …/app/Http/Middleware/RegisterGedcomTags.php(54): Middleland\Dispatcher-&gt;handle() #14 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\RegisterGedcomTags-&gt;process() #15 …/app/Http/Middleware/LoadRoutes.php(75): Middleland\Dispatcher-&gt;handle() #16 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\LoadRoutes-&gt;process() #17 …/app/Http/Middleware/UseTransaction.php(45): Middleland\Dispatcher-&gt;handle() #18 …/vendor/illuminate/database/Concerns/ManagesTransactions.php(29): Fisharebest\Webtrees\Http\Middleware\UseTransaction::Fisharebest\Webtrees\Http\Middleware\{closure}() #19 …/app/Http/Middleware/UseTransaction.php(46): Illuminate\Database\Connection-&gt;transaction() #20 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseTransaction-&gt;process() #21 …/app/Http/Middleware/DoHousekeeping.php(73): Middleland\Dispatcher-&gt;handle() #22 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\DoHousekeeping-&gt;process() #23 …/app/Http/Middleware/UseTheme.php(69): Middleland\Dispatcher-&gt;handle() #24 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseTheme-&gt;process() #25 …/app/Http/Middleware/CheckForMaintenanceMode.php(51): Middleland\Dispatcher-&gt;handle() #26 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CheckForMaintenanceMode-&gt;process() #27 …/app/Http/Middleware/UseLanguage.php(71): Middleland\Dispatcher-&gt;handle() #28 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseLanguage-&gt;process() #29 …/app/Http/Middleware/UseSession.php(78): Middleland\Dispatcher-&gt;handle() #30 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseSession-&gt;process() #31 …/app/Http/Middleware/UpdateDatabaseSchema.php(57): Middleland\Dispatcher-&gt;handle() #32 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UpdateDatabaseSchema-&gt;process() #33 …/app/Http/Middleware/UseDatabase.php(118): Middleland\Dispatcher-&gt;handle() #34 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseDatabase-&gt;process() #35 …/app/Http/Middleware/BadBotBlocker.php(233): Middleland\Dispatcher-&gt;handle() #36 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BadBotBlocker-&gt;process() #37 …/app/Http/Middleware/CompressResponse.php(73): Middleland\Dispatcher-&gt;handle() #38 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CompressResponse-&gt;process() #39 …/app/Http/Middleware/ContentLength.php(40): Middleland\Dispatcher-&gt;handle() #40 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ContentLength-&gt;process() #41 …/vendor/middlewares/client-ip/src/ClientIp.php(65): Middleland\Dispatcher-&gt;handle() #42 …/app/Http/Middleware/ClientIp.php(47): Middlewares\ClientIp-&gt;process() #43 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ClientIp-&gt;process() #44 …/app/Http/Middleware/HandleExceptions.php(90): Middleland\Dispatcher-&gt;handle() #45 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\HandleExceptions-&gt;process() #46 …/app/Http/Middleware/BaseUrl.php(78): Middleland\Dispatcher-&gt;handle() #47 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BaseUrl-&gt;process() #48 …/app/Http/Middleware/ReadConfigIni.php(68): Middleland\Dispatcher-&gt;handle() #49 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ReadConfigIni-&gt;process() #50 …/app/Http/Middleware/SecurityHeaders.php(48): Middleland\Dispatcher-&gt;handle() #51 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\SecurityHeaders-&gt;process() #52 …/app/Http/Middleware/EmitResponse.php(57): Middleland\Dispatcher-&gt;handle() #53 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\EmitResponse-&gt;process() #54 …/vendor/oscarotero/middleland/src/Dispatcher.php(118): Middleland\Dispatcher-&gt;handle() #55 …/app/Webtrees.php(265): Middleland\Dispatcher-&gt;dispatch() #56 …/app/Webtrees.php(252): Fisharebest\Webtrees\Webtrees::dispatch() #57 …/index.php(51): Fisharebest\Webtrees\Webtrees-&gt;httpRequest() #58 {main}

tasker25 commented 2 years ago

I can't help with a solution, but would like to add a plea for this to be fixed as I don't want to have to revert to Webtrees 2.0.

arsaboo commented 2 years ago

+1 for a possible fix

Princeofthebow commented 2 years ago

I would like to plea as well as this would be really good so not to have to revert to Webtrees 2.0. I'm an engineer but have no familiarity with php unfortunately...

wp4711 commented 2 years ago

would also like to use plugin in wt 2.1

tasker25 commented 1 year ago

Latest version working in Webtrees 2.16. Issue can be closed.