16 Dec 2009 16:10
Re: XML parsing error?
Roan Kattouw <roan.kattouw <at> gmail.com>
2009-12-16 15:10:28 GMT
2009-12-16 15:10:28 GMT
2009/12/16 Prunka, Sean <PRUNKAS <at> battelle.org>: > Hey all, I hope someone can point me in the right direction: > > I'm fairly sure this is caused by an extension we've written, but I don't know where to look. > > We are using MW 1.13.2 and are not able to upgrade at this time. > We work on a closed system, and have written *many* extensions and hooks to our wiki. > We have only two extensions to the API. There is no extra whitespace or output from the API extensions. (I comment out the include and the $wgAPIModules['function'] lines for both of them, call the API and still get the error. I tried calling the live wikipdeia api and do not get this error. So the bug is very likely our own, but I don't know where to look. > > > I get the following error when I call the API (any action) > > XML Parsing Error: XML or text declaration not at start of entity > Location: http://localhost/path/to/wiki/api.php?action=actionx > Line Number 2, Column 1: > > Where else should I look for the output/whitespace? > The whitespace could be in any file, anywhere (although it's very likely not in MW core). Look through your extension files (including third-party extensions) and: * Kill leading whitespace before first <?php * Remove the ?> tag at the end, it's unnecessary * Carefully inspect inline HTML between ?> and <?php , if any, and convince yourself it's conditional You could also try disabling extensions (by commenting out the require_once line in LocalSettings.php) one by one until you find the guilty one. Roan Kattouw (Catrope)
RSS Feed