Page MenuHomePhabricator

cant use cargo_query with format=template in special paegs
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • run cargoQuery with |format=template in the context of special page
  • (In our case, the skin parsing wikitext of mediawiki:sidebar, which using cargo_query)

What happens?:
The output (even not error, just string output), is: Parser state cleared while parsing. Did you call Parser::parse recursively? and then the trace, which by the way contains also sensitive data.

What should have happened instead?:
We can use cargo_query in context of special pages

Software version (skip for WMF-hosted wikis like Wikipedia):
1.36
Other information (browser name/version, screenshots, etc.):

Event Timeline

Change 875296 had a related patch set uploaded (by Anysite; author: Anysite):

[mediawiki/extensions/Cargo@master] cargo_query: let use in special pages

https://gerrit.wikimedia.org/r/875296

I'm not sure this is the right approach. We can also check if the special page is cargo related page, something like:
} elseif ( ( $title != null && $title->isSpecialPage() && strpos( $title->getText(), 'Cargo' ) !== FALSE && !$wgRequest->getCheck( 'wpRunQuery' ) )

Anysite renamed this task from cant use cargo_query with format=template in special paes to cant use cargo_query with format=template in special paegs.Jan 4 2023, 1:01 PM

Change 875296 merged by jenkins-bot:

[mediawiki/extensions/Cargo@master] cargo_query: let use in special pages

https://gerrit.wikimedia.org/r/875296

Yaron_Koren claimed this task.
Yaron_Koren subscribed.

I assume this is fixed now...