[BUG] Faulty IMSLP/WIMA redirections

Moderators: kcleung, Wiki Admins

imslp
Site Admin
Posts: 1642
Joined: Thu Jan 01, 1970 12:00 am

Re: [BUG] Faulty IMSLP/WIMA redirections

Post by imslp »

Would it be possible for you to add /bounce/ to the beginning of the URL instead of changing it to /scores1/? I.e., /bounce/scores/asola/Asola_O-Vos-Omnes-SAB.pdf I ask this just because /scores/ is part of the URL, and changing it is slightly more messy than appending /bounce/ in front.

Otherwise, I've already fixed it in the code, should go live on the next update cycle.
reccmo
active poster
Posts: 269
Joined: Mon Aug 08, 2011 8:54 am
notabot: 42
notabot2: Human
Location: Aarhus, Denmark
Contact:

Re: [BUG] Faulty IMSLP/WIMA redirections

Post by reccmo »

imslp wrote:Would it be possible for you to add /bounce/ to the beginning of the URL instead of changing it to /scores1/? I.e., /bounce/scores/asola/Asola_O-Vos-Omnes-SAB.pdf I ask this just because /scores/ is part of the URL, and changing it is slightly more messy than appending /bounce/ in front.
Done. There is now a directory 'http://icking-music-archive.org/bounce/' containing a symlink to 'http://icking-music-archive.org/scores'. So all URLS like 'http://icking-music-archive.org/bounce/ ... oo/bar.pdf' will be valid provided the URL 'http://icking-music-archive.org/scores/foo/bar.pdf' is valid.
imslp wrote:Otherwise, I've already fixed it in the code, should go live on the next update cycle.
reccmo
active poster
Posts: 269
Joined: Mon Aug 08, 2011 8:54 am
notabot: 42
notabot2: Human
Location: Aarhus, Denmark
Contact:

Re: [BUG] Faulty IMSLP/WIMA redirections

Post by reccmo »

reccmo wrote:
imslp wrote:Would it be possible for you to add /bounce/ to the beginning of the URL instead of changing it to /scores1/? I.e., /bounce/scores/asola/Asola_O-Vos-Omnes-SAB.pdf I ask this just because /scores/ is part of the URL, and changing it is slightly more messy than appending /bounce/ in front.
Done. There is now a directory 'http://icking-music-archive.org/bounce/' containing a symlink to 'http://icking-music-archive.org/scores'. So all URLS like 'http://icking-music-archive.org/bounce/ ... oo/bar.pdf' will be valid provided the URL 'http://icking-music-archive.org/scores/foo/bar.pdf' is valid.
imslp wrote:Otherwise, I've already fixed it in the code, should go live on the next update cycle.
How often does that update cycle take place? The generic redirect still has the reported error prone behavior.
imslp
Site Admin
Posts: 1642
Joined: Thu Jan 01, 1970 12:00 am

Re: [BUG] Faulty IMSLP/WIMA redirections

Post by imslp »

At the very latest the end of January, though I'll try to see if I can do it before then.
reccmo
active poster
Posts: 269
Joined: Mon Aug 08, 2011 8:54 am
notabot: 42
notabot2: Human
Location: Aarhus, Denmark
Contact:

Re: [BUG] Faulty IMSLP/WIMA redirections

Post by reccmo »

imslp wrote:At the very latest the end of January, though I'll try to see if I can do it before then.
When you perform the update please consider making the generic redirect code readable in http://imslp.org/wiki/Special:WIMALookup. That might be helpful for me and Max for maintaining the corresponding WIMA server side code.

I suppose bounced WIMA files will be prefixed with '/bounce/'?
imslp
Site Admin
Posts: 1642
Joined: Thu Jan 01, 1970 12:00 am

Re: [BUG] Faulty IMSLP/WIMA redirections

Post by imslp »

reccmo wrote:
imslp wrote:At the very latest the end of January, though I'll try to see if I can do it before then.
When you perform the update please consider making the generic redirect code readable in http://imslp.org/wiki/Special:WIMALookup. That might be helpful for me and Max for maintaining the corresponding WIMA server side code.
I'm not sure I understand what you mean by "generic redirect code"...
I suppose bounced WIMA files will be prefixed with '/bounce/'?
Yes
reccmo
active poster
Posts: 269
Joined: Mon Aug 08, 2011 8:54 am
notabot: 42
notabot2: Human
Location: Aarhus, Denmark
Contact:

Re: [BUG] Faulty IMSLP/WIMA redirections

Post by reccmo »

imslp wrote:I'm not sure I understand what you mean by "generic redirect code"...
I'm referring to the code used in 'http://imslp.org/wiki/Special:WIMALookup'
imslp
Site Admin
Posts: 1642
Joined: Thu Jan 01, 1970 12:00 am

Re: [BUG] Faulty IMSLP/WIMA redirections

Post by imslp »

