fisharebest / webtrees

Online genealogy
https://webtrees.net
GNU General Public License v3.0
491 stars 302 forks source link

Error in Statistics module for others still present #4968

Closed FelixBuehler closed 8 months ago

FelixBuehler commented 8 months ago

As in #4954 stated this should be fixed, but i still get the same error when trying to access the "other" tab. Families work fine now in 2.1.19.

`Undefined property: stdClass::$COUNT(*) …/vendor/illuminate/database/Query/Builder.php:2682

0 …/vendor/illuminate/database/Query/Builder.php(2682): Fisharebest\Webtrees\Webtrees::Fisharebest\Webtrees{closure}(2, 'Undefined prope...', '/var/www/webtre...', 2682)

1 …/vendor/illuminate/database/Query/Builder.php(2644): Illuminate\Database\Query\Builder->pluckFromObjectColumn(Array, 'COUNT(*)', 'source_media_ty...')

2 …/app/Statistics/Repository/MediaRepository.php(252): Illuminate\Database\Query\Builder->pluck('COUNT(*)', 'source_media_ty...')

3 …/app/Statistics.php(806): Fisharebest\Webtrees\Statistics\Repository\MediaRepository->chartMedia(NULL, NULL)

4 …/app/Statistics.php(2861): Fisharebest\Webtrees\Statistics->chartMedia()

5 …/app/Statistics.php(214): Fisharebest\Webtrees\Statistics->getTags('\n<h4 class="bor...')

6 …/resources/views/modules/statistics-chart/other.phtml(16): Fisharebest\Webtrees\Statistics->embedTags('\n<h4 class="bor...')

7 …/app/View.php(183): include('/var/www/webtre...')

8 …/app/View.php(278): Fisharebest\Webtrees\View->render()

9 …/app/Helpers/functions.php(145): Fisharebest\Webtrees\View::make('modules/statist...', Array)

10 …/app/Http/ViewResponseTrait.php(50): view('modules/statist...', Array)

11 …/app/Module/StatisticsChartModule.php(213): Fisharebest\Webtrees\Module\AbstractModule->viewResponse('modules/statist...', Array)

12 …/app/Http/RequestHandlers/ModuleAction.php(85): Fisharebest\Webtrees\Module\StatisticsChartModule->getOtherAction(Object(Nyholm\Psr7\ServerRequest))

13 …/app/Http/Middleware/RequestHandler.php(55): Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction->handle(Object(Nyholm\Psr7\ServerRequest))

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

15 …/app/Module/HitCountFooterModule.php(154): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))

16 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Module\HitCountFooterModule->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))

17 …/app/Module/CheckForNewVersion.php(122): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))

18 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Module\CheckForNewVersion->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))

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

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

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

22 …/app/Webtrees.php(275): Middleland\Dispatcher->dispatch(Object(Nyholm\Psr7\ServerRequest))

23 …/app/Http/Middleware/Router.php(163): Fisharebest\Webtrees\Webtrees::dispatch(Object(Nyholm\Psr7\ServerRequest), Array)

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

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

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

27 …/app/Http/Middleware/RegisterGedcomTags.php(54): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))

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

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

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

31 …/app/Http/Middleware/CheckForNewVersion.php(57): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

57 …/vendor/middlewares/client-ip/src/ClientIp.php(65): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))

58 …/app/Http/Middleware/ClientIp.php(47): Middlewares\ClientIp->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))

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

60 …/app/Http/Middleware/HandleExceptions.php(89): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))

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

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

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

64 …/app/Http/Middleware/ReadConfigIni.php(68): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))

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

66 …/app/Http/Middleware/SecurityHeaders.php(48): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))

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

68 …/app/Http/Middleware/EmitResponse.php(57): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))

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

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

71 …/app/Webtrees.php(275): Middleland\Dispatcher->dispatch(Object(Nyholm\Psr7\ServerRequest))

72 …/app/Webtrees.php(262): Fisharebest\Webtrees\Webtrees::dispatch(Object(Nyholm\Psr7\ServerRequest), Array)

73 …/index.php(51): Fisharebest\Webtrees\Webtrees->httpRequest()

74 {main}`

fisharebest commented 8 months ago

I think this fix should work. I don't have access to Postgres right now. Can you test this?

FelixBuehler commented 8 months ago

Yes, it works. Thank you!