https://bugzilla.wikimedia.org/show_bug.cgi?id=33424

       Web browser: ---
             Bug #: 33424
           Summary: [SF] Special:RunQuery error takes down pages using it
           Product: MediaWiki extensions
           Version: any
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: critical
          Priority: Unprioritized
         Component: SemanticForms
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified


I was adding fields to my Special:RunQuery form when its template suddenly
stopped giving me #ask query results. I then added another identical #ask query
as a test case to the template, and it took down the wiki pages that show the
form, and failed with this lengthy error:

Internal error

Bad parser output text.

Backtrace:

#0 [internal function]: ParserOutput->replaceEditSectionLinksCallback(Array)
#1 /path/to/includes/parser/ParserOutput.php(160):
preg_replace_callback('#<(?:mw:)?edits...', Array, '<p><br />?</p>?...')
#2 /path/to/extensions/SemanticForms/includes/SF_FormUtils.php(894):
ParserOutput->getText()
#3 /path/to/extensions/SemanticForms/includes/SF_FormPrinter.php(418):
SFFormUtils::getFormDefinition(Object(Parser), '<noinclude>?Thi...', 1975)
#4 /path/to/extensions/SemanticForms/specials/SF_RunQuery.php(81):
SFFormPrinter->formHTML('<noinclude>?Thi...', true, false, 1975, NULL, NULL,
NULL, true, false)
#5 /path/to/extensions/SemanticForms/specials/SF_RunQuery.php(31):
SFRunQuery->printPage('Specimen_find', false)
#6 /path/to/includes/SpecialPageFactory.php(458):
SFRunQuery->execute('Specimen_find')
#7 /path/to/includes/Wiki.php(226):
SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#8 /path/to/includes/Wiki.php(626): MediaWiki->performRequest()
#9 /path/to/includes/Wiki.php(533): MediaWiki->main()
#10 /path/to/index.php(57): MediaWiki->run()
#11 {main}

That same error message is also produced by:

/path/to/extensions/SemanticMediaWiki/maintenance$ php SMW_refreshData.php -v

On a page with the RunQuery form embedded, this error was produced:

MediaWiki internal error.

Original exception: exception 'MWException' with message 'Bad parser output
text.' in /path/to/includes/parser/ParserOutput.php:180
Stack trace:
#0 [internal function]: ParserOutput->replaceEditSectionLinksCallback(Array)
#1 /path/to/includes/parser/ParserOutput.php(160):
preg_replace_callback('#<(?:mw:)?edits...', Array, '<p><br />?</p>?...')
#2 /path/to/extensions/SemanticForms/includes/SF_FormUtils.php(894):
ParserOutput->getText()
#3 /path/to/extensions/SemanticForms/includes/SF_FormPrinter.php(418):
SFFormUtils::getFormDefinition(Object(Parser), '<noinclude>?Thi...', 1975)
#4 /path/to/extensions/SemanticForms/specials/SF_RunQuery.php(81):
SFFormPrinter->formHTML('<noinclude>?Thi...', false, true, 1975, NULL, NULL,
NULL, true, true)
#5 /path/to/extensions/SemanticForms/specials/SF_RunQuery.php(31):
SFRunQuery->printPage('Specimen_find', true)
#6 /path/to/includes/SpecialPageFactory.php(458):
SFRunQuery->execute('Specimen_find')
#7 /path/to/includes/SpecialPageFactory.php(492):
SpecialPageFactory::executePath(Object(Title), Object(RequestContext), true)
#8 /path/to/includes/parser/Parser.php(3129):
SpecialPageFactory::capturePath(Object(Title))
#9 /path/to/includes/parser/Preprocessor_DOM.php(1044):
Parser->braceSubstitution(Array, Object(PPFrame_DOM))
#10 /path/to/includes/parser/Parser.php(2861):
PPFrame_DOM->expand(Object(PPNode_DOM), 0)
#11 /path/to/includes/parser/Parser.php(1033): Parser->replaceVariables('<div
style="flo...')
#12 /path/to/includes/parser/Parser.php(340): Parser->internalParse('<div
style="flo...')
#13 /path/to/includes/Article.php(1837): Parser->parse('<div style="flo...',
Object(Title), Object(ParserOptions), true, true, 14680)
#14 /path/to/includes/Article.php(1759): Article->getOutputFromWikitext('<div
style="flo...', false, Object(ParserOptions))
#15 /path/to/includes/Article.php(1012): Article->outputWikiText('<div
style="flo...', false, Object(ParserOptions))
#16 /path/to/includes/Article.php(2002): Article->doViewParse()
#17 /path/to/includes/PoolCounter.php(183): PoolWorkArticleView->doWork()
#18 /path/to/includes/Article.php(547): PoolCounterWork->execute()
#19 /path/to/includes/Wiki.php(470): Article->view()
#20 /path/to/includes/Wiki.php(241): MediaWiki->performAction(Object(Article))
#21 /path/to/includes/Wiki.php(626): MediaWiki->performRequest()
#22 /path/to/includes/Wiki.php(533): MediaWiki->main()
#23 /path/to/index.php(57): MediaWiki->run()
#24 {main}

