Template talk:Misnamed image
From YPPedia
Okay, so I decided to try to make this template better (key word= try ;) ). It didn`t work, and what ended up happening was Image:Whoops.png, I don`t know how to get this NOT to happen, I just wanted to add a direct link to uploading the file, to skip a step if you`re reuploading it. Thanks! --Addihockey (talk•contribs) 18:06, 3 October 2010 (UTC)
- Fixed --Addihockey (talk•contribs) 21:15, 3 October 2010 (UTC)
Thought about a change
I wonder if it's possible to change the template so it can detect if an image name has been corrected but the template is still there (such as after an image is moved). --Thunderbird 06:23, 9 January 2017 (UTC)
- I added an if-statement to compare the suggested name to the current name. I used the page name variable that uses underscores instead of blanks, since the place I've been copying-and-pasting destination filenames from uses underscores. I'm not sure whether or not it's worth tweaking it so it will work regardless of whether variable 1 has underscores or blanks. None of the few misnamed images I glanced at had spaces, but... meh. I should probably make it works with either, but I'm foggy and I need a break. --Budclare2 18:35, 9 January 2017 (UTC)
- Thank you for that. No idea how I didn't think of that, but it was late at night and after having spent as many edits as I did to get the move link in there (there's a reason I did it in a sandbox!), it was probably better that I didn't try to mess with yet another thing late at night. --Thunderbird 19:09, 9 January 2017 (UTC)
- Late-night editing is fun, right? You never know what your brain is going to do next. ;) Thanks for moving all those screenshots for me, btw. I didn't mean to put them off until there were so many. --Budclare2 01:28, 11 January 2017 (UTC)
- Looks like the comparison booches if the destination name has an apostrophe (spaces are fine, since the default encoding changes them to underscores), which is similar to the issue I was getting with my move link. But then again, the associated categories don't even update until the page gets another edit anyway, but that's because of another unknown issue going on. --Thunderbird 22:08, 11 January 2017 (UTC)
- Okay, I think I fixed the apostrophe issue for my if statement (and I think the blanks versus underscore issue, too), though I might test it a bit more to be sure. Not sure about your issue yet; I haven't managed to replicate the %2527 yet. --Budclare2 01:28, 12 January 2017 (UTC)
- At this point I'm not too bothered. For when it does occur (I caught it on parentheses too), I can just remove the "25" from the URL in the browser bar and get the right link. The main goal of adding the move link was to make it easier to correct misnamed images when the correct filename was already provided, and it's quite a bit quicker now. The curious part is why the link name for the Special:Upload stuff is not affected by the issue. Ah, the wonders of technology! --Thunderbird 03:00, 13 January 2017 (UTC)
- It shouldn't be happening at all, though. It's not a big deal this time, but updating images with punctuation has been a problem for ages now. I can work around it easily enough, but everyone else who tries it gets bitten on the butt (because you have to run into the problem more than once or twice a year to remember how to fix it). I saw a couple places on mediawiki that said the urls are supposed to be encoded by the server when needed, which logically means it's supposed to be checking the strings first. So why is ours compulsively re-encoding things? Argh. (I should start mock-spanking the server again. It accomplishes nothing, but is somewhat satisfying.) --Budclare2 03:39, 18 January 2017 (UTC)
- At this point I'm not too bothered. For when it does occur (I caught it on parentheses too), I can just remove the "25" from the URL in the browser bar and get the right link. The main goal of adding the move link was to make it easier to correct misnamed images when the correct filename was already provided, and it's quite a bit quicker now. The curious part is why the link name for the Special:Upload stuff is not affected by the issue. Ah, the wonders of technology! --Thunderbird 03:00, 13 January 2017 (UTC)
- Okay, I think I fixed the apostrophe issue for my if statement (and I think the blanks versus underscore issue, too), though I might test it a bit more to be sure. Not sure about your issue yet; I haven't managed to replicate the %2527 yet. --Budclare2 01:28, 12 January 2017 (UTC)
- Thank you for that. No idea how I didn't think of that, but it was late at night and after having spent as many edits as I did to get the move link in there (there's a reason I did it in a sandbox!), it was probably better that I didn't try to mess with yet another thing late at night. --Thunderbird 19:09, 9 January 2017 (UTC)