FANDOM


(Invalid File Extension)
(Ghost Move bug: new section)
Line 111: Line 111:
 
Manually adding some replacements to the queue, if one tries to replace a PNG with a JPEG or vice-versa, it will say "Invalid file extension." I know Wikia doesn't let you replace files of one type with another or rename them with a different extension, but replacing uses of one file type with another shouldn't be a problem.[[User:JoshuaJSlone|JoshuaJSlone]] ([[User talk:JoshuaJSlone|talk]]) 08:35, January 5, 2015 (UTC)
 
Manually adding some replacements to the queue, if one tries to replace a PNG with a JPEG or vice-versa, it will say "Invalid file extension." I know Wikia doesn't let you replace files of one type with another or rename them with a different extension, but replacing uses of one file type with another shouldn't be a problem.[[User:JoshuaJSlone|JoshuaJSlone]] ([[User talk:JoshuaJSlone|talk]]) 08:35, January 5, 2015 (UTC)
 
:You make a good point. I've removed the file extension checking for manual adds. — [[User:Foodbandlt|Foodbandlt]] ([[User talk:Foodbandlt|talk]]) 13:26, January 5, 2015 (UTC)
 
:You make a good point. I've removed the file extension checking for manual adds. — [[User:Foodbandlt|Foodbandlt]] ([[User talk:Foodbandlt|talk]]) 13:26, January 5, 2015 (UTC)
  +
  +
== Ghost Move bug ==
  +
  +
First, thanks for implementing previous suggestions.
  +
  +
Second, I've just had an especially weird bug. I had a queue of 6 files to be moved and references to them updated. It gave failures on 4 of them, which seemed a bit crazy--so I went to try moving them each individually, but there was no longer anything there. I checked the move logs and delete logs, but there was no trace of them--just the move records from the two files that did get moved. However, I did find that those other 4 files did still exist, at their new names--they just didn't leave behind a redirect, any trace in logs, or get their page uses automatically changed.[[User:Robo Kiss|Robo Kiss]] ([[User talk:Robo Kiss|talk]]) 06:46, January 13, 2015 (UTC)

Revision as of 06:46, January 13, 2015

Suggestions

I know that there are definitely things that could be improved in this script, and if you see anything that is immediately obvious, please tell me! I enjoy learning better coding techniques as I fix things, and would appreciate any feedback. Thanks! --Foodbandlt 22:00, February 15, 2013 (UTC)

Example

A live example would be good. leviathan_89 09:40, June 18, 2013 (UTC)

I actually wanted to throw in a live example, but that would require adding the "movefile" right to the * usergroup on my test wiki to allow anyone to move files. I suppose I'll contact Staff to do that. --Foodbandlt 12:26, June 18, 2013 (UTC)
Or you can post a link to a wiki where it's used. leviathan_89 17:34, June 18, 2013 (UTC)
This script adds functionality to Special:MovePage when moving a file. You wouldn't be able to see or use it without the "move" and "movefile" rights. --Foodbandlt 18:36, June 18, 2013 (UTC)

Batch Renaming

I would love to see the ability to rename a bunch of images at once then have there file links updated.

Icecreamcaekbot talkcontrib 19:59, June 19, 2013 (UTC)

I'll look into reworking some of the code to accommodate this. I've been meaning to rework that part for a while now anyway, and that would allow for things like this. --Foodbandlt 18:18, June 21, 2013 (UTC)

Minified

Seeing as this script cannot be used without MediaWiki, is there any reason to have a minified version when ResourceLoader automatically minifies and strips comments from scripts? cqm 08:49, 8 Jul 2013 (UTC)

There was something in one of the previous versions that broke the script when it was minified with importArticles, and importScript does not minify anything. For whatever reason, it wasn't broken when I minified it myself. I'm rewriting the script right now and making sure all syntax is correct, so I'll test it with importArticles again once I'm done. --Foodbandlt 04:18, July 9, 2013 (UTC)

Templates

Is it possible to make this script work for templates?  Staw-Hat Luffy  Talk  12:11, September 9, 2013 (UTC)

Yes, although it would take a lot of editing and would be a little more dangerous because templates don't require additional user rights to move on most wikis. It's a little bit more efficient in the long run to just leave a redirect seeing as the Template namespace isn't usually as crowded as the File namespace. If I were to edit this to work with templates, I would be more inclined to make it an entirely separate script... but I don't have the time to do that right now. — Foodbandlt (talk) 12:53, September 9, 2013 (UTC)
Alright, thanks for the fast reply!  Staw-Hat Luffy  Talk  16:28, September 9, 2013 (UTC)

Work

How do I get it to work? I can't add stuff to the queue. -- WM 23:20, September 9, 2013 (UTC)

