I still think the script should disallow redirects to redirects, but anyways, here's a small bug: (if you think it's a big one I'll add it to bug tracker)
It does ignore double-redirects, and always has. I don't know what you mean by "disallow"...I could intercept the page-save function and check to see if the page being saved is a redirect to a redirect and fail to save it, but that would be throw away user edits that might be valuable, and it still wouldn't catch the case where the user saved a redirect to a full page, then edited that full page to be a redirect.
The reason I only went three levels of recursion on the what links here page is that that's enough to spot double-redirects and fix them.
[what links here] is not correct because the redirect from "Redirect to a redirect" is missing.
You somehow managed to create the "Redirect to a redirect" page without updating the link tables. I'm curious how you managed that. When I edited that article and resaved it. it worked fine. 0
On Fri, Jul 05, 2002 at 08:26:09AM -0700, lcrocker@nupedia.com wrote:
I still think the script should disallow redirects to redirects, but anyways, here's a small bug: (if you think it's a big one I'll add it to bug tracker)
It does ignore double-redirects, and always has. I don't know what you mean by "disallow"...I could intercept the page-save function and check to see if the page being saved is a redirect to a redirect and fail to save it, but that would be throw away user edits that might be valuable, and it still wouldn't catch the case where the user saved a redirect to a full page, then edited that full page to be a redirect.
The simplest would be just to not allow the edit of turning a page X into a redirect to Y if
1. Y is a redirect, or 2. there is a page Z that redirects to X
and show a message that redirects to redirects are not allowed. The only thing that would be lost is the text of the redirect. If this happens and the user want to make the redirect anyway then he or she should
1. see where Y redirects and redirect X to that, and 2. change all redirects to X to redirects to Y if Y is not a redirect or to Y' if Y is a redirect to Y'.
It's the (2.) part that is probably the most annoying and it would be the most elegant if this was automated for the user and the script would automatically short-circuit all indirect redirects this way when saving a page. The biggest problem I see (apart from the extra work for you) is that this save will then possibly affect more pages than just the saved page. Note that you only need to know what Y redirects to and which pages redirect to X, assuming that there are no indirect redirects in the database. Another nice property is that once this works you can remove all indirect redirects by saving them all like this once.
[what links here] is not correct because the redirect from "Redirect to a redirect" is missing.
You somehow managed to create the "Redirect to a redirect" page without updating the link tables. I'm curious how you managed that. When I edited that article and resaved it. it worked fine.
Here's my recipe: - created on 'user:Jan Hidders' the links 'Blurp1' and 'Blurp2' - made Blurp1 redirect to Blurp2, and vice versa - result of "what links here" for 'Blurp2': "no pages link here" - result for 'Blurp1': "* Blurp2 (redirect page) - after a resave of Blurp1 "w.l.h" says: * Blurp2 (redirect page) o Blurp1 (redirect page) * Blurp2 (redirect page) - and w.l.h. on Blurp2 then says: * Blurp1 (redirect page) o Blurp2 (redirect page) * Blurp1 (redirect page - Note: the link from "user:Jan Hidders" is still missing - after an extra save of "user:Jan Hidders" this is remedied
Kind regards,
-- Jan Hidders
wikipedia-l@lists.wikimedia.org