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

Errors "unexpectedly empty!" in webtrees log files #154

Closed
Jefferson49 opened this issue Apr 21, 2023 · 13 comments
Closed

Errors "unexpectedly empty!" in webtrees log files #154

Jefferson49 opened this issue Apr 21, 2023 · 13 comments

Comments

@Jefferson49
Copy link
Contributor

Observed with webtrees 2.1.16 and vesta Shared Places 2.1.16.1.6.

In the webtrees error logs (Control panel / Website logs), I found a lot of errors from vesta shared places with a simular pattern. As a user, I did not recognize any surprising behavior. I also do not know how to reproduce thes errors in the logs. However, I still want to report the issue.

The errors look like this:
<b>unexpectedly empty! …/modules_v4/vesta_shared_places/patchedWebtrees/SharedPlace.php:1522</b> <b>#0 …/modules_v4/vesta_shared_places/patchedWebtrees/Http/RequestHandlers/TomSelectSharedPlace.php(99): Cissee\WebtreesExt\SharedPlace-&gt;primaryPlaceAt(Object(Vesta\Model\GedcomDateInterval), &#039;Sachsen-Anhalt,...&#039;)</b> vesta-webtrees-2-custom-modules/vesta_shared_places#1 [internal function]: Cissee\WebtreesExt\Http\RequestHandlers\TomSelectSharedPlace::Cissee\WebtreesExt\Http\RequestHandlers\{closure}(Object(Cissee\WebtreesExt\SharedPlace), 0) vesta-webtrees-2-custom-modules/vesta_shared_places#2 …/vendor/illuminate/collections/Collection.php(695): array_map(Object(Closure), Array, Array) <b>#3

It seems to be related to the name ofcertain shared places in a string: &#39;Sachsen-Anhalt,...&#39; . Interesting enough, I also found error messages with a modifided &#39;achsen-anhalt, ...&#39;, e,g. Sachsen-Anhalt without starting "S".

The error messages seem to have started on 2023-02-25. However, I am not sure.

I also inlcude a full stack trace as file and some further example error messages.
Stack trace.txt
Error in logs - unexpectedly empty.txt

@Jefferson49
Copy link
Contributor Author

The error can be reproduced with issue vesta-webtrees-2-custom-modules/vesta_common#105.

However, vesta-webtrees-2-custom-modules/vesta_common#105 is probably not the only root cause for the error message, because it is a very specific situation (wrong date range in source) and the error message in the logs occurs very often.

@ric2016
Copy link
Contributor

ric2016 commented Apr 23, 2023

I'll have to investigate this - Maybe shared places where no name is given for the date of the event are not handled properly (in any case the cause seems to be date-related, as seen in vesta-webtrees-2-custom-modules/vesta_common#105).

@ric2016
Copy link
Contributor

ric2016 commented Apr 26, 2023

The related issue is now fixed (in code, no release yet).
I'm a bit skeptical that this fix fully resolves this issue though.

Is there anything special about the shared places in your tree that seem to trigger the error (e.g. 'Sachsen-Anhalt')? Such as a complex structure of names and parents, restricted to specific dates?

@Jefferson49
Copy link
Contributor Author

Is there anything special about the shared places in your tree that seem to trigger the error (e.g. 'Sachsen-Anhalt')? Such as a complex structure of names and parents, restricted to specific dates?

Well, I make al ot of use of the SOUR:DATA:EVEN:DATE structure to describe sources. In a number of cases, the date ranges use the same start and end date, e.g. "DATE FROM 1926 TO 1926" in the following example.

0 @S9931@ SOUR
1 TITL Standesamt Mannheim, Sterberegister 1926 Band 1
1 REPO @R7517@
2 CALN Mannheim, Deutschland, Sterberegister, 1870-1950, Mannheim 1926 Band 1
3 MEDI ELECTRONIC
1 DATA
2 EVEN DEAT
3 DATE FROM 1926 TO 1926
3 PLAC Mannheim, Stadtkreis Mannheim, Baden-Württemberg, DEU
4 _LOC @P9928@

I analyzed the webtrees error logs in more depth and exported all the errors "unexpectedly empty!" related to shared places, see attached CSV file.
webtrees-logs.csv

I also tried to get an overview over the pattern of the "&#039;xxx&#039" strings in the error logs. It seems that these are search strings for shared places. Sometimes, a substring of the shared place name is used. It looks like this is done while still typing the full name. The following screenshots show an overview over all errors in the logs. The related places seem to have no common pattern. While "Sachsen-Anhalt" is linked to more than 700 individuals and has a lot of sub-ordinated places, "Mannheim" is only linked to 2 individuals and is the lowest place in the hierarchie.
Related shared places Part1
Related shared places Part2

@ric2016
Copy link
Contributor

ric2016 commented Apr 27, 2023

Thank you for your help -

It looks like this is done while still typing the full name.

Yes - you'll see a 500 response code in the browser development tools in this case (but otherwise it just appears as if nothing is found, so the error isn't directly visible on the page).

In a number of cases, the date ranges use the same start and end date, e.g. "DATE FROM 1926 TO 1926" in the following example.

This format (same date in FROM and TO) may be handled improperly, I'll have to check that.
Out of curiosity: Is there a specific reason why you use "DATE FROM 1926 TO 1926" and not just "DATE 1926" here?

@Jefferson49
Copy link
Contributor Author

Out of curiosity: Is there a specific reason why you use "DATE FROM 1926 TO 1926" and not just "DATE 1926" here?

In this sub-structure of a source, Gedcom requires to provide a date range:

SOURCE_RECORD:=
n @<XREF:SOUR>@ SOUR {1:1}
+1 DATA {0:1}
+2 EVEN <EVENTS_RECORDED> {0:M} p.50
+3 DATE <DATE_PERIOD> {0:1} p.46

I could use DATE FROM 01 JAN 1926 TO 31 DEC 1926. However, in a lot of cases, this would add information, which I do not know or have no proof of.

@ric2016
Copy link
Contributor

ric2016 commented Apr 27, 2023

In this sub-structure of a source, Gedcom requires to provide a date range:

Oh, I never realized it should be a date period instead of a date value - Probably because webtrees doesn't enforce that. I'll create an issue for this in webtrees.

@ric2016
Copy link
Contributor

ric2016 commented Apr 28, 2023

I cannot seem to reproduce the error after the fix from vesta-webtrees-2-custom-modules/vesta_common#105 . If you apply that fix, do you still get these errors?

@Jefferson49
Copy link
Contributor Author

I can confirm that the bugfix fixes the specific behavior reported in vesta-webtrees-2-custom-modules/vesta_common#105.

Like mentioned above, there might be other root causes for the issue. After applying the bugfix, I did not get any new errors. I will keep watching the error logs, since the errors only occurs occasionally/sometimes and I do not know how to reproduce it.

ric2016 added a commit that referenced this issue Apr 29, 2023
@ric2016
Copy link
Contributor

ric2016 commented Apr 29, 2023

Thanks - if the error shows up again, the extended error message (last commit) should at least give a hint how to reproduce it.

@Jefferson49
Copy link
Contributor Author

O.k, I installed the code from the last commit. If I find a new error message in the logs, I will report it.

@Jefferson49
Copy link
Contributor Author

Since one month, the issue did not show up in the webtrees error logs again. Therefore, I think that the bugfix from vesta-webtrees-2-custom-modules/vesta_common#105 also fixed this issue.

From my point of view, the issue can be closed.

@ric2016
Copy link
Contributor

ric2016 commented May 31, 2023

Thank you for the heads-up!

@ric2016 ric2016 closed this as completed May 31, 2023
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