Well, what do you see? Do the buttons and the Queue dropdown option appear for you? What browser are you using? Have you cleared your cache? — Foodbandlt (talk) 23:24, September 9, 2013 (UTC)
I am using Chrome on a Windows. I tried it on both the incognito and regular modes. The queue dropdown option appears. I have cleared my cache also. -- WM 23:20, September 9, 2013 (UTC)
This script adds buttons to Special:MovePage (which is the page that you use to rename files). You add things to the queue through Special:MovePage, then manage the queue through said dropdown option. — Foodbandlt (talk) 23:36, September 9, 2013 (UTC)
And I assume you need to be an admin on the Wiki to make it work, correct? -- WM 23:39, September 9, 2013 (UTC)
You only need to have the rights to move files, so you don't necessarily need to be an administrator. If the "Rename" option appears in the dropdown on any File page, then you have said rights. — Foodbandlt (talk) 23:41, September 9, 2013 (UTC)
Okay. Thanks for the explanation. I would suggest adding this to the main article so others won't have the same confusion. -- WM 23:44, September 9, 2013 (UTC)
Will do, thanks for the suggestion! — Foodbandlt (talk) 23:45, September 9, 2013 (UTC)

"Invalid file extension"

Hi, even though the script is great and has saved me many hours, there seems to be a problem. When i try to rename a .PNG file and make it.png, it won't let me. It says "Invalid file extension". Is it possible to fix that?  Staw-Hat Luffy  Talk  07:28, September 10, 2013 (UTC)

Woops, sorry about that. Looks like I forgot to make it case-insensitive. I'll throw an update out a little later today. — Foodbandlt (talk) 12:03, September 10, 2013 (UTC)
Ok, thanks!  Staw-Hat Luffy  Talk  14:16, September 10, 2013 (UTC)
Done. — Foodbandlt (talk) 21:41, September 10, 2013 (UTC)

Bot flag

Is possible to add a bot flag option? Given that the user has the power to flag bot himself, of course. leviathan_89 15:09, September 14, 2013 (UTC)

Yes, it's entirely possible. I've opted to let people decide that themselves because it would spam the user rights logs with every single rename performed. If it's something you'd like to see in this script, let me know and I'll try to find the best way to include it. On my home wiki I actually wrote this to make switching your bot flag a little easier because of the amount of entries something like this script makes on Special:RecentChanges. — Foodbandlt (talk) 06:11, September 15, 2013 (UTC)
Actually, looking back at it I might've misunderstood your question. The above response goes as far as adding the bot flag to the account, but if you're talking about the edits being made by the script being submitted as bot edits then that already exists. If the bot flag on an account is set, all edits made will appear as bot edits. — Foodbandlt (talk) 18:05, September 15, 2013 (UTC)
Not true. Even if the user editing is a bot, the edits will only show up as a bot if you specify &bot=1 specifically in the api. --Kangaroopowah (Talk) 20:38, September 15, 2013 (UTC)
I said that because I did indeed specify that. — Foodbandlt (talk) 21:04, September 15, 2013 (UTC)

Bug

Every page that it updates a link on gets added to Category:Pages with broken file links. The pages disappear from that list as soon as the page is edited (even just changing nothing and hitting publish). So it's an easy fix, but it shouldn't need to be done in the first place. —RyaNayR (talk) 23:51, November 11, 2013 (UTC)

Using "Rename and replace", this is the case because the pages are edited before the file is moved. This is done out of simplicity and to still utilize Wikia's built-in move page, but I've already written the function that does its job for the queue function so I'll change that with the next update I do to this script. I assume you are talking about "Rename and replace", right? — Foodbandlt (talk) 02:09, November 12, 2013 (UTC)
Yes, it happens when I use "Rename and replace". So wait, you mean if I use the queue instead, that won't happen? —RyaNayR (talk) 04:36, November 12, 2013 (UTC)
I'm not saying it'll never happen when you use the queue, I'm saying it's far less likely for it to happen. Depending on the speed of Wikia's servers and number of files moved, there's always a chance that it will happen but it's far less than its guaranteed happening in Rename and replace. I don't want to force you to use the queue over Rename and replace, so I'll be throwing an update out some time in the next week. Thanks for the suggestion! — Foodbandlt (talk) 05:31, November 12, 2013 (UTC)
No prob. And thanks for the soon-to-come update! —RyaNayR (talk) 06:03, November 12, 2013 (UTC)
Long time past due, but I've just put out a major update that includes what we discussed here. Sorry for the inconvenience. — Foodbandlt (talk) 06:44, April 10, 2014 (UTC)

Badges

Would it be possible for the script to detect if a wiki has badges disabled and, if so, to suppress warnings/messages related to them? The one leading me to ask is the badge-boosting warning shown on File:FileUsageAuto-update Special MovePage.png; I've not used this script before, though, so I don't know if there are other such messages. ディノ千?!? · ☎ Dinoguy1000 02:06, May 12, 2014 (UTC)

That's actually just the message that that wiki has specified. I left the option to append a message at the bottom of the wall of text in case a wiki wanted to, for instance, warn about badge boosting or whatever they feel is important. By default it's blank. — Foodbandlt (talk) 03:00, May 12, 2014 (UTC)
Aha, thanks for the clarification. =) ディノ千?!? · ☎ Dinoguy1000 04:02, May 12, 2014 (UTC)

