Umherirrender added a comment.
In T279585#6982103 <https://phabricator.wikimedia.org/T279585#6982103>, @LucasWerkmeister wrote: > Hm, thanks. If I add `contentmodel` `text/x-wiki`, I get an internal error instead: https://www.wikidata.org/w/api.php?action=parse&format=json&summary=summary&prop=&contentformat=text%2Fx-wiki > > counterexample > { > "error": { > "code": "internal_api_error_InvalidArgumentException", > "info": "[0009a4bd-06fa-48c2-a925-b7875275e3d3] Caught exception of type InvalidArgumentException", > "errorclass": "InvalidArgumentException" > }, > "servedby": "mw1346" > } > > I guess that must be because of the missing `text`. If I add `text` as empty, then it works. (But there are also more warnings, because it’s still not a proper content parse request – except I’m not interested in parsing content in the first place, only the edit summary. But apparently something changed that makes parsing the summary alone more difficult?) > > Anyways – if this is indeed exclusive to Wikidata (and Test Wikidata, I guess – do we have other wikis where the main namespace is not wikitext?), then this probably doesn’t need to block the train. That was fixed as part of T206253 <https://phabricator.wikimedia.org/T206253> In T279585#6992153 <https://phabricator.wikimedia.org/T279585#6992153>, @LucasWerkmeister wrote: > The summary is parsed as a summary, that’s not the problem as far as I understand. But it’s now trying to parse page content even when neither `text` nor `page` have been specified, and failing if the empty string isn’t valid content. Documentation may be not clear: https://www.wikidata.org/w/api.php?modules=parse > Parameters: > title > Title of page the text belongs to. If omitted, contentmodel must be specified, and API will be used as the title. > contentmodel > Content model of the input text. If omitted, title must be specified, and default will be the model of the specified title. But the error seems the expected behaviour (title API is in main namespace and that is wikibase-item content model), even when only the summary should be parsed (because action=parse want to give a title to CommentFormatter - correct fragment linking) https://www.wikidata.org/w/api.php?action=parse&format=json&summary=[[%23Link]]&title=Wikidata:Main_Page&prop= Just give the correct title the summary is used for or provide a better default with wikitext (like the main page from siteinfo). I would say that this task should be declined and if something is missing, like parse a summary without a title, that sounds like a new feature. But the task with the current description sounds unfixable without many breaking changes in api parse module. TASK DETAIL https://phabricator.wikimedia.org/T279585 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Umherirrender Cc: Umherirrender, Addshore, Krinkle, RhinosF1, matmarex, dduvall, Aklapper, LucasWerkmeister, Astuthiodit_1, Susie413113, karapayneWMDE, Invadibot, maantietaja, Naike, ItamarWMDE, Akuckartz, eprodromou, darthmon_wmde, Rosalie_WMDE, WDoranWMF, DannyS712, Nandana, Amorymeltzer, Lahi, Gq86, GoranSMilovanovic, Jayprakash12345, QZanden, LawExplorer, Sethakill, dg711, _jensen, rosalieper, Agabi10, Scott_WUaS, Pchelolo, Wong128hk, Verdy_p, Wikidata-bugs, aude, jayvdb, Jdforrester-WMF, Mbch331, Jay8g
_______________________________________________ Wikidata-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected]
