vesta-webtrees-2-custom-modules / vesta_shared_places

⚶ Vesta Shared Places (Webtrees 2 Custom Module)

Home Page:https://cissee.de/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JSON data error in Data fixes for ⚶ Vesta Shared Places

Manja-S opened this issue · comments

commented

When I try to run the data fixes:

  • Enhance existing shared places with tree-independent data (I clicked Update all, after searching)
  • Add missing XREFs (I clicked Update all, after searching)
  • Create missing shared places from tree-independent data, and add missing XREFs (I clicked Update all, after searching)
  • Create all missing shared places, and add missing XREFs (I clicked Update all, after searching)

I get this message:
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

Concerns: Control panel => Manage family trees => Data fixes => ⚶ Vesta Shared Places

I cannot reproduce this. Can you check your browser development tools, Network tab, for failing requests and post the respective (non-json) response data here?

commented

Is this what you are looking for?

POST
https://webtrees.schledorn.nl/tree/Schledorn/data-fix
[HTTP/2 302 Found 195ms]
GET
https://webtrees.schledorn.nl/tree/Schledorn/data-fix/_vesta_shared_places_
[HTTP/2 200 OK 368ms]
GET
https://webtrees.schledorn.nl/public/css/vendor.min.css?v=2.1.17
[HTTP/2 304 Not Modified 9ms]
GET
https://webtrees.schledorn.nl/public/css/administration.min.css?v=2.1.17
[HTTP/2 304 Not Modified 10ms]
GET
https://webtrees.schledorn.nl/public/js/vendor.min.js?v=2.1.17
[HTTP/2 304 Not Modified 8ms]
GET
https://webtrees.schledorn.nl/public/js/webtrees.min.js?v=2.1.17
[HTTP/2 304 Not Modified 8ms]
GET
https://webtrees.schledorn.nl/public/favicon.ico?v=2.1.17
[HTTP/2 200 OK 0ms]
XHRPOST
https://webtrees.schledorn.nl/tree/Schledorn/data-fix/_vesta_shared_places_/update-all?mode=enhance&data-fix-table_length=10
[HTTP/2 501 Not Implemented 10ms]

I copied the 'request headers', 'answer headers' and the 'answer' for the last block as well (I hope these are the correct translations for 'Aanvraagheaders', 'Antwoordheaders' and 'Antwoord' in Dutch):

POST /tree/Schledorn/data-fix/_vesta_shared_places_/update-all?mode=enhance&data-fix-table_length=10 HTTP/2
Host: webtrees.schledorn.nl
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0
Accept: */*
Accept-Language: nl,en;q=0.8,en-US;q=0.5,de-DE;q=0.3
Accept-Encoding: gzip, deflate, br
Referer: https://webtrees.schledorn.nl/tree/Schledorn/data-fix/_vesta_shared_places_
x-csrf-token: hi5H5jJzQDzWeMhgyvuXym0IUHYqlnI3
x-requested-with: XMLHttpRequest
Content-Type: text/plain;charset=UTF-8
Content-Length: 0
Origin: https://webtrees.schledorn.nl
Connection: keep-alive
Cookie: __Secure-WT-ID=setncm9rp9cnc2372j8396rgfc
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
Sec-GPC: 1
TE: trailers
HTTP/2 501 Not Implemented
server: nginx
date: Wed, 19 Jul 2023 14:47:59 GMT
content-type: text/html; charset=iso-8859-1
content-length: 248
allow: TRACE
X-Firefox-Spdy: h2
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>501 Not Implemented</title>
</head><body>
<h1>Not Implemented</h1>
<p>POST to /tree/Schledorn/data-fix/_vesta_shared_places_/update-all not supported.<br />
</p>
</body></html>

The browser I used is Firefox. I just tried to do the same in Chrome, where I got this error message:
SyntaxError: Unexpected token '<', "

The response data was basically the same:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>501 Not Implemented</title>
</head><body>
<h1>Not Implemented</h1>
<p>POST to /tree/Schledorn/data-fix/_vesta_shared_places_/update-all not supported.<br />
</p>
</body></html>

Yes, the "501 not implemented" is the problem here, and it seems it's not coming from webtrees, but directly from your webserver (nginx). You have some kind of configuration/ security module that apparently prevents these kinds of POST, or maybe the request hits a timeout which isn't reported properly.

In any case it isn't actually a Vesta-specific issue.

commented

So I think I'd have to contact my hosting provider. Thank you for helping me to identify the problem, so I know how to tell them about it.