Mailing List Archive

Deleting article with ? in title
How do I delete an article that contains a ? in the title? And how do I
prevent more of them from being created?

I created an article with a ? in the title. See

http://wise-nano.org/w/Category:Security_Policy_Implications_of_Nanotechnology


which contains the articles "Is there a superweapon" and "Is there a
superweapon?"

I initially created the ?'d article. The system doesn't deal well with
that. When I edited and saved the page, the page after the save said
"There's no text here."

So I created the non-?'d version, and tried to delete the ?'d version -
or maybe I tried to move the one to the other, I forget. Anyway, it
didn't work. When I tried to delete the ?'d version, it deleted the
non-?'d version. So I restored it.

Now the URL for the ?'d one ends in %3F but goes to the page without the
?. And when I try to delete the ?'d one, I can't (not that I ever
could). And it's in a category, so I'm hesitant to hack it out of the
database until I know exactly what to do to keep things consistent.

BTW, the article was created with a URL like this:

http://wise-nano.org/w?title=test%3F&makeArticle=Go%21&wpTextbox1=%5B%5BCategory%3ASecurity+Policy+Implications+of+Nanotechnology%5D%5D&action=edit

(You can click that URL, but PLEASE don't save it!)

That URL is weird because it was created by my easy-create-article hack
(see the category page). But if I type [[test?]] it creates a URL like

http://wise-nano.org/w?title=Test%3F&action=edit

so I think this problem could happen in an unhacked wiki site too.

Thanks,
Chris

--
Chris Phoenix cphoenix@CRNano.org
Director of Research
Center for Responsible Nanotechnology http://CRNano.org
Re: Deleting article with ? in title [ In reply to ]
On Oct 25, 2004, at 2:17 AM, Chris Phoenix wrote:
> I initially created the ?'d article. The system doesn't deal well
> with that. When I edited and saved the page, the page after the save
> said "There's no text here."

Your rewrite rules are broken; you're probably sending the unescaped
URL to index.php/$1, which will turn the ? and anything after it into a
query string parameter.

Unfortunately Apache's mod_rewrite doesn't really deal with
unescaping/reescaping in a sane fashion. If you change it to
index.php?title=$1 then the ? case should work, but & will similarly
fail, unless you patch Apache (there is a patch for Apache 1.x in the
maintenance/ directory which adds an 'ampescape' function which escapes
& to %26)

-- brion vibber (brion @ pobox.com)
Re: Deleting article with ? in title [ In reply to ]
On Mon, 25 Oct 2004 05:17:02 -0400, Chris Phoenix <cphoenix@crnano.org> wrote:
> [cut]
> Now the URL for the ?'d one ends in %3F but goes to the page without the
> ?. And when I try to delete the ?'d one, I can't (not that I ever
> could). And it's in a category, so I'm hesitant to hack it out of the
> database until I know exactly what to do to keep things consistent.
> [cut]

This can easily be solved by removing all links to or from it, setting
the page to "", etc. This should update everything except the page
index. (of course, this doesn't help with old versions).

Also, try the url
http://wise-nano.org/w?title=Is_there_a_superweapon%3F&action=delete

--
-------------------------------------------------------------------
http://endeavour.zapto.org/astro73/
Thank you to JosephM for inviting me to Gmail!
Re: Deleting article with ? in title [ In reply to ]
Thanks. You correctly identified the problem. I've now got the
following rules:

RewriteRule ^$ w
RewriteRule ^w/stylesheets/(.*)$ path/stylesheets/$1 [L]
RewriteRule ^w/images/(.*)$ path/images/$1 [L]
RewriteRule ^w/(.*)$ path/index.php?title=$1 [L]
RewriteRule ^w(.*)$ path/index.php$1 [L]

I think my host's Apache is quite broken. [L] doesn't stop processing
(but doesn't seem to hurt anything). The reason my directory is called
"path" instead of "wiki" is that a rule of

RewriteRule ^w(.*)$ wiki/index.php$1 [L]

will be applied multiple times (because 'wiki' starts with 'w'),
expanding to wiki/index.phpiki/index.phpiki/index.php... until Apache
throws an error. The recommended .htaccess file on the MediaWiki pages
doesn't work for this reason.

When I tried to replace the final rule (with the bare w) with the rule:

RewriteRule ^w?(.*)$ wiki/index.php?$1 [L]

then http://wise-nano.org/w/Article served back the main page without
style sheets, although all the other rules were unchanged. Go figure.

The RewriteCond feature doesn't seem to work at all.

But my rules seem to work OK, so the problem is "solved."

Chris


Brion Vibber wrote:

> On Oct 25, 2004, at 2:17 AM, Chris Phoenix wrote:
>
>> I initially created the ?'d article. The system doesn't deal well
>> with that. When I edited and saved the page, the page after the save
>> said "There's no text here."
>
>
> Your rewrite rules are broken; you're probably sending the unescaped URL
> to index.php/$1, which will turn the ? and anything after it into a
> query string parameter.
>
> Unfortunately Apache's mod_rewrite doesn't really deal with
> unescaping/reescaping in a sane fashion. If you change it to
> index.php?title=$1 then the ? case should work, but & will similarly
> fail, unless you patch Apache (there is a patch for Apache 1.x in the
> maintenance/ directory which adds an 'ampescape' function which escapes
> & to %26)
>
> -- brion vibber (brion @ pobox.com)
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l@Wikimedia.org
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l

--
Chris Phoenix cphoenix@CRNano.org
Director of Research
Center for Responsible Nanotechnology http://CRNano.org
Re: Deleting article with ? in title [ In reply to ]
On Oct 27, 2004, at 9:34 AM, Chris Phoenix wrote:
> I think my host's Apache is quite broken. [L] doesn't stop processing
> (but doesn't seem to hurt anything).

Weird...

> The reason my directory is called "path" instead of "wiki" is that a
> rule of
>
> RewriteRule ^w(.*)$ wiki/index.php$1 [L]

That's a pretty odd rule: it will match any URL starting with a 'w' and
indiscriminately paste the remainder to the end of "index.php". What's
it for?

> When I tried to replace the final rule (with the bare w) with the rule:
>
> RewriteRule ^w?(.*)$ wiki/index.php?$1 [L]

This will match any URL at all, whether it has a 'w' at the start or
not. (The ? means 'the previous character might or might not be
there'.)

-- brion vibber (brion @ pobox.com)