Last modified: 2014-06-05 10:46:03 UTC
Got this exception while using the api. Never saw it before and don't know what caused it. Does not happen with other same api calls with different values. I suspect it has something to do with the page title but not sure. API call: http://wiki-internal/wiki/api.php?action=sfautoedit&form=SusDataForm&target=SusData%3ADOESN%27T%20TRIGGER%20A%20FOURTH%20AMENDMENT%20REVIEW&query=SusData:CheckStatusTemplate[susCheckStatus]=PENDING%26SusData:CheckStatusTemplate[urlCheckStatus]=PENDING&format=xml Result: <?xml version="1.0"?><api><error code="internal_api_error_MWException" info="Exception Caught: Internal error in ApiFormatXml::recXmlPrint: (errors, ...) has integer keys without _element value. Use ApiResult::setIndexedTagName()." xml:space="preserve"> #0 /usr/local/errata/wiki/includes/api/ApiBase.php(1420): wfDebugDieBacktrace('Internal error ...') #1 /usr/local/errata/wiki/includes/api/ApiFormatXml.php(179): ApiBase::dieDebug('ApiFormatXml::r...', '(errors, ...) h...') #2 /usr/local/errata/wiki/includes/api/ApiFormatXml.php(194): ApiFormatXml::recXmlPrint('errors', Array, NULL) #3 /usr/local/errata/wiki/includes/api/ApiFormatXml.php(80): ApiFormatXml::recXmlPrint('api', Array, NULL, false) #4 /usr/local/errata/wiki/includes/api/ApiMain.php(847): ApiFormatXml->execute() #5 /usr/local/errata/wiki/includes/api/ApiMain.php(823): ApiMain->printResult(false) #6 /usr/local/errata/wiki/includes/api/ApiMain.php(369): ApiMain->executeAction() #7 /usr/local/errata/wiki/includes/api/ApiMain.php(347): ApiMain->executeActionWithErrorHandling() #8 /usr/local/errata/wiki/api.php(78): ApiMain->execute() #9 {main} </error></api>
action=sfautoedit is part of Semantic Forms -> moving
(In reply to Al Johnson from comment #0) > Got this exception while using the api. Never saw it before and don't know > what caused it. Does not happen with other same api calls with different > values. I suspect it has something to do with the page title but not sure. Could you post a call that works?
The logs are gone, but I recall a previous permission error that was out of the ordinary. Testing this manually gives the same result when not logged-in. The pages namespace is restricted. I wouldn't have filed this bug if I had realized this... setting to minor. Can be tested with the sfautoedit api examples.
Note: I didn't see the SemanticForms component in the dropdown on the commit page, so it changed to API again.
Please do not change it back to MediaWiki core's API component when the bug exists in an extension. The error message you've reported indicates that the bug is in the SemanticForms extension, specifically in that it is failing to call ApiResult::setIndexedTagName on some numerically-indexed array it is giving to ApiResult as the value for an "errors" element somewhere. Checking <https://wikitech.wikimedia.org/w/api.php?format=rawfm&action=sfautoedit&form=form-name&target=page-name&query=template-name[field-name-1]=field-value-1%26template-name[field-name-2]=field-value-2>, I see that this is in fact the case.
Brad, could you elaborate on that? Following your link yields a perfectly correct error message for me ("<b>Form-name</b> is not a valid form.").
(In reply to s7eph4n from comment #6) > Brad, could you elaborate on that? Following your link yields a perfectly > correct error message for me ("<b>Form-name</b> is not a valid form."). That's because I used &format=rawfm. This particular class of bugs only appears with &format=xml or &format=xmlfm. But the output with &format=rawfm should be showing an additional subelement named "_element" on that errors element, as you can see for example on the pages element in <https://wikitech.wikimedia.org/w/api.php?format=rawfm&action=query&titles=Foo>.
Thanks for the hint, fixing this should be easy now.
(In reply to Brad Jorsch from comment #5) > Please do not change it back to MediaWiki core's API component when the bug > exists in an extension. > Brad, check the form as I indicated in my note. It required a value to submit.
(In reply to Al Johnson from comment #9) > (In reply to Brad Jorsch from comment #5) > > Please do not change it back to MediaWiki core's API component when the bug > > exists in an extension. > > Brad, check the form as I indicated in my note. It required a value to > submit. I don't know what form you're referring to, as both Umherirrender and I were able to assign it to SemanticForms without difficulty. And you were able to make comment 9 without being "forced" to change it.
(In reply to Al Johnson from comment #9) > Brad, check the form as I indicated in my note. It required a value to > submit. Bugzilla only allows changing the product, a second page is displayed for updating the component. Components within products can be seen here: https://bugzilla.wikimedia.org/describecomponents.cgi If there's any confusion, feel free to drop me a private email. :)