Closed maekclena closed 5 years ago
According to the help button next to the year input box of the calendar, it supports year ranges with two syntaxes: hyphens and question marks. However, using either throws an error:
Argument 2 passed to Fisharebest\Webtrees\Services\CalendarService::calendarMonthsInYear() must be of the type integer, string given, called in …/app/Http/Controllers/CalendarController.php on line 165 #0 …/app/Http/Controllers/CalendarController.php(165): Fisharebest\Webtrees\Services\CalendarService->calendarMonthsInYear('@#DGREGORIAN@', '201?') #1 [internal function]: Fisharebest\Webtrees\Http\Controllers\CalendarController->page(Object(Fisharebest\Webtrees\Http\Request), Object(Fisharebest\Webtrees\Tree)) #2 …/app/Application.php(45): ReflectionMethod->invoke(Object(Fisharebest\Webtrees\Http\Controllers\CalendarController), Object(Fisharebest\Webtrees\Http\Request), Object(Fisharebest\Webtrees\Tree)) #3 …/app/Http/Middleware/RequestRouter.php(68): Fisharebest\Webtrees\Application->dispatch(Object(Fisharebest\Webtrees\Http\Controllers\CalendarController), 'page') #4 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\RequestRouter->process(Object(Fisharebest\Webtrees\Http\Request), Object(Middleland\Dispatcher)) #5 …/app/Module/HitCountFooterModule.php(141): Middleland\Dispatcher->handle(Object(Fisharebest\Webtrees\Http\Request)) #6 …/app/Http/Middleware/ModuleMiddleware.php(70): Fisharebest\Webtrees\Module\HitCountFooterModule->process(Object(Fisharebest\Webtrees\Http\Request), Object(Middleland\Dispatcher)) #7 …/app/Http/Middleware/ModuleMiddleware.php(75): class@anonymous->handle(Object(Fisharebest\Webtrees\Http\Request)) #8 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ModuleMiddleware->process(Object(Fisharebest\Webtrees\Http\Request), Object(Middleland\Dispatcher)) #9 …/app/Http/Middleware/BootModules.php(58): Middleland\Dispatcher->handle(Object(Fisharebest\Webtrees\Http\Request)) #10 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BootModules->process(Object(Fisharebest\Webtrees\Http\Request), Object(Middleland\Dispatcher)) #11 …/app/Http/Middleware/UseTransaction.php(44): Middleland\Dispatcher->handle(Object(Fisharebest\Webtrees\Http\Request)) #12 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseTransaction->process(Object(Fisharebest\Webtrees\Http\Request), Object(Middleland\Dispatcher)) #13 …/app/Http/Middleware/CheckCsrf.php(63): Middleland\Dispatcher->handle(Object(Fisharebest\Webtrees\Http\Request)) #14 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CheckCsrf->process(Object(Fisharebest\Webtrees\Http\Request), Object(Middleland\Dispatcher)) #15 …/app/Http/Middleware/DoHousekeeping.php(76): Middleland\Dispatcher->handle(Object(Fisharebest\Webtrees\Http\Request)) #16 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\DoHousekeeping->process(Object(Fisharebest\Webtrees\Http\Request), Object(Middleland\Dispatcher)) #17 …/app/Http/Middleware/UseTheme.php(70): Middleland\Dispatcher->handle(Object(Fisharebest\Webtrees\Http\Request)) #18 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseTheme->process(Object(Fisharebest\Webtrees\Http\Request), Object(Middleland\Dispatcher)) #19 …/app/Http/Middleware/CheckForMaintenanceMode.php(49): Middleland\Dispatcher->handle(Object(Fisharebest\Webtrees\Http\Request)) #20 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CheckForMaintenanceMode->process(Object(Fisharebest\Webtrees\Http\Request), Object(Middleland\Dispatcher)) #21 …/app/Http/Middleware/UseLocale.php(51): Middleland\Dispatcher->handle(Object(Fisharebest\Webtrees\Http\Request)) #22 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseLocale->process(Object(Fisharebest\Webtrees\Http\Request), Object(Middleland\Dispatcher)) #23 …/app/Http/Middleware/UseTree.php(59): Middleland\Dispatcher->handle(Object(Fisharebest\Webtrees\Http\Request)) #24 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseTree->process(Object(Fisharebest\Webtrees\Http\Request), Object(Middleland\Dispatcher)) #25 …/app/Http/Middleware/UseSession.php(58): Middleland\Dispatcher->handle(Object(Fisharebest\Webtrees\Http\Request)) #26 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseSession->process(Object(Fisharebest\Webtrees\Http\Request), Object(Middleland\Dispatcher)) #27 …/app/Http/Middleware/UseFilesystem.php(49): Middleland\Dispatcher->handle(Object(Fisharebest\Webtrees\Http\Request)) #28 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseFilesystem->process(Object(Fisharebest\Webtrees\Http\Request), Object(Middleland\Dispatcher)) #29 …/app/Http/Middleware/UseCache.php(44): Middleland\Dispatcher->handle(Object(Fisharebest\Webtrees\Http\Request)) #30 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseCache->process(Object(Fisharebest\Webtrees\Http\Request), Object(Middleland\Dispatcher)) #31 …/app/Http/Middleware/UpdateDatabaseSchema.php(56): Middleland\Dispatcher->handle(Object(Fisharebest\Webtrees\Http\Request)) #32 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UpdateDatabaseSchema->process(Object(Fisharebest\Webtrees\Http\Request), Object(Middleland\Dispatcher)) #33 …/app/Http/Middleware/UseDebugbar.php(64): Middleland\Dispatcher->handle(Object(Fisharebest\Webtrees\Http\Request)) #34 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseDebugbar->process(Object(Fisharebest\Webtrees\Http\Request), Object(Middleland\Dispatcher)) #35 …/app/Http/Middleware/UseDatabase.php(85): Middleland\Dispatcher->handle(Object(Fisharebest\Webtrees\Http\Request)) #36 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseDatabase->process(Object(Fisharebest\Webtrees\Http\Request), Object(Middleland\Dispatcher)) #37 …/app/Http/Middleware/ReadConfigIni.php(62): Middleland\Dispatcher->handle(Object(Fisharebest\Webtrees\Http\Request)) #38 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ReadConfigIni->process(Object(Fisharebest\Webtrees\Http\Request), Object(Middleland\Dispatcher)) #39 …/app/Http/Middleware/HandleExceptions.php(54): Middleland\Dispatcher->handle(Object(Fisharebest\Webtrees\Http\Request)) #40 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\HandleExceptions->process(Object(Fisharebest\Webtrees\Http\Request), Object(Middleland\Dispatcher)) #41 …/app/Http/Middleware/EmitResponse.php(52): Middleland\Dispatcher->handle(Object(Fisharebest\Webtrees\Http\Request)) #42 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\EmitResponse->process(Object(Fisharebest\Webtrees\Http\Request), Object(Middleland\Dispatcher)) #43 …/app/Http/Middleware/PhpEnvironment.php(46): Middleland\Dispatcher->handle(Object(Fisharebest\Webtrees\Http\Request)) #44 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\PhpEnvironment->process(Object(Fisharebest\Webtrees\Http\Request), Object(Middleland\Dispatcher)) #45 …/vendor/oscarotero/middleland/src/Dispatcher.php(118): Middleland\Dispatcher->handle(Object(Fisharebest\Webtrees\Http\Request)) #46 …/index.php(44): Middleland\Dispatcher->dispatch(Object(Fisharebest\Webtrees\Http\Request)) #47 {main}
This feature has never worked properly, e.g. the day/month links depend on leap years and leap months which do not apply to year ranges.
So, I think it is time to remove it.
According to the help button next to the year input box of the calendar, it supports year ranges with two syntaxes: hyphens and question marks. However, using either throws an error: