Ticket #883 (closed task: fixed)

Opened 7 years ago

Last modified 3 years ago

Fix MediaWiki to use 302s for redirects

Reported by: ianweller Owned by: puiterwijk
Priority: major Milestone: Fedora 18
Component: Web Application Version:
Severity: Normal Keywords:
Cc: Blocked By:
Blocking: Sensitive:


The Websites team has deemed that it might be a good idea for MediaWiki? to actually redirect the browser to the new URL for a page upon a #REDIRECT Whatever? in the wiki.

The way to do this would be to replace the necessary redirection code with whatever needs to happen to make a 302 occur, and go to the right place.

This would require patching MediaWiki? at the least, and I'd recommend sending the patch upstream. I take a look at the code when I can, but often I don't have the time to do so. It might be good to talk with upstream and all the other necessary people to get this done.

Change History

comment:1 Changed 7 years ago by ianweller

By the way, I hate Trac's syntax.

comment:2 Changed 7 years ago by mmcgrath

heh. So here's the scoop on this. If its not something we can do with mediawiki configs in some way (IE: its supported) then its not worth us fixing it unless we work with upstream to patch it somehow.

My understanding is they can't support this because editing the page after its in redirect mode becomes difficult. (IE you can't get to it to edit it) I'd like independent verification though from someone else.

comment:3 Changed 7 years ago by ianweller

Yeah, we're going to need to patch it, from what we can tell.

I don't think that the problem with the redirection exists, as when you click the link to go back to the redirected-from page (I'm horrible at describing this sort of thing) the GET variable 'redirect' is passed with the value 'no'. Theoretically the PHP could detect this and decide not to send the 302 header.

comment:5 Changed 7 years ago by ianweller

  • Status changed from new to assigned
  • Milestone changed from Fedora 11 to Fedora 12

not gonna be in done in time for F11, but will come up with a patch for upstream.

comment:6 Changed 7 years ago by ianweller

Look what I found (er, wrote)!


It's in the process of being packaged. It's a damn good thing I can be certain of the license! ;)

comment:7 Changed 6 years ago by ianweller

FYI all, this is in Fedora and EPEL now. Someone should probably sanity check it.

comment:8 Changed 5 years ago by kevin

What ever happened here? :)

comment:9 Changed 5 years ago by ianweller

I wrote the above extension and packaged it, but I have no clue if it's actually compatible with MediaWiki? 1.16. I don't see why it wouldn't be, but I don't have the spare cycles to test it right now.

comment:10 Changed 3 years ago by puiterwijk

  • Owner changed from ianweller to puiterwijk
  • Status changed from assigned to new
  • Milestone changed from Fedora 12 to Fedora 18

I will take over upstream and update it to MediaWiki? 1.19 (current version), and re-package it soon.

comment:11 Changed 3 years ago by puiterwijk

  • Status changed from new to assigned

I have rewritten it for MediaWiki? 1.19.

Review request: https://bugzilla.redhat.com/show_bug.cgi?id=847484

comment:12 Changed 3 years ago by puiterwijk

The review request has been approved, and the update requested in Bodhi.

Update: https://admin.fedoraproject.org/updates/mediawiki119-HTTP302Found-2.0.1-2.el6

comment:13 Changed 3 years ago by kevin

So, I guess the next step is to test this in stg and if everything works wait until the freeze is over and apply to production...

comment:14 Changed 3 years ago by puiterwijk

This has now been deployed to staging.

An example redirect: https://stg.fedoraproject.org/wiki/Puiterwijk

This should redirect to https://stg.fedoraproject.org/wiki/User:Puiterwijk?rd=Puiterwijk

comment:15 Changed 3 years ago by kevin

Seems to work here. ;)

comment:16 Changed 3 years ago by puiterwijk

  • Status changed from assigned to closed
  • Resolution set to fixed

This plugin has been moved to production.

comment:17 Changed 3 years ago by adamwill

nirik pointed me to this ticket. I *really* don't like this behaviour, and I explained why here:


Note: See TracTickets for help on using tickets.