Closed Jefferson49 closed 1 year ago
Maybe this behavior is related or simular to this topic: SyntaxError: Unexpected token '<', " on add birth location
In my webtrees installation, I have already included the related bugfix from Greg: Bugfix commit d5c0e14
In the past, I also observed the "SyntaxError: Unexpected token '<'" error like described in the forum post. After using Greg's bugfix, I have not observed this error again. However, the JSON text behavior occured also with the bugfix installed.
The webtrees bugfix is likely irrelevant here, Vesta doesn't use that action.
The json output is shown in the modal dialog? From where do you create the shared place when this error occurs? (Note that apparently the confirmation dialog is no longer shown always, only when creating from the shared places list. I don't think this was done intentionally. I'll probably have to fix that first)
The json output is shown in the modal dialog?
I think it was shown directly in the browser window and not in the modal. However, I am not 100% sure.
From where do you create the shared place when this error occurs?
When editing a birth and creating a new shared place for the birth place. "Syracuse" and "Onondaga County" were both new shared places, while "New York, USA" already existed.
I think it was shown directly in the browser window and not in the modal. However, I am not 100% sure.
Browser window would be even more unexplainable - but either way I'm afraid don't really understand how this is at all possible, as the code processes the json even in case of a non-success response code.
If this occurs again, please check the browser development tools for any console errors, and check where the json is displayed.
Is this reproducible after deleting the newly created shared places, and re-creating them, or is there any other way to reproduce the error?
Is this reproducible after deleting the newly created shared places, and re-creating them, or is there any other way to reproduce the error?
I did not want to delete the data of the created shared places. Therefore, I tested with new shared places.
In a first test, I got a weired result: I got logged out from webtrees and also got the "Unexpected token '<', " error at the same time.
The "logged out" issue, is welknown, but the root cause is not understood. It seems that this was just random that it occured in this situation.
The unexpected token issue should be the one I mentioned above. However, it occured although I have already installed the bugfix.
In a second test, everything just went fine without any problems.
It seems to be a very special behavior and occurs only from time to time. If the available data does not provide enough hints, it is not important to dive any deeper.
The error did not show up again. Therefore, I think it was fixed with some of the releases since May 21st.
Observed with webtrees 2.1.16 and vesta 2.1.16.1.5
Sometimes, I get the following response in the browser, after creating a new shared place. The output is shown as text instead of as rendered HTML:
{"value":"@P10552@","text":"Syracuse, Onondaga County, New York, USA","title":"Syracuse, Onondaga County, New York, USA","html":"\n<div class=\"modal-header\">\n <h3 class=\"modal-title\" id=\"wt-ajax-modal-title\">\n Der gemeinsame Ort <span dir=\"auto\">Syracuse<\/span> wurde erstellt. <\/h3>\n <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Schließen\">\n <\/button>\n<\/div>\n\n<div class=\"modal-body\">\n <a href=\"http:\/\/nas-synology220\/webtrees\/index.php?route=%2Fwebtrees%2Ftree%2Fhemprich%2FsharedPlace%2FP10552%2FSyracuse\">\n <span dir=\"auto\">Syracuse<\/span> (Hinweis: Es wurde außerdem ein gemeinsamer Ort auf einer höheren Ebene angelegt) <\/a>\n<\/div>\n\n\n<div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-primary\" data-bs-dismiss=\"modal\">\n <span class=\"wt-icon-cancel\"><i class=\"fa-solid fa-times fa-fw\" aria-hidden=\"true\"><\/i><\/span> Schließen <\/button>\n<\/div>\n"}
Related URL: ../webtrees/index.php?route=%2Fwebtrees%2Ftree%2Fhemprich%2Fcreate-location
I do not know how to reproduce this behavior. It only occurs occationately in rare cases.