-
Notifications
You must be signed in to change notification settings - Fork 290
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
Search returns error "Epoch doesn't fit in a PHP integer" #4598
Comments
I guess you have a "last change timestamp" fact with an invalid date.
Create a PHP script containing the following, upload it to your server, and view it using your browser.
|
MariaDB [webtrees]> select * from wt_dates where d_fact = 'CHAN' order by d_year desc limit 1; MariaDB [webtrees]> select * from wt_dates where d_fact = 'CHAN' order by d_year asc limit 1;
|
Can you look at record
|
I believe you are referring to this: 1 CHAN |
The date line should have the format Can you tell me which software created this GEDCOM file? |
It was Ahnenblatt 3.43 |
I've checked my ged file and all fields CHAN have format like this: 2 DATE (2021-01-26) |
Thanks for all the extra info. The date format is invalid, so webtrees treats it as Hence the error. But not only is the data invalid - it is in a unconventional format. Year-first dates are alwyas yyyy-mm-dd... I'm not sure whether we should attempt to automatically "fix" this invalid data, or simply discard it. Meanwhile, you can fix your system as follows. Control panel -> Family tree -> Data fix -> Search and replace Search for: \n2 DATE ((\d\d\d\d)-01-(\d\d)) Then repeat for |
Thanks a lot! I rather treat it as a migration issue since I'm moving my family tree from other app. |
Invalid data should never cause software to crash. I just need to decide the best way to deal with this. |
Yeah, it should return some user-friendly message that data is invalid instead of stacktrace, definitely. |
you: "This is the first time I have ever seen yyyy-dd-mm." I just installed Ahnenblatt 3 (3.5 not 3.4): I see the usual format of changed date on export to gedcom. |
Oops. My mistake. |
The error in the date format Greg referred to is this:
|
I do not think, that Ahnenblatt does produce this buggy date. My tests with Ahnenblatt did not produce something like that. We should have a view into the original gedcom. |
When I try to use search I get:
Epoch doesn't fit in a PHP integer …/app/Factories/TimestampFactory.php:71
#0 …/app/Factories/TimestampFactory.php(71): DateTime->getTimestamp()
#1 …/app/GedcomRecord.php(714): Fisharebest\Webtrees\Factories\TimestampFactory->fromString()
#2 …/resources/views/lists/individuals-table.phtml(382): Fisharebest\Webtrees\GedcomRecord->lastChangeTimestamp()
#3 …/app/View.php(183): include('...')
#4 …/app/View.php(278): Fisharebest\Webtrees\View->render()
#5 …/app/Helpers/functions.php(145): Fisharebest\Webtrees\View::make()
#6 …/resources/views/search-results.phtml(104): view()
#7 …/app/View.php(183): include('...')
#8 …/app/View.php(278): Fisharebest\Webtrees\View->render()
#9 …/app/Helpers/functions.php(145): Fisharebest\Webtrees\View::make()
#10 …/resources/views/search-general-page.phtml(139): view()
#11 …/app/View.php(183): include('...')
#12 …/app/View.php(278): Fisharebest\Webtrees\View->render()
#13 …/app/Helpers/functions.php(145): Fisharebest\Webtrees\View::make()
#14 …/app/Http/ViewResponseTrait.php(50): view()
#15 …/app/Http/RequestHandlers/SearchGeneralPage.php(219): Fisharebest\Webtrees\Http\RequestHandlers\SearchGeneralPage->viewResponse()
#16 …/app/Http/Middleware/RequestHandler.php(54): Fisharebest\Webtrees\Http\RequestHandlers\SearchGeneralPage->handle()
#17 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\RequestHandler->process()
#18 …/app/Module/HitCountFooterModule.php(154): Middleland\Dispatcher->handle()
#19 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Module\HitCountFooterModule->process()
#20 …/app/Module/CheckForNewVersion.php(115): Middleland\Dispatcher->handle()
#21 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Module\CheckForNewVersion->process()
#22 …/app/Http/Middleware/CheckCsrf.php(80): Middleland\Dispatcher->handle()
#23 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CheckCsrf->process()
#24 …/vendor/oscarotero/middleland/src/Dispatcher.php(118): Middleland\Dispatcher->handle()
#25 …/app/Webtrees.php(275): Middleland\Dispatcher->dispatch()
#26 …/app/Http/Middleware/Router.php(153): Fisharebest\Webtrees\Webtrees::dispatch()
#27 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\Router->process()
#28 …/app/Http/Middleware/BootModules.php(60): Middleland\Dispatcher->handle()
#29 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BootModules->process()
#30 …/app/Http/Middleware/RegisterGedcomTags.php(54): Middleland\Dispatcher->handle()
#31 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\RegisterGedcomTags->process()
#32 …/app/Http/Middleware/LoadRoutes.php(75): Middleland\Dispatcher->handle()
#33 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\LoadRoutes->process()
#34 …/app/Http/Middleware/CheckForNewVersion.php(65): Middleland\Dispatcher->handle()
#35 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CheckForNewVersion->process()
#36 …/app/Http/Middleware/UseTransaction.php(45): Middleland\Dispatcher->handle()
#37 …/vendor/illuminate/database/Concerns/ManagesTransactions.php(29): Fisharebest\Webtrees\Http\Middleware\UseTransaction::Fisharebest\Webtrees\Http\Middleware{closure}()
#38 …/app/Http/Middleware/UseTransaction.php(46): Illuminate\Database\Connection->transaction()
#39 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseTransaction->process()
#40 …/app/Http/Middleware/DoHousekeeping.php(73): Middleland\Dispatcher->handle()
#41 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\DoHousekeeping->process()
#42 …/app/Http/Middleware/UseTheme.php(69): Middleland\Dispatcher->handle()
#43 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseTheme->process()
#44 …/app/Http/Middleware/CheckForMaintenanceMode.php(51): Middleland\Dispatcher->handle()
#45 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CheckForMaintenanceMode->process()
#46 …/app/Http/Middleware/UseLanguage.php(71): Middleland\Dispatcher->handle()
#47 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseLanguage->process()
#48 …/app/Http/Middleware/UseSession.php(78): Middleland\Dispatcher->handle()
#49 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseSession->process()
#50 …/app/Http/Middleware/UpdateDatabaseSchema.php(57): Middleland\Dispatcher->handle()
#51 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UpdateDatabaseSchema->process()
#52 …/app/Http/Middleware/UseDatabase.php(118): Middleland\Dispatcher->handle()
#53 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseDatabase->process()
#54 …/app/Http/Middleware/BadBotBlocker.php(233): Middleland\Dispatcher->handle()
#55 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BadBotBlocker->process()
#56 …/app/Http/Middleware/CompressResponse.php(73): Middleland\Dispatcher->handle()
#57 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CompressResponse->process()
#58 …/app/Http/Middleware/ContentLength.php(40): Middleland\Dispatcher->handle()
#59 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ContentLength->process()
#60 …/vendor/middlewares/client-ip/src/ClientIp.php(65): Middleland\Dispatcher->handle()
#61 …/app/Http/Middleware/ClientIp.php(47): Middlewares\ClientIp->process()
#62 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ClientIp->process()
#63 …/app/Http/Middleware/HandleExceptions.php(90): Middleland\Dispatcher->handle()
#64 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\HandleExceptions->process()
#65 …/app/Http/Middleware/BaseUrl.php(79): Middleland\Dispatcher->handle()
#66 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BaseUrl->process()
#67 …/app/Http/Middleware/ReadConfigIni.php(68): Middleland\Dispatcher->handle()
#68 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ReadConfigIni->process()
#69 …/app/Http/Middleware/SecurityHeaders.php(48): Middleland\Dispatcher->handle()
#70 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\SecurityHeaders->process()
#71 …/app/Http/Middleware/EmitResponse.php(57): Middleland\Dispatcher->handle()
#72 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\EmitResponse->process()
#73 …/vendor/oscarotero/middleland/src/Dispatcher.php(118): Middleland\Dispatcher->handle()
#74 …/app/Webtrees.php(275): Middleland\Dispatcher->dispatch()
#75 …/app/Webtrees.php(262): Fisharebest\Webtrees\Webtrees::dispatch()
#76 …/index.php(51): Fisharebest\Webtrees\Webtrees->httpRequest()
#77 {main}
The text was updated successfully, but these errors were encountered: