Page 2 of 2

Re: [BUG] Faulty IMSLP/WIMA redirections

Posted: Tue Dec 27, 2011 4:39 pm
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.

Re: [BUG] Faulty IMSLP/WIMA redirections

Posted: Tue Dec 27, 2011 5:19 pm
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.

Re: [BUG] Faulty IMSLP/WIMA redirections

Posted: Wed Dec 28, 2011 9:52 pm
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.

Re: [BUG] Faulty IMSLP/WIMA redirections

Posted: Thu Dec 29, 2011 4:55 am
by imslp
At the very latest the end of January, though I'll try to see if I can do it before then.

Re: [BUG] Faulty IMSLP/WIMA redirections

Posted: Thu Dec 29, 2011 9:08 am
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/'?

Re: [BUG] Faulty IMSLP/WIMA redirections

Posted: Thu Dec 29, 2011 3:59 pm
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

Re: [BUG] Faulty IMSLP/WIMA redirections

Posted: Thu Dec 29, 2011 9:27 pm
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'

Re: [BUG] Faulty IMSLP/WIMA redirections

Posted: Wed Jan 04, 2012 7:48 am
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).

Re: [BUG] Faulty IMSLP/WIMA redirections

Posted: Wed Jan 04, 2012 4:11 pm
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.

Re: [BUG] Faulty IMSLP/WIMA redirections

Posted: Thu Jan 05, 2012 10:23 am
by imslp
I think you are missing a blackslash at the end of "/scores1"

Re: [BUG] Faulty IMSLP/WIMA redirections

Posted: Thu Jan 05, 2012 3:06 pm
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.

Re: [BUG] Faulty IMSLP/WIMA redirections

Posted: Tue Mar 06, 2012 5:35 pm
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...
:(

Re: [BUG] Faulty IMSLP/WIMA redirections

Posted: Mon Dec 10, 2012 6:41 pm
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.

Re: [BUG] Faulty IMSLP/WIMA redirections

Posted: Tue Dec 11, 2012 10:56 pm
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.