Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Routing error #42

Closed
ddrury opened this issue Dec 28, 2021 · 4 comments
Closed

Routing error #42

ddrury opened this issue Dec 28, 2021 · 4 comments

Comments

@ddrury
Copy link
Contributor

ddrury commented Dec 28, 2021

Describe the bug
MSN bot is hitting my site with a URL that is causing a routing error with the following error
Fisharebest\Webtrees\Module\PedigreeChartModule …/vendor/aura/router/src/Map.php:152 #0 …/app/Helpers/functions.php(166): Aura\Router\Map->getRoute('Fisharebest\\Web...') #1 …/app/Module/PedigreeChartModule.php(179): route('Fisharebest\\Web...', Array) #2 …/app/Http/RequestHandlers/RedirectPedigreePhp.php(82): Fisharebest\Webtrees\Module\PedigreeChartModule->chartUrl(Object(Fisharebest\Webtrees\Individual), Array) #3 …/app/Http/Middleware/RequestHandler.php(55): Fisharebest\Webtrees\Http\RequestHandlers\RedirectPedigreePhp->handle(Object(Nyholm\Psr7\ServerRequest)) #4 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\RequestHandler->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #5 …/app/Http/Middleware/CheckCsrf.php(75): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #6 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CheckCsrf->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #7 …/vendor/oscarotero/middleland/src/Dispatcher.php(118): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #8 …/app/Webtrees.php(241): Middleland\Dispatcher->dispatch(Object(Nyholm\Psr7\ServerRequest)) #9 …/app/Http/Middleware/Router.php(149): Fisharebest\Webtrees\Webtrees::dispatch(Object(Nyholm\Psr7\ServerRequest), Array) #10 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\Router->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #11 …/app/Http/Middleware/BootModules.php(60): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #12 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BootModules->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #13 …/app/Http/Middleware/LoadRoutes.php(74): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #14 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\LoadRoutes->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #15 …/app/Http/Middleware/UseTransaction.php(45): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #16 …/vendor/illuminate/database/Concerns/ManagesTransactions.php(29): Fisharebest\Webtrees\Http\Middleware\UseTransaction::Fisharebest\Webtrees\Http\Middleware\{closure}(Object(Illuminate\Database\MySqlConnection)) #17 …/app/Http/Middleware/UseTransaction.php(46): Illuminate\Database\Connection->transaction(Object(Closure), 3) #18 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseTransaction->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #19 …/app/Http/Middleware/DoHousekeeping.php(73): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #20 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\DoHousekeeping->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #21 …/app/Http/Middleware/UseTheme.php(69): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #22 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseTheme->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #23 …/app/Http/Middleware/CheckForMaintenanceMode.php(51): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #24 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CheckForMaintenanceMode->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #25 …/app/Http/Middleware/UseLanguage.php(69): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #26 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseLanguage->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #27 …/app/Http/Middleware/UseSession.php(75): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #28 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseSession->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #29 …/app/Http/Middleware/UpdateDatabaseSchema.php(57): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #30 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UpdateDatabaseSchema->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #31 …/app/Http/Middleware/UseDebugbar.php(67): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #32 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseDebugbar->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #33 …/app/Http/Middleware/UseDatabase.php(117): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #34 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseDatabase->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #35 …/app/Http/Middleware/BadBotBlocker.php(291): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #36 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BadBotBlocker->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #37 …/app/Http/Middleware/CompressResponse.php(73): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #38 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CompressResponse->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #39 …/app/Http/Middleware/ContentLength.php(40): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #40 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ContentLength->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #41 …/vendor/middlewares/client-ip/src/ClientIp.php(65): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #42 …/app/Http/Middleware/ClientIp.php(47): Middlewares\ClientIp->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #43 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ClientIp->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #44 …/app/Http/Middleware/HandleExceptions.php(89): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #45 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\HandleExceptions->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #46 …/app/Http/Middleware/BaseUrl.php(77): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #47 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BaseUrl->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #48 …/app/Http/Middleware/ReadConfigIni.php(68): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #49 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ReadConfigIni->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #50 …/app/Http/Middleware/SecurityHeaders.php(48): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #51 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\SecurityHeaders->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #52 …/app/Http/Middleware/EmitResponse.php(57): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #53 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\EmitResponse->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #54 …/vendor/oscarotero/middleland/src/Dispatcher.php(118): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #55 …/app/Webtrees.php(241): Middleland\Dispatcher->dispatch(Object(Nyholm\Psr7\ServerRequest)) #56 …/app/Webtrees.php(228): Fisharebest\Webtrees\Webtrees::dispatch(Object(Nyholm\Psr7\ServerRequest), Array) #57 …/index.php(44): Fisharebest\Webtrees\Webtrees->httpRequest() #58 {main}

To Reproduce
I have pretty urls enabled:
the url form that causes the error is /pedigree.php?rootid=I123&ged=mytree. With the inbuild pedigree chart this url is re-writtem as
/tree/mytree/pedigree-right-4/I123

Expected behavior
Re-route as per inbuilt chart

Desktop (please complete the following information):

  • Browser Any
  • Webtrees version 2.1
  • Version of pedigree chart 1.2.8
@ddrury
Copy link
Contributor Author

ddrury commented Dec 28, 2021

Later.

This is because for custom modules there are no entries in app\Module\RedirectLegacyUrlsModule.php and I suspect it won't be straightforward to over-ride the inbuilt module redirects

@ddrury
Copy link
Contributor Author

ddrury commented Dec 28, 2021

I've raised issue fisharebest/webtrees#4149

@magicsunday
Copy link
Owner

So far there was no version of the chart for Webtrees 1.7.

@ddrury
Copy link
Contributor Author

ddrury commented Dec 28, 2021

As this is a webtrees problem and disabling the Legacy URLs module solves the problem (sort of), I'll close this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants