Tech

From Meta, a Wikimedia project coordination wiki
Jump to: navigation, search

Image upload equivalent command to SSH?[edit]

We are beginning to set up a Wiki on our local network to share some works and comments about them. A big part of these works are images.

These images are on our server, accessed by SSH. The wiki is on the same server, on different but accessible folders.

I'm trying to find a way to put all those images live automatically. I mean, with command line steps or programs. I found some extensions to upload multiple files, but these does not apply easily to what I need: several folders, several locations, big number of them. And probably it would duplicate those files, which should not be done, if possible.

I suppose there is a command to insert a single image on the Wiki. This would suffice my needs. How to do it?

I tried to manually create a folder inside "wiki/images/", and put some files there (e.g. "wiki/images/f/ff/img-01.png"), but it does nott show up on the site. Also, the [ [ Image : img-01.png ] ] didn't work (if this worked, it could be enough). I guess the image pages also need to be created, and maybe some DB meta information?

Shell commands or ways to CURL some Wiki script would work. If each image page can be created this way, a way to insert some comments on those is desired.


I searched around for help pages on this subject, but couldn't find anything.

https://meta.wikimedia.org/wiki/Help:Image_page

https://meta.wikimedia.org/wiki/Help:Images_and_other_uploaded_files


Any ideas?

Rapidim (talk) 04:38, 17 August 2014 (UTC)

`curl` is maybe the simplest; as you can fill out the complete POST form when uploading the images automatically, you can also add arbitrary comments. Have you seen http://www.mediawiki.org/wiki/Manual:Configuring_file_uploads#Mass_uploading? I personally have good experiences with Commons:Commonist. You might consider making a list of all your files and then symlink to them from one directory, for one-clik upload with Commonist. --141.2.134.207 08:00, 2 September 2014 (UTC)
@Rapidim: You can use mw:Extension:UploadLocal to upload some images, but I guess it is not possible for a huge number of images. Additionally this will duplicate the images, in /wiki/images and in your other directory; a soft or hard link would be better, but a script has to be created for that. You can also see the script /wiki/maintenance/importImages.php, possibly it does something similar to what you want. ~ Seb35 [^_^] 21:02, 21 September 2014 (UTC)

Extra button to view history[edit]

Dear all,

I would like to propose adding an extra button to the top of the page when viewing a history. For example this request page. On the top there are 3 links: "Older revision, Latest revision, Newer revision". However, if you want to know what happened to a request on that page, using the older/newer revision buttons is too slow, moving 1 step at a time, when 100 edits might be in between the request and the answer. You can go to the history section and start going back, but this means searching, and on larger pages it takes some time. I suggest adding an extra button that immediately sends you to the "history section" of that edit, so you are directly at the right spot in the history tab, and can see the 50 edits directly around the edit.

This same request was made to wikimedia-tech on Bugzilla 7 years ago, see [1]. They stated "This would probably not be very hard to implement", however up to date nothing has been done. I am not a Bugzilla user or developer, yet I think this change is usefull and I think we should have it. It gives no disadvantages. I think the only way to get this change is to get some attention for it. I suggest that people reply here to state their opinion on the change. I have posted this same request at en:Wikipedia:Village pump (proposals). Thank you very much,

Sincerely, Taketa (talk) 10:18, 2 September 2014 (UTC)

I don't know the MediaWiki software, but it sems to me (as an outside observer) that it shouldn't be too hard - each revision should link to its place in the history, and load X edits before and after it. עוד מישהו Od Mishehu 19:27, 2 September 2014 (UTC)
I support Taketa's proposal. Having a simple button or link, starting the history at the particular offset is useful. I had independent need for this, see my query here. Kingsindian (talk) 11:48, 18 September 2014 (UTC)

Wikipedia backlinks counter[edit]

Hi, I'm the co-founder of Histropedia (new project making timeline of everything in history from Wikipedia and Wikidata.

We have been using this tool for counting backlinks to Wikipedia articles as a way of ranking the events in our database (each event in Histropedia is basically a Wikipedia article which can be added to a timeline). Unfortunately, the tool keeps on going down and has actually been completely inactive for the last few days.

Does anyone know if there is an alternative that we could use for this task? For instance, is there a way of us using whatever tool is being used by the "what links here" option in Wikipedia?

Any advice on this would be greatly appreciated, as I've been unable to track down the creator of the tool we have been using. Regards, NavinoEvans (talk) 19:01, 2 September 2014 (UTC)

Tehnical dificultis on srWiki[edit]

It all started on august 15 after software upgrade, after few minutes of editing almost all tools for editing disappear (buttons for signature, bold text, link etc, and tools found in MediaWiki:Edittools) also gadgets such as UTC Live Clock disappear. I hope this is the right place for this kind of problem if not you could tell me where should i report this. --Milicevic01 (talk) 19:43, 16 September 2014 (UTC)

