Last modified: 2012-06-06 22:59:27 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 T35606, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 33606 - SF_RunQuery.php: Argument 3 passed to Parser::parse() must be an instance of ParserOptions, null given
SF_RunQuery.php: Argument 3 passed to Parser::parse() must be an instance of ...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
SemanticForms (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: s7eph4n
: patch, patch-reviewed
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-09 14:06 UTC by s7eph4n
Modified: 2012-06-06 22:59 UTC (History)
6 users (show)

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


Attachments
Patch by James Hong Kong (437 bytes, patch)
2012-01-09 14:42 UTC, s7eph4n
Details

Description s7eph4n 2012-01-09 14:06:00 UTC
We found a small glitch with the current revision 10778 of
SF_RunQuery.php which generates an error on

Catchable fatal error: Argument 3 passed to Parser::parse() must be an
instance of ParserOptions, null given, called in
D:\xampp\htdocs\aris\extensions\SemanticForms\specials\SF_RunQuery.php
on line 105 and defined in
D:\xampp\htdocs\aris\includes\parser\Parser.php on line 313

We switched to MW 1.18 together with SMW 1.7 any of our 30 RunQuery
forms run into the same problem either called via Special:RunQuery or
as url based service with wpRunQuery=true.

It seems that in MW 1.18, $wgParser->mOptions expects an array instead
of a string which causes the fatal error.
Comment 1 s7eph4n 2012-01-09 14:42:55 UTC
Created attachment 9826 [details]
Patch by James Hong Kong

JHK: Since I needed it to work, with current SVN trunk I did a quick fix,
which works fine as far I can see but you are the experts. It is just
one line (see patch).
Comment 2 Jeroen De Dauw 2012-01-09 16:24:36 UTC
/confused

You assigned this to yourself? :)

Small remark: why not just pass in the PO object as argument instead of messing with wgParser?
Comment 3 s7eph4n 2012-01-09 16:30:17 UTC
(In reply to comment #2)
> You assigned this to yourself? :)
> 
> Small remark: why not just pass in the PO object as argument instead of messing
> with wgParser?

Yes, assigned it to myself. The bug is the result of an email exchange between James, Yaron and me. I put it in here to not forget about it.

I did not look at it yet, so can not say anything about it. If you want to fix it, go ahead.
Comment 4 Platonides 2012-01-09 18:11:39 UTC
That parameter will actually set $wgParser->mOptions, but it's hard to find the right way to deal with the parser. Not pretty, but would work ok.

However, I fail to see how you may be arriving to that line with a null $wgParser->mOptions, since it is set in line 85 with the same condition (why is that split in two ifs??), and ParserOptions::newFromUser can't return null.

Did you have any customization to that file?

PS: I hope you missed a digit, r10778 is from 2005 (the patch is from r108114, which is much saner :) ).
Comment 5 Yaron Koren 2012-02-03 21:00:42 UTC
Can this bug report be closed? It seems to no longer be valid...
Comment 6 MWJames 2012-06-06 22:59:27 UTC
We haven't seen anything related to that issue in SF 2.4.2 therefore I close this one.

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


Navigation
Links