Last modified: 2014-06-24 17:51:55 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 T44229, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 42229 - MW 1.20 complains about pcre in replaceExternalLinks() in Parser.php when preg_split() returns false
MW 1.20 complains about pcre in replaceExternalLinks() in Parser.php when pre...
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.20.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-17 18:59 UTC by Mark A. Hershberger
Modified: 2014-06-24 17:51 UTC (History)
1 user (show)

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


Attachments

Description Mark A. Hershberger 2012-11-17 18:59:18 UTC
From mediawiki-l: http://thread.gmane.org/gmane.org.wikimedia.mediawiki/40558

I just upgraded to MW 1.20, and now I'm getting this error after setting $wgShowExceptionDetails to true (I turn it on when I get an error message suggesting it, make a request to check, and turn it back off, don't worry):

MediaWiki internal error.

Original exception: exception 'BadTitleError' with message 'The requested page title was invalid, empty, or an incorrectly linked inter-language or inter-wiki title.
It may contain one or more characters which cannot be used in titles.' in /xxxxxxxxxx/includes/Wiki.php:197
Stack trace:
#0 /xxxxxxxxxx/includes/Wiki.php(536): MediaWiki->performRequest()
#1 /xxxxxxxxxx/includes/Wiki.php(446): MediaWiki->main()
#2 /xxxxxxxxxx/index.php(59): MediaWiki->run()
#3 {main}

Exception caught inside exception handler: exception 'MWException' with message 'PCRE needs to be compiled with --enable-unicode-properties in order for MediaWiki to function' in /xxxxxxxxxx/includes/parser/Parser.php:1528
Stack trace:
#0 /xxxxxxxxxx/includes/parser/Parser.php(1160): Parser->replaceExternalLinks('')
#1 /xxxxxxxxxx/includes/parser/Parser.php(370): Parser->internalParse('The requested p...')
#2 /xxxxxxxxxx/includes/cache/MessageCache.php(873): Parser->parse('The requested p...', Object(Title), Object(ParserOptions), true)
#3 /xxxxxxxxxx/includes/Message.php(605): MessageCache->parse('The requested p...', Object(Title), true, true, Object(Language))
#4 /xxxxxxxxxx/includes/Message.php(434): Message->parseText('The requested p...')
#5 /xxxxxxxxxx/includes/Message.php(496): Message->toString()
#6 /xxxxxxxxxx/includes/OutputPage.php(3528): Message->parseAsBlock()
#7 /var/www/wikistates.outwardhosting.com/includes/OutputPage.php(2062): OutputPage->addWikiMsgArray('badtitletext', NULL)
#8 /xxxxxxxxxx/includes/Exception.php(342): OutputPage->showErrorPage('badtitle', 'badtitletext', NULL)
#9 /xxxxxxxxxx/includes/Exception.php(374): ErrorPageError->report()
#10 /xxxxxxxxxx/includes/Exception.php(620): BadTitleError->report()
#11 /xxxxxxxxxx/includes/Exception.php(690): MWExceptionHandler::report(Object(BadTitleError))
#12 /xxxxxxxxxx/includes/Wiki.php(449): MWExceptionHandler::handle(Object(BadTitleError))
#13 /xxxxxxxxxx/index.php(59): MediaWiki->run()
#14 {main}

So I downloaded my Linux distribution's source package and recompiled PCRE with the proper options and installed it in the distribution's standard location and restarted Apache, only to get the same error.  I ran ldd on both the PHP executable and Apache's libphp5.so and they're pointing to the correct libpcre.so.  I'm running PHP 5.3.17.
Comment 1 Mark A. Hershberger 2012-11-17 19:05:37 UTC
The error is generated in replaceExternalLinks() in Parser.php when preg_split() returns false.

Looking at the PHP documentation (http://php.net/manual/en/function.preg-split.php), the cases preg_split() returns false are not documented.  preg_match() says it returns false "if an error occurs" but the only error it documents is "if offset is higher than subject length" which I don't think applies to preg_split().

At the very least, the message (or code comments) should include a pointer to where more information can be found.
Comment 2 Mark A. Hershberger 2012-11-17 19:09:34 UTC
Also see bug #26297, maybe the updater should warn?
Comment 3 Mark A. Hershberger 2012-11-17 19:11:18 UTC
Adding Chad since he closed bug 26297

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


Navigation
Links