The `title` parameter to the parse API is solely for context (when actually parsing a page, `page` is used), such as self-links turning bold and magic words. The text that is parsed is supposed to be specified by `text`.
However, in this case the whole (or probably the no-JS first page) Flow board (both UI code and user content) is being returned.
https://www.mediawiki.org/w/api.php?action=parse&title=MediaWiki&text={{ping|1=Username}}&format=json outputs:
{P407}
https://www.mediawiki.org/w/api.php?action=parse&title=Talk:Sandbox&text={{ping|1=Username}}&format=json outputs:
{P408}
I'm not sure if this issue is caused by Flow, core, or some interaction.
See below for symptoms that are probably a consequence of the above:
---
This happens locally too, and I don't think it has anything to do with configuration that differs on private wikis.
I'm just using a test page on Office wiki as an example, because I was unable to find any other pages in production where both VisualEditor and Flow are enabled (there is a check that the namespace is enabled for VE).
While logged in, on any page in Office wiki (this doesn't matter because the parameter is specified explicitly), run the following two statements in the JavaScript console:
```$.post( '/w/api.php', {
action: 'visualeditor',
format: 'json',
paction: 'parsefragment',
page: 'Main Page',
wikitext: "{{ping|1=Username}}",
pst: "1"
} ).done(
function ( resp ) {
console.log( 'Main Page', resp.visualeditor );
}
);
$.post( '/w/api.php', {
action: 'visualeditor',
format: 'json',
paction: 'parsefragment',
page: 'LQT TestZero',
wikitext: "{{ping|1=Username}}",
pst: "1"
} ).done(
function ( resp ) {
console.log( 'LQT TestZero', resp.visualeditor );
}
);
```
The Main Page one responds normally with an expansion of the ping template. The one with the test page responds with:
```
{ result: "success", content: "<body data-parsoid='{"dsr":[0,2,0,0]}' lang="en" class="mw-content-ltr sitedir-ltr ltr mw-body mw-body-content mediawiki" dir="ltr"><p data-parsoid='{"dsr":[0,2,0,0]}'>[]</p></body>" }
```
It looks like Parsoid is hitting an edge case somewhere and serializing an empty array.