Exception caught inside exception handler: exception 'MWException' with message
'FauxRequest::getRequestURL() not implemented' in
/path/to/includes/WebRequest.php:1106
Stack trace:
#0 /path/to/includes/WebRequest.php(1135):
FauxRequest->notImplemented('FauxRequest::ge...')
#1 /path/to/includes/SkinTemplate.php(1033): FauxRequest->getRequestURL()
#2 /path/to/includes/SkinTemplate.php(498):
SkinTemplate->buildContentNavigationUrls(Object(OutputPage))
#3 /path/to/includes/OutputPage.php(1856):
SkinTemplate->outputPage(Object(OutputPage))
#4 /path/to/includes/Exception.php(183): OutputPage->output()
#5 /path/to/includes/Exception.php(209): MWException->reportHTML()
#6 /path/to/includes/Exception.php(392): MWException->report()
#7 /path/to/includes/Exception.php(471):
MWExceptionHandler::report(Object(MWException))
#8 /path/to/includes/Wiki.php(536):
MWExceptionHandler::handle(Object(MWException))
#9 /path/to/index.php(57): MediaWiki->run()
#10 {main}

1. Blanking the form always alleviates the error condition.
2. Restoring the form causes the error condition to return.
3. Deleting the form lines 27 through 56 inclusive alleviates the error
condition, but #ask queries still do not work.
4. Restoring the form lines 27 through 56 inclusive does not cause the error
condition to return, but #ask queries still do not work.

Form lines 27 through 56 look like this:

|-     class="mw-collapsible mw-collapsed" id="mw-customcollapsible-findHelp"
! style="text-align:left; font-weight:normal;" colspan="2" | <nowiki />
    Everything below is optional, you may leave it blank if you choose. The
information entered below will be preloaded for you when the search results
allow you to enter in specimens that were not found. It will only work if ALL
the certification numbers you enter above are identical for all of the below
information. So, if you enter any of the below information, it must be correct
for each certification number you entered above, or you will have to change it
manually on the Specimen form. Only enter one bit of information for each
field, except the '''Designation''' field, where more than one is allowed.
|- class="mw-collapsible mw-collapsed" id="mw-customcollapsible-findHelp"
! Type:
| {{{field | Type | size=10 | values from property=Type }}}
|- class="mw-collapsible mw-collapsed" id="mw-customcollapsible-findHelp"
! Certified by:
| {{{field | Certified by | input type=combobox | size=30 | values from
property=Certified by }}}
|- class="mw-collapsible mw-collapsed" id="mw-customcollapsible-findHelp"
! Grade:
| {{{field | Grade | input type=combobox  | size=10 | values from
property=Grade }}}
|- class="mw-collapsible mw-collapsed" id="mw-customcollapsible-findHelp"
! Designation:
| {{{field | Designation | values from property=Designation}}}
    Separate multiple entries with a comma.<br />
    Examples:<br />
    '''Proof, Ultra Cameo'''<br />
    '''Proof, Ultra Cameo, Star'''<br />
    '''Proof, Cameo'''<br />
    '''Proof'''<br />
    '''Proof, Deep Cameo'''<br />
    '''Proof-Like'''<br />
    '''Deep Mirror Proof-Like'''<br />
|- class="mw-collapsible mw-collapsed" id="mw-customcollapsible-findHelp"
! Conserved by:
| {{{field | Conserved by | input type=combobox | values from
property=Conserved by }}}
|- class="mw-collapsible mw-collapsed" id="mw-customcollapsible-findHelp"
! Problem:
| {{{field | Specimen problem | input type=combobox | values from
property=Specimen problem }}}

I have not been able to figure out what exactly causes the error condition to
appear, and I think it may not be directly related to anything the user (me) is
doing. But, hopefully figuring out what causes it to alleviate will be
sufficient for finding the cause in the code, and fixing the bug. I still don't
know why #ask queries stopped working. 

Still, the same situation repeated often enough that I don't think data entry
is a factor. The error condition occurred even when just going to the
Special:RunQuery form page, before any data was entered (I'm not 100% sure of
that, since I can't get the error to repeat on command). In all tested queries,
I only used the first field, while others were left blank (if present). Some
queries I used were these:

http://www.coincompendium.com/w/index.php/Special:RunQuery/Specimen_find?Specimen_find%5BCertification%20number%5D=3495072-005&Specimen_find%5BType%5D=&wpRunQuery=true

http://www.coincompendium.com/w/index.php/Special:RunQuery/Specimen_find?Specimen_find%5BCertification%20number%5D=3495072-005,%202764410-002,%2016201810,%202765633-012,%202312213-013&Specimen_find%5BType%5D=&wpRunQuery=true


Since the first line of the errors seems to be related to the section edit
links, I suspect this bug is actually a problem with magic words, since I have
the magic word __NOEDITSECTION__ in my template, and it does not function, as
reported in this bug:

https://bugzilla.wikimedia.org/show_bug.cgi?id=33418

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to