Queue Problems

The queue seems to be a bit buggy lately. I am renaming images en masse, and trying to use the queue to do so. However, it usually turns up about half the images therein with an error and kicks them out of the queue. I am having to re-queue images at least once, sometimes twice. Further, the failed images do no appear in the failure list.
utter solitude - Rip my pictures from your walls.. | utterSworn 17:23, July 28, 2014 (UTC)

Sorry, I've been a little busy over the past few months. This might be related to not having the necessary throttling that the Wikia API requires to use. I'll look into this. Would you mind including a couple links that you tried to rename (if you remember)? I know it's been a while since you've posted this, sorry. Thanks! — Foodbandlt (talk) 04:40, September 29, 2014 (UTC)

hookaborted

Hi. I tried to move w:c:naruto:File:Fū_(Jinchūriki).png to w:c:naruto:File:Fū.png. As a rollback user, I also have the ability to suppress redirects, so I checked that tickbox. However, when I tried to do "Rename and replace", it didn't change anything and told me the queue was cleared because the hook was aborted (it said "hookaborted" as a reason). Any ideas as to why this is? I've had no issues moving files to names with macrons in them in the past. --SuperSajuuk Talk Page | Tabber Code | Channel 10:30, August 10, 2014 (UTC)

Sorry, I've been a little busy over the past few months. The error code that you see if returned from the Wikia API directly as it reads. I'll look into the issue on my test wiki and see if I can replicate it. Thank you for including so much detail! — Foodbandlt (talk) 04:39, September 29, 2014 (UTC)

Naruto Wiki Italia

Hello. As you may see, I updated this code to my wikia. However, I do not see the button whenever I try to rename an image. Maybe I missed something? Many thanks.--User talk:JOA20 22:33, December 1, 2014 (UTC)

This is because I have no included multilingual support for this script yet. It relies on the English spelling of things to work properly at the moment. I'll try to include that in the next week or so if I have time. — Foodbandlt (talk) 05:22, December 21, 2014 (UTC)
I've just finished including multilingual support if you'd like to help by providing a translation so that it will work in Italian. — Foodbandlt (talk) 07:11, December 27, 2014 (UTC)
If you would like, I can set up the script so that you only need to import a single script regardless of language, and the script would autodetect the language of the wiki in question. Code Lyoko Wiki: User: Deadcoder 16:09, December 30, 2014 (UTC)
Well, it already auto-detects the language and imports the appropriate languages for user/wiki language. What did you have in mind, though? — Foodbandlt (talk) 16:28, December 30, 2014 (UTC)
I was going to suggest consolidating it into a single script file, but having seen how large the language packs are, never mind.Code Lyoko Wiki: User: Deadcoder 19:09, January 2, 2015 (UTC)

Loading more than once

It'd be nice if the script wouldn't load more than once (e.g. check if script element ids already exist), as the script is sometimes installed wiki-wide and causes duplicate elements. —Preceding unsigned comment added by Ozuzanna (talkcontribs) . Please sign your posts with ~~~~!

Done, thanks! — Foodbandlt (talk) 18:58, December 21, 2014 (UTC)

Redirects

I understand modifying the pages with the old file names gets rid of most of the need for redirects, but why not respect the "Leave a redirect behind" checkbox? There are some things this tool can never be sure to take care of, like links from other sites or related wikis using the files by shared image repository. Robo Kiss (talk) 17:50, January 2, 2015 (UTC)

Good point. I'll look at including this today. Thanks! — Foodbandlt (talk) 18:17, January 2, 2015 (UTC)
Done. Let me know if you encounter any issues. — Foodbandlt (talk) 01:36, January 3, 2015 (UTC)

Invalid File Extension

Manually adding some replacements to the queue, if one tries to replace a PNG with a JPEG or vice-versa, it will say "Invalid file extension." I know Wikia doesn't let you replace files of one type with another or rename them with a different extension, but replacing uses of one file type with another shouldn't be a problem.JoshuaJSlone (talk) 08:35, January 5, 2015 (UTC)

You make a good point. I've removed the file extension checking for manual adds. — Foodbandlt (talk) 13:26, January 5, 2015 (UTC)

Ghost Move bug

First, thanks for implementing previous suggestions.

Second, I've just had an especially weird bug. I had a queue of 6 files to be moved and references to them updated. It gave failures on 4 of them, which seemed a bit crazy--so I went to try moving them each individually, but there was no longer anything there. I checked the move logs and delete logs, but there was no trace of them--just the move records from the two files that did get moved. However, I did find that those other 4 files did still exist, at their new names--they just didn't leave behind a redirect, any trace in logs, or get their page uses automatically changed.Robo Kiss (talk) 06:46, January 13, 2015 (UTC)

Community content is available under CC-BY-SA unless otherwise noted.