Hi,
I’m trying to figure out a nasty bug in 1.9.3, which I think may actually be a PHP bug. I’d welcome your thoughts.
The symptom is that since upgrading from 1.6.3 to 1.9.3, some pages in my wiki display as blank. “Some” seems to refer to pages which include certain extended characters, such as the fancy close double quote (but not the open). The historical versions of the same page display as blank too. The page text in the database is still OK, as editing and saving the page fixes it – but where the close quote was, I now have “�?”.
This seems to be a parser bug. Dumping debug statements into the code, and setting $wgEnableParserCache = false, I found that the text was being set to null in the parser at the point where it does this:
$mw = MagicWord::get( 'notoc' );
if( $mw->matchAndRemove( $text ) ) {
Looking into MagicWord.php, at function matchAndRemove, it seems that the text gets blanked by the call to preg_replace_callback, even though there are no matches in this case (the article doesn’t have “__NOTOC__”).
The regular expression being used for this was:
/__NOTOC__/iu
The workaround I found was to remove the “u”; ie. in function initRegex():
< $case = $this->mCaseSensitive ? '' : 'iu';
---
$case = $this->mCaseSensitive ? '' : 'i';
Note that we don’t use UTF8 much, but some people have pasted the fancy quotes from Windows into some pages.
Any thoughts?
Ian Smith
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Ian Smith wrote:
I’m trying to figure out a nasty bug in 1.9.3, which I think may actually be a PHP bug. I’d welcome your thoughts.
The symptom is that since upgrading from 1.6.3 to 1.9.3, some pages in my wiki display as blank. “Some” seems to refer to pages which include certain extended characters,
1) Enable display and/or logging of PHP errors, see www.php.net
2) Raise your PHP memory limit, see www.php.net
3) Check your web server's log for other errors, such as crashing processes.
- -- brion vibber (brion @ pobox.com / brion @ wikimedia.org)
Think you may have replied to the wrong email here... ;-)
Enable display and/or logging of PHP errors, see www.php.net
Raise your PHP memory limit, see www.php.net
Check your web server's log for other errors, such as crashing
processes.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Ian Smith wrote:
Think you may have replied to the wrong email here... ;-)
No, but if you're getting blank pages, you probably want to look at the error messages instead of throwing them in /dev/null. :)
- -- brion vibber (brion @ pobox.com / brion @ wikimedia.org)
I have installed the AuthDrupal extension for Drupal integration and all is working fine now but I still have a login message I need to change.
The 'login/create account' link in the top right has successfully been redirected to take the visitor the Drupal registration page.
However, when I view pages and attempt to edit them whilst logged out I receive a message "You have to log in to edit pages." This is in the mideel of the screen/page. It directs me to :
Special:Userlogin&returnto=PageWhereIAmNow.
Is there an easy way to change this to make it consistent with the other link? I am looking to change it to a hard coded URL (mydomain.com) which I understand will lose the previous page info.
Thanks, Paul
I have a wiki about a writer's novels. Wikipedia has a nice template called
Template:Infobox Book
But I can't figure out how to use that template in my wiki. I apparently has some parser functions. Is it even possible to simply copy the source code for this template? I can't find it.
Thanks.
Tim
tim@hyperarts.com wrote:
I have a wiki about a writer's novels. Wikipedia has a nice template called
Template:Infobox Book
But I can't figure out how to use that template in my wiki. I apparently has some parser functions. Is it even possible to simply copy the source code for this template? I can't find it.
You need to install the ParserFunctions extension http://meta.wikimedia.org/wiki/ParserFunctions. Once you do that, you should be able to copy the the source code from the Infobox Book to a template on your wiki.
Mike
tim@hyperarts.com wrote:
I have a wiki about a writer's novels. Wikipedia has a nice template called
Template:Infobox Book
But I can't figure out how to use that template in my wiki. I apparently has some parser functions. Is it even possible to simply copy the source code for this template? I can't find it.
You need to install the ParserFunctions extension http://meta.wikimedia.org/wiki/ParserFunctions. Once you do that, you should be able to copy the the source code from the Infobox Book to a template on your wiki.
Well, I installed that extension and it got *closer*, but still is weird:
http://cl49.pynchonwiki.com/wiki/index.php?title=The_Crying_of_Lot_49
Link to the template:
http://cl49.pynchonwiki.com/wiki/index.php?title=Template:Infobox_Book
So if anyone can get me the rest of the way....
Thanks so far!
Tim
Try &action=raw in the URL
On 17/03/07, Michael Daly mikedaly@magma.ca wrote:
tim@hyperarts.com wrote:
So if anyone can get me the rest of the way....
I can't create a user ID, so I can't log in to edit (and see the code) on either page.
Mike
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
http://cl49.pynchonwiki.com/wiki/index.php?title=The_Crying_of_Lot_49 [...] http://cl49.pynchonwiki.com/wiki/index.php?title=Template:Infobox_Book
On an unrelated note: I quite like the MonoBook modifications on that wiki; nothing too complex (I guess), but quite different nevertheless. Would you mind sharing those modifications?
-- F.
PS: The sidebar should be divided into two parts though, as humans can only focus on about 5-7 items at once. (It's sort of a golden rule... )
Frederik Dohr wrote:
I quite like the MonoBook modifications on that wiki; nothing too complex (I guess), but quite different nevertheless.
I agree - it's one of the nicer wikis I've seen. Very tasteful! (though it looks a little narrow on a wide screen monitor at high-res).
Mike
Is there an easy way to change this to make it consistent with the other link? I am looking to change it to a hard coded URL (mydomain.com) which I understand will lose the previous page info.
Yes there is. To do so, log in as a Sysop and go to the article called "MediaWiki:Whitelistedittext".
One easy way to get there is to search for this string using the "Go" button - then choose the "create this page" link from the search results page.
The edit box should be preloaded with this text:
You have to $1 to edit pages.
Change this to the following:
You have to <span class="plainlinks">[http://mydomain.com log in]</span> to edit pages.
Save the page with your changes. That's it!
In general, when you want to change static text that appears in the wiki, that text is stored in a system message that can be overridden via an article in the MediaWiki namespace (as above).
To see a list of all such system messages, check out "Special:Allmessages".
Hope this helps.
-- Jim R. Wilson (jimbojw)
On 3/17/07, Paul Coghlan pcoghlan@usa.net wrote:
I have installed the AuthDrupal extension for Drupal integration and all is working fine now but I still have a login message I need to change.
The 'login/create account' link in the top right has successfully been redirected to take the visitor the Drupal registration page.
However, when I view pages and attempt to edit them whilst logged out I receive a message "You have to log in to edit pages." This is in the mideel of the screen/page. It directs me to :
Special:Userlogin&returnto=PageWhereIAmNow.
Is there an easy way to change this to make it consistent with the other link? I am looking to change it to a hard coded URL (mydomain.com) which I understand will lose the previous page info.
Thanks, Paul
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Thanks Jim that worked fine!
Paul
On 3/18/07 1:35 AM, "Jim Wilson" wilson.jim.r@gmail.com wrote:
Is there an easy way to change this to make it consistent with the other link? I am looking to change it to a hard coded URL (mydomain.com) which I understand will lose the previous page info.
Yes there is. To do so, log in as a Sysop and go to the article called "MediaWiki:Whitelistedittext".
One easy way to get there is to search for this string using the "Go" button
- then choose the "create this page" link from the search results page.
The edit box should be preloaded with this text:
You have to $1 to edit pages.
Change this to the following:
You have to <span class="plainlinks">[http://mydomain.com log in]</span>
to edit pages.
Save the page with your changes. That's it!
In general, when you want to change static text that appears in the wiki, that text is stored in a system message that can be overridden via an article in the MediaWiki namespace (as above).
To see a list of all such system messages, check out "Special:Allmessages".
Hope this helps.
-- Jim R. Wilson (jimbojw)
On 3/17/07, Paul Coghlan pcoghlan@usa.net wrote:
I have installed the AuthDrupal extension for Drupal integration and all is working fine now but I still have a login message I need to change.
The 'login/create account' link in the top right has successfully been redirected to take the visitor the Drupal registration page.
However, when I view pages and attempt to edit them whilst logged out I receive a message "You have to log in to edit pages." This is in the mideel of the screen/page. It directs me to :
Special:Userlogin&returnto=PageWhereIAmNow.
Is there an easy way to change this to make it consistent with the other link? I am looking to change it to a hard coded URL (mydomain.com) which I understand will lose the previous page info.
Thanks, Paul
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org