It fails to render any article giving the following error message:
There was an error while attempting to render your book.
I have tried it in a few other wiktionaries and it seems to work there.
see it for yourself.
It fails to render any article giving the following error message:
There was an error while attempting to render your book.
I have tried it in a few other wiktionaries and it seems to work there.
see it for yourself.
Hey I'd like to work on this issue.
I reproduced the bug.
Where can I find the code for Wiktionary ?
@Harjotsingh: See https://www.mediawiki.org/wiki/Offline_content_generator (and its discussion page for any related questions)
I went through the code and I think figured out how to build the post data Extension:Collection makes to OCG:
krenair@mw1017:~$ curl -vvv -X POST -H "Content-Type: application/json" -d '{"metabook":"{\"type\":\"collection\",\"licenses\":[{\"type\":\"license\",\"name\":\"License\",\"mw_rights_icon\":\"\/\/creativecommons.org\/images\/public\/somerights20.png\",\"mw_rights_page\":null,\"mw_rights_url\":\"\/\/creativecommons.org\/licenses\/by-sa\/3.0\/\",\"mw_rights_text\":\"Creative Commons Attribution-Share Alike 3.0\"}],\"items\":[{\"type\":\"article\",\"content_type\":\"text\/x-wiki\",\"title\":\"Wiktionary:Main Page\",\"revision\":\"41337545\",\"timestamp\":\"1477874635\"}],\"wikis\":[{\"type\":\"wikiconf\",\"baseurl\":\"https:\/\/en.wiktionary.org\/w\",\"script_extension\":\".php\",\"format\":\"nuwiki\",\"restbase1\":\"http:\/\/10.2.2.17:7231\/en.wiktionary.org\/v1\/\"}]}","base_url":"https:\/\/en.wiktionary.org\/w","script_extension":".php","language":"en","writer":"rdf2latex","command":"render"}' 'http://ocg.svc.eqiad.wmnet:8000' * Rebuilt URL to: http://ocg.svc.eqiad.wmnet:8000/ * Hostname was NOT found in DNS cache * Trying 10.2.2.31... * Connected to ocg.svc.eqiad.wmnet (10.2.2.31) port 8000 (#0) > POST / HTTP/1.1 > User-Agent: curl/7.38.0 > Host: ocg.svc.eqiad.wmnet:8000 > Accept: */* > Content-Type: application/json > Content-Length: 829 > * upload completely sent off: 829 out of 829 bytes < HTTP/1.1 500 {"request":{"id":"1479082253585-40180"},"error":{"message":"Unexpected server error"}} < Date: Mon, 14 Nov 2016 00:10:53 GMT < Connection: keep-alive < Transfer-Encoding: chunked < * Connection #0 to host ocg.svc.eqiad.wmnet left intact
Hm, no, I think that's just Unexpected error, killing thread: Error: Unsupported content type: application/json in the log
Okay so I sent the JSON I posted above through json_decode then wfArrayToCgi:
krenair@mw1017:~$ curl -vvv -X POST -d 'metabook=%7B%22type%22%3A%22collection%22%2C%22licenses%22%3A%5B%7B%22type%22%3A%22license%22%2C%22name%22%3A%22License%22%2C%22mw_rights_icon%22%3A%22%2F%2Fcreativecommons.org%2Fimages%2Fpublic%2Fsomerights20.png%22%2C%22mw_rights_page%22%3Anull%2C%22mw_rights_url%22%3A%22%2F%2Fcreativecommons.org%2Flicenses%2Fby-sa%2F3.0%2F%22%2C%22mw_rights_text%22%3A%22Creative+Commons+Attribution-Share+Alike+3.0%22%7D%5D%2C%22items%22%3A%5B%7B%22type%22%3A%22article%22%2C%22content_type%22%3A%22text%2Fx-wiki%22%2C%22title%22%3A%22Wiktionary%3AMain+Page%22%2C%22revision%22%3A%2241337545%22%2C%22timestamp%22%3A%221477874635%22%7D%5D%2C%22wikis%22%3A%5B%7B%22type%22%3A%22wikiconf%22%2C%22baseurl%22%3A%22https%3A%2F%2Fen.wiktionary.org%2Fw%22%2C%22script_extension%22%3A%22.php%22%2C%22format%22%3A%22nuwiki%22%2C%22restbase1%22%3A%22http%3A%2F%2F10.2.2.17%3A7231%2Fen.wiktionary.org%2Fv1%2F%22%7D%5D%7D&base_url=https%3A%2F%2Fen.wiktionary.org%2Fw&script_extension=.php&language=en&writer=rdf2latex&command=render' 'http://ocg.svc.eqiad.wmnet:8000' * Rebuilt URL to: http://ocg.svc.eqiad.wmnet:8000/ * Hostname was NOT found in DNS cache * Trying 10.2.2.31... * Connected to ocg.svc.eqiad.wmnet (10.2.2.31) port 8000 (#0) > POST / HTTP/1.1 > User-Agent: curl/7.38.0 > Host: ocg.svc.eqiad.wmnet:8000 > Accept: */* > Content-Length: 1008 > Content-Type: application/x-www-form-urlencoded > * upload completely sent off: 1008 out of 1008 bytes * HTTP 1.0, assume close after body < HTTP/1.1 Administrative blacklist. {"channel":"frontend.error","request":{"id":"1479083736755-87489"},"error":{"message":503}} < Date: Mon, 14 Nov 2016 00:35:36 GMT * HTTP/1.0 connection set to keep alive! < Connection: keep-alive < Transfer-Encoding: chunked < * Connection #0 to host ocg.svc.eqiad.wmnet left intact
This is what MW receives too.
Change 314058 had a related patch set uploaded (by C. Scott Ananian):
Revert "Add en.wiktionary.org to blacklist temporarily to prevent DoS."
Change 314058 merged by Arlolra:
Revert "Add en.wiktionary.org to blacklist temporarily to prevent DoS."