[BUG] Faulty IMSLP/WIMA redirections
Moderators: kcleung, Wiki Admins
Re: [BUG] Faulty IMSLP/WIMA redirections
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.
Otherwise, I've already fixed it in the code, should go live on the next update cycle.
-
- 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
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: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.
imslp wrote:Otherwise, I've already fixed it in the code, should go live on the next update cycle.
Christian Mondrup
http://imslp.org/wiki/Category:WIMA_files
http://imslp.org/wiki/Category:WIMA_files
-
- 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
How often does that update cycle take place? The generic redirect still has the reported error prone behavior.reccmo wrote: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: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.
imslp wrote:Otherwise, I've already fixed it in the code, should go live on the next update cycle.
Christian Mondrup
http://imslp.org/wiki/Category:WIMA_files
http://imslp.org/wiki/Category:WIMA_files
Re: [BUG] Faulty IMSLP/WIMA redirections
At the very latest the end of January, though I'll try to see if I can do it before then.
-
- 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
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.imslp wrote:At the very latest the end of January, though I'll try to see if I can do it before then.
I suppose bounced WIMA files will be prefixed with '/bounce/'?
Christian Mondrup
http://imslp.org/wiki/Category:WIMA_files
http://imslp.org/wiki/Category:WIMA_files
Re: [BUG] Faulty IMSLP/WIMA redirections
I'm not sure I understand what you mean by "generic redirect code"...reccmo wrote: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.imslp wrote:At the very latest the end of January, though I'll try to see if I can do it before then.
YesI suppose bounced WIMA files will be prefixed with '/bounce/'?
-
- 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
I'm referring to the code used in 'http://imslp.org/wiki/Special:WIMALookup'imslp wrote:I'm not sure I understand what you mean by "generic redirect code"...
Christian Mondrup
http://imslp.org/wiki/Category:WIMA_files
http://imslp.org/wiki/Category:WIMA_files
Re: [BUG] Faulty IMSLP/WIMA redirections
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).
-
- 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
On the WIMA server the redirects are now handled like thisimslp 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).
- The .htaccess file in the scores root folder, 'http://icking-music-archive.org/scores/' includes a handler for .pdf- and audio files
Code: Select all
RewriteEngine on RewriteRule ^(.*)\.(pdf|mp3|mid|midi)$ /Redirect.php?file=$1.$2 [R,L]
- The php script pointed to, 'http://icking-music-archive.org/Redirect.php' says
Code: Select all
$start_dir = "/scores/"; $imslp_url = "http://imslp.org/index.php?title=Special:WIMALookup&url="; $filename = $_GET['file']; header("location: ".$imslp_url.$start_dir.$filename);
- If the URL returned by 'Special:WIMALookup' points to a file transferred to IMSLP then we end up at the IMSLP work page in question,
else we end up at the WIMA folder 'http://icking-music-archive.org/bounce/' - The folder, 'http://icking-music-archive.org/bounce/' contains nothing but a .htaccess file
Code: Select all
RewriteEngine on RewriteRule ^(.*)\.(.*) /Bounce.php?file=$1.$2 [R,L]
- The php script pointed to, 'http://icking-music-archive.org/Bounce.php' says
Code: Select all
$start_dir = "/scores1"; $filename_in = $_GET['file']; $filename_out = $start_dir . preg_replace('/scores/','',$filename_in,1); header("location: ".$filename_out);
- The folder, 'http://icking-music-archive.org/scores1/' contains symbolic links to all the folder inodes in 'http://icking-music-archive.org/scores/' plus a .htaccess file with 'not-found' handlers. Due to the symlinked folder inodes valid URLs within 'http://icking-music-archive.org/scores/' are also valid within 'http://icking-music-archive.org/scores1/'. But there is no redirection handler in this folder which could cause infinite loops.
Christian Mondrup
http://imslp.org/wiki/Category:WIMA_files
http://imslp.org/wiki/Category:WIMA_files
Re: [BUG] Faulty IMSLP/WIMA redirections
I think you are missing a blackslash at the end of "/scores1"
-
- 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
When WIMA's Apache server receives a file request in the folder 'http://icking-music-archive.org/bounce/' it looks likeimslp wrote:I think you are missing a blackslash at the end of "/scores1"
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.
Christian Mondrup
http://imslp.org/wiki/Category:WIMA_files
http://imslp.org/wiki/Category:WIMA_files
Re: [BUG] Faulty IMSLP/WIMA redirections
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...
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
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.
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.
-
- 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
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 redirectsCarlos 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.
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.
Christian Mondrup
http://imslp.org/wiki/Category:WIMA_files
http://imslp.org/wiki/Category:WIMA_files