They are appearing for me at srwiki. By any chance, did you disable javascript on your browser? --Glaisher (talk) 12:18, 17 September 2014 (UTC)
No, and i am not the only one see [2], note that it doesn't disappear immediately after login, reload page few times, depending on the browser it can take up to 15min. --Milicevic01 (talk) 13:07, 17 September 2014 (UTC)
Did you mean August 15 or September 15? Is there some error message in the "console" of the browser's "developer tools" when this happens? --AKlapper (WMF) (talk) 13:10, 17 September 2014 (UTC)
I meant August 15, no error messages, I use Firefox so could you be more specific what to look for --Milicevic01 (talk) 13:13, 17 September 2014 (UTC)
Please attach "&debug=true" to the address in your browser (or "?debug=true" if the address has no question mark included before). See https://developer.mozilla.org/en-US/docs/Tools/Web_Console for using the web console. Once the problem happens, would be interesting to see if there are any errors in the web console output. --AKlapper (WMF) (talk) 13:20, 17 September 2014 (UTC)
I got this when i loaded one picture

SyntaxError: missing ) after condition load.php:7497 ReferenceError: $ is not defined index.php:163 ReferenceError: mw is not defined index.php:8 ReferenceError: mediaWiki is not defined index.php:124 ReferenceError: mw is not defined index.php:1 ReferenceError: addOnloadHook is not defined index.php:2 ReferenceError: jQuery is not defined index.php:1 ReferenceError: mw is not defined index.php:1 ReferenceError: mw is not defined index.php:1 Image corrupt or truncated: https://upload.wikimedia.org/wikipedia/sr/thumb/8/80/%D0%91%D0%B8%D1%81%D0%BA%D0%B0.jpeg/800px-%D0%91%D0%B8%D1%81%D0%BA%D0%B0.jpeg and this when i loaded my user page Expected ';' or '}' to terminate declaration but found '!'. Declaration dropped. load.php:139 "Use of "addPortletLink" is deprecated. Use mediawiki.util instead." load.php:11403 console.trace(): load.php:11405 mw.log</log.warn() load.php:11405 mw.log</log.deprecate</<.get() load.php:11429 <anonymous> index.php:9 <anonymous> wikibits.js:87 jQuery.event.dispatch() load.php:4641 jQuery.event.add/elemData.handle() load.php:4309

"Use of "appendCSS" is deprecated. Use mediawiki.util instead." load.php:11403 console.trace(): load.php:11405 mw.log</log.warn() load.php:11405 mw.log</log.deprecate</<.get() load.php:11429 markBlocked() index.php:35 <anonymous> wikibits.js:87 jQuery.event.dispatch() load.php:4641 jQuery.event.add/elemData.handle() load.php:4309

"Use of "sajax_init_object" is deprecated. Sajax is deprecated, use jQuery.ajax or mediawiki.api instead." load.php:11403 console.trace(): load.php:11405 mw.log</log.warn() load.php:11405 mw.log</log.deprecate</<.get() load.php:11429 apiRequest() index.php:39 checkLinks() index.php:119 markBlocked() index.php:170 <anonymous> wikibits.js:87 jQuery.event.dispatch() load.php:4641 jQuery.event.add/elemData.handle() load.php:4309

"Use of "sajax_debug_mode" is deprecated. Sajax is deprecated, use jQuery.ajax or mediawiki.api instead." load.php:11403 console.trace(): load.php:11405 mw.log</log.warn() load.php:11405 mw.log</log.deprecate</<.get() load.php:11429 debug() ajax.js:18 createXhr() ajax.js:51 apiRequest() index.php:39 checkLinks() index.php:119 markBlocked() index.php:170 <anonymous> wikibits.js:87 jQuery.event.dispatch() load.php:4641 jQuery.event.add/elemData.handle() Is this helpful? --Milicevic01 (talk) 13:37, 17 September 2014 (UTC)

So whatever code is in line 7497 of the file load.php it is obviously broken and needs fixing. You should be able to click "load.php:7497" to see that code (plus where exactly that file is located). --AKlapper (WMF) (talk) 13:46, 17 September 2014 (UTC)
I reloaded that page and now i can not found that line, but i did get this JS errors

Use of getUserData() or setUserData() is deprecated. Use WeakMap or element.dataset instead. requestNotifier.js:63 URIError: malformed URI sequence jquery.cookie.js:17 URIError: malformed URI sequence jquery.cookie.js:17 ReferenceError: ToggleBox_Init is not defined load.php:626 URIError: malformed URI sequence in both pages (picture and my user page); load.php:626 lead me to section Script za toggle-funkciju in MediaWiki:Common.js, is this helpful? --Milicevic01 (talk) 14:44, 17 September 2014 (UTC)

Bug day: Book tool/Collection/PDF, 2014-10-08, 14–22 UTC[edit]

Printed books

Hello! Please join us on the next Wikimedia bug day: 2014-10-08, 14:00–22:00 UTC[3] in #wikimedia-tech on IRC.

We will be triaging bug reports for the Collection extension (Book tool) in general and PDF export in particular, which were just switched to a new backend (OCG). We have two immediate goals:

Everyone is welcome to join any time these weeks, and no technical knowledge is needed! It's an easy way to get involved or to give something back. We encourage you to record your activity on the etherpad. See also:

I look forward to seeing you there. Please distribute further by email, talk pages etc. (Collection is used on almost 2 thousands wikis!)

Nemo 18:14, 29 September 2014 (UTC)

JS Hack to disable VE[edit]

Per bug 50631 and another one in "see also", VE does not work for me, and I want to disable it everywhere regardless of VE's deploy status. It will be in User:-revi/global.js only. If I remember correctly, there was a hack, but I couldn't find one, so anyone knows what's the code? — revi^ 05:39, 1 October 2014 (UTC)