Last modified: 2014-06-05 10:46:03 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T66777, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 64777 - SemantixForms: Fix "Internal error in ApiFormatXml::recXmlPrint: (errors, ...) has integer keys without _element value."
SemantixForms: Fix "Internal error in ApiFormatXml::recXmlPrint: (errors, ......
Status: ASSIGNED
Product: MediaWiki extensions
Classification: Unclassified
SemanticForms (Other open bugs)
REL1_20-branch
Other All
: Low minor (vote)
: ---
Assigned To: s7eph4n
:
Depends on:
Blocks: code_quality
  Show dependency treegraph
 
Reported: 2014-05-02 23:56 UTC by Al Johnson
Modified: 2014-06-05 10:46 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Al Johnson 2014-05-02 23:56:24 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-&gt;execute()
#5 /usr/local/errata/wiki/includes/api/ApiMain.php(823): ApiMain-&gt;printResult(false)
#6 /usr/local/errata/wiki/includes/api/ApiMain.php(369): ApiMain-&gt;executeAction()
#7 /usr/local/errata/wiki/includes/api/ApiMain.php(347): ApiMain-&gt;executeActionWithErrorHandling()
#8 /usr/local/errata/wiki/api.php(78): ApiMain-&gt;execute()
#9 {main}

</error></api>
Comment 1 Umherirrender 2014-05-04 18:58:47 UTC
action=sfautoedit is part of Semantic Forms -> moving
Comment 2 s7eph4n 2014-05-04 20:13:36 UTC
(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?
Comment 3 Al Johnson 2014-05-04 22:23:10 UTC
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.
Comment 4 Al Johnson 2014-05-04 22:24:46 UTC
Note: I didn't see the SemanticForms component in the dropdown on the commit page, so it changed to API again.
Comment 5 Brad Jorsch 2014-05-05 14:17:24 UTC
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.
Comment 6 s7eph4n 2014-05-05 14:35:12 UTC
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.").
Comment 7 Brad Jorsch 2014-05-05 14:51:37 UTC
(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>.
Comment 8 s7eph4n 2014-05-05 14:58:22 UTC
Thanks for the hint, fixing this should be easy now.
Comment 9 Al Johnson 2014-05-06 09:22:20 UTC
(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.
Comment 10 Brad Jorsch 2014-05-06 14:31:46 UTC
(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.
Comment 11 Andre Klapper 2014-05-06 15:21:46 UTC
(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. :)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links