This is now implemented in Special:WIMALookup. However, there is still a redirect loop for non-existent files, because /bounce/ still redirects back to IMSLP, which it should never do (all errors, e.g. non-existent files, must be processed on WIMA's server to prevent the redirect loop).
reccmo
active poster
Posts: 269
Joined: Mon Aug 08, 2011 8:54 am
notabot: 42
notabot2: Human
Location: Aarhus, Denmark
Contact:

Re: [BUG] Faulty IMSLP/WIMA redirections

Post by reccmo »

imslp wrote:This is now implemented in Special:WIMALookup. However, there is still a redirect loop for non-existent files, because /bounce/ still redirects back to IMSLP, which it should never do (all errors, e.g. non-existent files, must be processed on WIMA's server to prevent the redirect loop).
On the WIMA server the redirects are now handled like this
I've successfully performed a couple of WIMA->IMSLP transfers with the above outlined method taken into production. Please let me know if I overlooked any pitfalls.
imslp
Site Admin
Posts: 1642
Joined: Thu Jan 01, 1970 12:00 am

Re: [BUG] Faulty IMSLP/WIMA redirections

Post by imslp »

I think you are missing a blackslash at the end of "/scores1"
reccmo
active poster
Posts: 269
Joined: Mon Aug 08, 2011 8:54 am
notabot: 42
notabot2: Human
Location: Aarhus, Denmark
Contact:

Re: [BUG] Faulty IMSLP/WIMA redirections

Post by reccmo »

imslp wrote:I think you are missing a blackslash at the end of "/scores1"
When WIMA's Apache server receives a file request in the folder 'http://icking-music-archive.org/bounce/' it looks like

scores/foo/bar.pdf

Hence the php regex replacement function

preg_replace('/scores/','',$filename_in,1)

will return

/foo/bar.pdf

That's why I omit a trailing slash at '/scores1': the redirect address is a concatenation of '/scores1' and the string returned by preg_replace.
jeko89
Posts: 5
Joined: Tue Oct 04, 2011 12:23 pm
notabot: 42
notabot2: Human

Re: [BUG] Faulty IMSLP/WIMA redirections

Post by jeko89 »

Hi everybody,
I raised the problem months ago but I don't think is solved:
The last PDF by Brodersen at page http://icking-music-archive.org/ByComposer/Altnikol.php still doesn't link back to IMSLP....and I suppose it happens to many others...
:(
Carlos M
Posts: 1
Joined: Mon Dec 10, 2012 5:15 pm
notabot: 42
notabot2: Human

Re: [BUG] Faulty IMSLP/WIMA redirections

Post by Carlos M »

I've reported a related bug at the wiki but here is probably the best place to discuss it: composer redirections from WIMA sometimes end up on a nonexistent page at IMSLP, because of faulty character conversion. This only happens for composer names that contain language-specific characters:

http://icking-music-archive.org/ByComposer/Couperin.php
http://icking-music-archive.org/ByComposer/Boely.php

There are many articles on Wikipedia which still point to such pages.
reccmo
active poster
Posts: 269
Joined: Mon Aug 08, 2011 8:54 am
notabot: 42
notabot2: Human
Location: Aarhus, Denmark
Contact:

Re: [BUG] Faulty IMSLP/WIMA redirections

Post by reccmo »

Carlos M wrote:I've reported a related bug at the wiki but here is probably the best place to discuss it: composer redirections from WIMA sometimes end up on a nonexistent page at IMSLP, because of faulty character conversion. This only happens for composer names that contain language-specific characters:

http://icking-music-archive.org/ByComposer/Couperin.php
http://icking-music-archive.org/ByComposer/Boely.php

There are many articles on Wikipedia which still point to such pages.
I believe the error was due to corrupted character encoding (latin1/utf-8) corrupted during file transfer between linux servers. I've been using wget to check all WIMA/IMSLP redirects through a perl script. The result was this list of WIMA composer pages with non working redirects

Albeniz.php
M.Albeniz.php
Amann.php
Ahlstroem.php
Baekgaard.php
Benaut.php
J.Bloch.php
Boellmann.php
Boely.php
Boeddecker.php
Bridgham.php
Calviere.php
Campra.php
Clerambault.php
Couperin.php
dAgincourt.php
Dominguez.php
Droste-Huelshoff.php
Dvorak.php
Foerster.php
Galles.php
Grueber.php
Jomelli.php
A.Klein.php
Kuehnel.php
Lange.php
Lefebure-Wely.php
Lenzi.php
Macque.php
Milan.php
Miramontes.php
Mondonville.php
Mueller.php
Narvaez.php
Oginski.php
Pedersen.php
Perez.php
Philidor.php
C.Raehs.php
Raehs.php
Rosenmueller.php
Selma.php
Sussmayr.php
Szervac.php
Vivanco.php

I've edited the redirects of these pages and moved the redirect source to WIMA's database.

Please let me know if (or rather when) you encounter new redirect flaws.
Post Reply