After upgrading my wiki to from 1.1 to 1.2 this morning, I've found that any attempt to view or edit a page that has an apostrophe in the title will return an error page. I find this extremely annoying -- even crippling -- because a significant number of articles on my site have (or will need) apostrophes in their titles.
Does this have anything to do with the fact that I switched the wiki from ISO-Latin to UTF-8 when I upgraded? Please tell me there's some way to get back the functionality!
Thanks, Dan Carlson
On Mar 26, 2004, at 13:30, Dan Carlson wrote:
After upgrading my wiki to from 1.1 to 1.2 this morning, I've found that any attempt to view or edit a page that has an apostrophe in the title will return an error page. I find this extremely annoying -- even crippling -- because a significant number of articles on my site have (or will need) apostrophes in their titles.
Does this have anything to do with the fact that I switched the wiki from ISO-Latin to UTF-8 when I upgraded? Please tell me there's some way to get back the functionality!
If you can change the PHP configuration, try turning off the "magic_quotes_gpc" option.Alternatively, try changing this bit of index.php:
if( isset( $_SERVER['PATH_INFO'] ) ) { $title = stripslashes( substr( $_SERVER['PATH_INFO'], 1 ) ); } else { $title = stripslashes( $_REQUEST['title'] ); }
(the stripslashes calls aren't presently there).
Let me know if that clears it up, I'll get a 1.2.1 out soon...
-- brion vibber (brion @ pobox.com)
On Mar 26, 2004, at 5:32 PM, Brion Vibber wrote:
If you can change the PHP configuration, try turning off the "magic_quotes_gpc" option.Alternatively, try changing this bit of index.php:
if( isset( $_SERVER['PATH_INFO'] ) ) { $title = stripslashes( substr( $_SERVER['PATH_INFO'], 1 ) ); } else { $title = stripslashes( $_REQUEST['title'] ); }
(the stripslashes calls aren't presently there).
Let me know if that clears it up, I'll get a 1.2.1 out soon...
Okay, that let me see the edit page, but when I tried to save it, it gave me the same error page again...
Dan
On Friday, Mar 26, 2004, at 19:08 US/Central, Dan Carlson wrote:
Okay, that let me see the edit page, but when I tried to save it, it gave me the same error page again...
I'm using the ’ mark-up for an apostrophe, and I'm having no problems.
On Mar 26, 2004, at 4:30 PM, Dan Carlson wrote:
After upgrading my wiki to from 1.1 to 1.2 this morning, I've found that any attempt to view or edit a page that has an apostrophe in the title will return an error page. I find this extremely annoying -- even crippling -- because a significant number of articles on my site have (or will need) apostrophes in their titles.
Does this have anything to do with the fact that I switched the wiki from ISO-Latin to UTF-8 when I upgraded? Please tell me there's some way to get back the functionality!
I've just located the problem, at least in the functional sense:
http://memoryalpha.st-minutiae.com/en/index.php/Memory_Alpha: How_to_edit_an_article_so_long_that_you_can%27t_edit http://memoryalpha.st-minutiae.com/en/index.php?title=Memory_Alpha: How_to_edit_an_article_so_long_that_you_can%27t_edit
The first URL, where the PHP variable is compressed out, does not work, while the traditional style with "title=" actually DOES work. Something's wrong with the URL parser, it appears.
Hope this helps!
Dan Carlson
On Mar 27, 2004, at 13:17, Dan Carlson wrote:
I've just located the problem, at least in the functional sense:
http://memoryalpha.st-minutiae.com/en/index.php/Memory_Alpha: How_to_edit_an_article_so_long_that_you_can%27t_edit http://memoryalpha.st-minutiae.com/en/index.php?title=Memory_Alpha: How_to_edit_an_article_so_long_that_you_can%27t_edit
The first URL, where the PHP variable is compressed out, does not work, while the traditional style with "title=" actually DOES work. Something's wrong with the URL parser, it appears.
Could you try this quick test script?
<?php
$magic = get_magic_quotes_gpc() ? "on" : "off"; print "<p>Magic quotes are <b>$magic</b>.</p>";
$path = $_SERVER['PATH_INFO']; print "<p>Raw path is: $path</p>\n";
$stripped = stripslashes($path); print "<p>Stripped path is: $stripped</p>\n";
?>
Then go to /blah/scriptname.php/Apostrophe%27s_some_trouble
It should print out the following:
Magic quotes are on.
Raw path is: /Apostrophe's_trouble
Stripped path is: /Apostrophe's_trouble
Now, on my test box, with magic quotes on, the apostrophe title does with with index.php/Apostrophe%27s after making the hack fix I described earlier:
if( isset( $_SERVER['PATH_INFO'] ) ) { $title = stripslashes( substr( $_SERVER['PATH_INFO'], 1 ) ); } else { $title = stripslashes( $_REQUEST['title'] ); }
(adding the two stripslashes() calls) Make sure they're both in there.
-- brion vibber (brion @ pobox.com)
On Mar 27, 2004, at 6:35 PM, Brion Vibber wrote:
Now, on my test box, with magic quotes on, the apostrophe title does with with index.php/Apostrophe%27s after making the hack fix I described earlier:
if( isset( $_SERVER['PATH_INFO'] ) ) { $title = stripslashes( substr( $_SERVER['PATH_INFO'], 1 ) ); } else { $title = stripslashes( $_REQUEST['title'] ); }
(adding the two stripslashes() calls) Make sure they're both in there.
*smacks head*
When I added that fix the first time, I only added the SECOND "stripslashes" incidence, and not the first. Stupid, stupid, stupid!
Sorry to cause confusion.
Dan
mediawiki-l@lists.wikimedia.org