Extension talk:MsUpload

Jump to navigation Jump to search

About this board

This board is for discussion about MsUpload. Don't forget that you can also report issues relating to this extension on Phabricator, at #mediawiki-extensions-msupload.

MW 1.35.1 - Msupload not working/showing

5
Kraba (talkcontribs)

Hello,

I installed MsUpload (master or version for 1.35) on a fresh installation of MW 1.35.1 with this setup:

wfLoadExtension( 'MsUpload' );
$wgMSU_useDragDrop = true; // Should the drag & drop area be shown? (Not set by default) 
$wgMSU_showAutoCat = true; // Files uploaded while editing a category page will be added to that category
$wgMSU_checkAutoCat = true; // Whether the checkbox for adding a category to a page is checked by default
$wgMSU_useMsLinks = false; // Insert links in Extension:MsLinks style?
$wgMSU_confirmReplace = true; // Show the "Replace file?" checkbox
$wgMSU_imgParams = 'none'; // Any image parameter(s), delimited by pipes, e.g., {width}px, left, right, center, none, border, frameless, frame, 
$wgHiddenPrefs[] = 'usebetatoolbar';

When I edit a page with wikieditor enabled I'm able to catch this error on my nginx logs:

$MYIP - - [31/Mar/2021:10:51:09 +0000] "GET /index.php?title=MY_PAGE_EDITED&action=edit HTTP/1.1" 200 8245 "http://$MY_WIKI_IP/MY_PAGE_EDITED" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36"
$MYIP - - [31/Mar/2021:10:51:09 +0000] "GET /extensions/MsUpload/resources/plupload/plupload.full.min.js HTTP/1.1" 404 31 "http://$MY_WIKI_IP/index.php?title=MY_PAGE_EDITED&action=edit" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36"
$MYIP - - [31/Mar/2021:10:51:10 +0000] "GET /extensions/WikiEditor/modules/images/toolbar/arrow-down.svg?4c840 HTTP/1.1" 404 31 "http://$MY_WIKI_IP/index.php?title=MY_PAGE_EDITED&action=edit" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36"
$MYIP - - [31/Mar/2021:10:51:10 +0000] "GET /extensions/MsUpload/resources/images/msu-loading.png?99192 HTTP/1.1" 404 31 "http://$MY_WIKI_IP/index.php?title=MY_PAGE_EDITED&action=edit" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36"
$MYIP - - [31/Mar/2021:10:51:10 +0000] "GET /extensions/MsUpload/resources/images/msu-upload-button.png?87a5f HTTP/1.1" 404 31 "http://$MY_WIKI_IP/index.php?title=MY_PAGE_EDITED&action=edit" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36"

I changed my Ip/wiki IP and page name with $MYIP, $MY_WIKI_IP, MY_PAGE_EDITED. I'm using Tweeki as skin but i've the same result if I use vector, the files are present of course.

Kraba (talkcontribs)

Sorry i forgot: the msupload bar is not showing/present.

Sophivorus (talkcontribs)

I was unable to reproduce your issue. MsUpload is working fine for me on my 1.35.2 installation. Are you still experiencing this issue? If yes, are there any errors or warnings on your browser console? Also, is your wiki public?

Kraba (talkcontribs)

Yes, it's public (I tried it with the wiki "closed" and public) but no luck. The console, when I edit a page return:

GET http://$MYWIKI/extensions/MsUpload/resources/plupload/plupload.full.min.js net::ERR_ABORTED 404 (Not Found)
JQMIGRATE: Migrate is installed with logging active, version 3.1.0
VM657:211 This page is using the deprecated ResourceLoader module "jquery.throttle-debounce".
Please use OO.ui.throttle/debounce instead. See https://phabricator.wikimedia.org/T213426
(anonymous) @ VM657:211
runScript @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:13
execute @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:14
doPropagation @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:7
requestIdleCallback (async)
requestPropagation @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:7
setAndPropagate @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:8
implement @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:20
(anonymous) @ load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=tweeki&version=d2vm4:1
load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=tweeki&version=d2vm4:410 This page is using the deprecated   ResourceLoader module "jquery.ui". 
Please use OOUI instead. 
mw.loader.implement.css @ load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=tweeki&version=d2vm4:410
runScript @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:13
(anonymous) @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:14
flushCssBuffer @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:5
requestAnimationFrame (async)
addEmbeddedCSS @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:5
execute @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:14
doPropagation @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:7
requestIdleCallback (async)
requestPropagation @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:7
setAndPropagate @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:8
implement @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:20
(anonymous) @ load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=tweeki&version=d2vm4:1
load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=tweeki&version=d2vm4:144 JQMIGRATE: jQuery.fn.delegate() is  deprecated
migrateWarn @ load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=tweeki&version=d2vm4:144
delegate @ load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=tweeki&version=d2vm4:153
bindHover @ load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=tweeki&version=d2vm4:605
Datepicker @ load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=tweeki&version=d2vm4:560
(anonymous) @ load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=tweeki&version=d2vm4:607
mw.loader.implement.css @ load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=tweeki&version=d2vm4:607
runScript @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:13
(anonymous) @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:14
flushCssBuffer @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:5
requestAnimationFrame (async)
addEmbeddedCSS @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:5
execute @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:14
doPropagation @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:7
requestIdleCallback (async)
requestPropagation @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:7
setAndPropagate @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:8
implement @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:20
(anonymous) @ load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=tweeki&version=d2vm4:1
load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=tweeki&version=d2vm4:51 jQuery.Deferred exception: plupload is  not defined  ReferenceError: plupload is not defined
      at Array.createUploader (<anonymous>:116:128)
      at mightThrow (http://$MYWIKI/load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui- widgets%7Cjquery.ui&skin=tweeki&version=d2vm4:49:149)
     at process (http://$MYWIKI/load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%7Cjquery.ui&skin=tweeki&version=d2vm4:49:808)   undefined
jQuery.Deferred.exceptionHook @ load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=tweeki&version=d2vm4:51
process @ load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=tweeki&version=d2vm4:49
setTimeout (async)
(anonymous) @ load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=tweeki&version=d2vm4:50
fire @ load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=tweeki&version=d2vm4:46
fireWith @ load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=tweeki&version=d2vm4:47
fire @ load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=tweeki&version=d2vm4:47
fire @ load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=tweeki&version=d2vm4:46
fireWith @ load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=tweeki&version=d2vm4:47
(anonymous) @ load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=tweeki&version=d2vm4:51
fire @ load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=tweeki&version=d2vm4:46
fireWith @ load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=tweeki&version=d2vm4:47
deferred.<computed> @ load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=tweeki&version=d2vm4:50
(anonymous) @ VM657:248
doPropagation @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:7
requestIdleCallback (async)
requestPropagation @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:7
setAndPropagate @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:8
markModuleReady @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:12
runScript @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:13
(anonymous) @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:14
flushCssBuffer @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:5
requestAnimationFrame (async)
addEmbeddedCSS @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:5
execute @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:14
doPropagation @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:7
requestIdleCallback (async)
requestPropagation @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:7
setAndPropagate @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:8
markModuleReady @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:12
runScript @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:13
(anonymous) @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:14
flushCssBuffer @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:5
requestAnimationFrame (async) 
addEmbeddedCSS @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:5
execute @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:14
doPropagation @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:7
requestIdleCallback (async)
requestPropagation @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:7
setAndPropagate @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:8
markModuleReady @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:12
runScript @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:13
(anonymous) @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:14
flushCssBuffer @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:5
requestAnimationFrame (async)
addEmbeddedCSS @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:5
execute @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:14
doPropagation @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:7
requestIdleCallback (async)
requestPropagation @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:7
setAndPropagate @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:8
implement @ load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=tweeki:20
(anonymous) @ load.php?lang=en-gb&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=tweeki&version=d2vm4:1
index.php?title=Category:Applications&action=edit:1 GET http://$MYWIKI/extensions/WikiEditor/modules/images/toolbar/arrow-down.svg?4c840 404 (Not   Found)
index.php?title=Category:Applications&action=edit:1 GET http://$MYWIKI/extensions/MsUpload/resources/images/msu-upload-button.png?87a5f 404 (Not  Found)
index.php?title=Category:Applications&action=edit:1 GET http://$MYWIKI/extensions/MsUpload/resources/images/msu-loading.png?99192 404 (Not Found)


The file is present and with the proper permissions.If it can help my config is: MW 1.35.1 with Tweeki as skin (but the same problem appears with vector or the defaults one)

$wgScriptPath = "";
$wgScript = "{$wgScriptPath}/index.php";
$wgRedirectScript = "{$wgScriptPath}/redirect.php";
$wgArticlePath = "/$1";
## The protocol and server name to use in fully-qualified URLs
$wgServer = "http://$MYWIKI";
## The URL path to static resources (images, scripts, etc.)
$wgResourceBasePath = $wgScriptPath;
$wgGroupPermissions['*']['createaccount'] = true ;
$wgGroupPermissions['*']['edit'] = true;
$wgGroupPermissions['*']['read'] = true;
$wgGroupPermissions['*']['talk'] = true;
$wgGroupPermissions['*']['createtalk'] = true;
$wgGroupPermissions['*']['writeapi'] = true;
$wgGroupPermissions['*']['submit'] = true;
$wgGroupPermissions['*']['autocreateaccount'] = true;
### msupload req
$wgEnableUploads = true; // Enable uploads
$wgAllowJavaUploads = true; // Solves problem with Office 2007 and newer files (docx, xlsx, etc.)
$wgGroupPermissions['user']['upload'] = true; // Allow regular users to upload files
$wgBlockDisablesLogin=true;
wfLoadExtension( 'MsUpload' );
$wgMSU_useDragDrop = true; // Should the drag & drop area be shown? (Not set by default)
$wgMSU_showAutoCat = true; // Files uploaded while editing a category page will be added to that category
$wgMSU_checkAutoCat = true; // Whether the checkbox for adding a category to a page is checked by default
$wgMSU_useMsLinks = false; // Insert links in Extension:MsLinks style?
$wgMSU_confirmReplace = true; // Show the "Replace file?" checkbox
$wgMSU_imgParams = 'none'; // Any image parameter(s), delimited by pipes, e.g., {width}px, left, right, center, none, border, frameless, frame,  thumb etc.
$wgHiddenPrefs[] = 'usebetatoolbar';

Thanks and let me know if you need more infos

Kraba (talkcontribs)

found the problem. PEBCAK :) nginx had a "location ^~ /extensions/ { internal; }" My fault, sorry

Remove buttons from WikiEditor

1
Summary by Sophivorus

Add the following to your MediaWiki:Common.css:

#msupload-container {
    display: none;
}
FrugalTPH (talkcontribs)

How can I remove/hide the buttons that MsUpload adds to the WikiEditor?

I note that they seem to be added in via CSS rather than Javascript (I'm able to remove buttons using JS quite easily, but can't work out how to hide these ones added via CSS). :/

I only want to use the dropzone really, and am trying to have as clutter-free UI as possible.

Can this work with the Visual Editor?

4
Summary by Sophivorus

VisualEditor already has a simple way to upload files. There're no plans to make MsUpload work with the VisualEditor.

Thedonquixotic (talkcontribs)

The wikieditor is not bad but I prefer using the VisualEditor. Is it possible to use this extension in conjunction with it?

Sophivorus (talkcontribs)

Not really, and there're no plans for it, for now.

Thedonquixotic (talkcontribs)

@SophivorusSeems it would be unnecessary as the functionality is in Visual Editor already according to this ticket: https://phabricator.wikimedia.org/T39932

Though in reality the functionality is not working as intended so I have filed a ticket here: https://phabricator.wikimedia.org/T208631

If you or any other devs on the MsUpload project would have some insight on fixing this issue that would be much appreciated I'm sure. Though I'm pretty clueless on this stuff so maybe it's not something people care about on the visual editor etc

Sophivorus (talkcontribs)

Modifying MsUpload to work with the Visual Editor would require huge changes. It seems to me that the best way forward would be to fix the Visual Editor bug. The first ticket you linked had an amazingly positive response, so don't lose hope on the second one just yet!

MsUpload -vs- SimpleBatchUpload?

2
Summary by Sophivorus
MsUpload
The user interface control for uploading appears in the edit toolbar for every article (assuming you're using Extension:WikiEditor; I cannot speak for the combination of MsUpload + VisualEditor). Once a file is uploaded with MsUpload, you can insert the newly-uploaded file as an inline image, or as a link to the image, into the article you're currently editing.
SimpleBatchUpload
You must visit the page "Special:BatchUpload" on your wiki to use it, or use the parser function {{#batchupload:}} to add a batch upload button to any wiki article. In both cases, it is literally just one button, with the ability to multiple upload files and little else. It will display the uploaded filename and that's it; you have to construct your own Image: link from that.
Revansx (talkcontribs)

Can someone say a few words about the differences between these two extension?

Ernstkm (talkcontribs)
MsUpload
The user interface control for uploading appears in the edit toolbar for every article (assuming you're using Extension:WikiEditor; I cannot speak for the combination of MsUpload + VisualEditor). Once a file is uploaded with MsUpload, you can insert the newly-uploaded file as an inline image, or as a link to the image, into the article you're currently editing.
SimpleBatchUpload
You must visit the page "Special:BatchUpload" on your wiki to use it, or use the parser function {{#batchupload:}} to add a batch upload button to any wiki article. In both cases, it is literally just one button, with the ability to multiple upload files and little else. It will display the uploaded filename and that's it; you have to construct your own Image: link from that.
128.199.88.59 (talkcontribs)

Hello, How to delete multi files uploaded by MsUpload for once? Those files belong to same once MsUpload.

Sophivorus (talkcontribs)

Do you mean how to delete the files that you just uploaded via MsUpload? This isn't an existing feature. I'll take it as a feature request.

Reply to "How to delete"

Receiving Error -200 after Upgrading PHP

5
Summary by Sophivorus

Issue seems to have been due to a regex bug in MediaWiki core, that was fixed in 1.35.2+

193.102.45.21 (talkcontribs)

Hello,

since I updated PHP version from 7.2.18 to 7.4.13 MsUpload throws an "Error -200" when tryíng to upload a file. The "normal" method via specialpage still works fine.

Mediawiki 1.30.1
PHP 7.4.13 (fpm-fcgi)
MariaDB 5.5.57-MariaDB
ICU 64.2
Elasticsearch 5.4.3
MsUpload 12.0 (badbdb1) 2. Jan. 2021, 06:50

The console says, that there is an error 500 from the server:


POST "/mediawiki/api.php" 500

                        "" !== n.responseType && "responseType"in h && (h.responseType = "json" !== n.responseType || u.can("return_response_type", "json") ? n.responseType : "text"),

                        m ? h.sendAsBinary ? h.sendAsBinary(r) : !function() {

                            for (var e = new Uint8Array(r.length), t = 0; t < r.length; t++)

                                e[t] = 255 & r.charCodeAt(t);

                            h.send(e.buffer)

                        }() : h.send(r), <===== here is the breakpoint

                        s.trigger("loadstart")

                    },

                    getStatus: function() {

                        try {

                            if (h)

                                return h.status

                        } catch (e) {}

                        return 0


I´ve already tried different Versions but with no success. When loading the "api.php" site there´s only mentioned that "tokens" are deprecated.


Have you any suggestions?

193.102.45.21 (talkcontribs)

I´ve done some additional "research" and in the php_error_log the following line occurs:


[22-Feb-2021 09:13:12 UTC] PHP Warning:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in /mediawiki/includes/media/FormatMetadata.php on line 1859

this does NOT appear, when uploading a file via special:fileupload. Do you have any further suggestions? I´ve already tried a lot of different versions of MsUpload...


following the codesnippet from "FormatMetadata.php":


protected function sanitizeKeyForAPI( $key ) {

// drop all characters which are not valid in an XML tag name

// a bunch of non-ASCII letters would be valid but probably won't

// be used so we take the easy way

$key = preg_replace( '/[^a-zA-z0-9_:.-]/', '', $key );

// drop characters which are invalid at the first position

>>>>>>>>>>>$key = preg_replace( '/^[\d-.]+/', '', $key ); <<<<<<<<<<<<<<<======== this is line 1859

if ( $key == '' ) {

$key = '_';

}

// special case for an internal keyword

if ( $key == '_element' ) {

$key = 'element';

}

return $key;

}

138.40.68.56 (talkcontribs)

I had issues with line 1860 of ./includes/media/FormatMetadata.php:

$key = preg_replace( '/^[\d-.]+/', '', $key );

Had to escape the '-' so it becomes:

$key = preg_replace( '/^[\d\-.]+/', '', $key );

193.102.45.21 (talkcontribs)

Just tried it.. It Works!


Thank you VERY much for the tip! Could you explain what this exactly means, why does the "-" cause errors?

Sophivorus (talkcontribs)

It looks like in MediaWiki 1.35.2+ this issue was fixed.

When might this qualify as a Stable Extension?

2
Emikulic (talkcontribs)

I have been wanting to use this for a while, but really try to only use 'stable' extensions as its just to difficult to explain to users why we use something in beta. In the windows based desktop world, this is a common request. Thx.

Samwilson (talkcontribs)

It looks like there's at least one bad bug on the workboard, so probably this should stay as beta till that's fixed. That said, I think quite a few people are running it in production without too many dramas.

Reply to "When might this qualify as a Stable Extension?"

MsUpload not working with Mediawiki 1.35?

2
Summary by Jiou7

Last version of MsUpload now works

Jiou7 (talkcontribs)

While this extension was working with Mediawiki 1.34, I did a fresh install with the recent Mediawiki 1.35 and the Drag and Drop area is not showing up anymore nor the Upload button. Did anyone managed to install MsUpload with Mediawiki 1.35?

Jiou7 (talkcontribs)

It now works with the last version of MsUpload, modified since my first message.

Upload of the same file should still provide the insert image button

1
Drivium (talkcontribs)

I was surprise to find those useful buttons for inserting the link / image missing when adding the same image a second time.

They are helpful because you don't have to check the mediawiki syntax to insert files (for some users it's harder to remember them).

Reply to "Upload of the same file should still provide the insert image button"

How do I upload a screenshot of the extension... to the Extension:MsUpload page

1
Summary by Ernstkm

Apologies, Special:Upload or some other part of the site gave me the hint to create a request for the "uploader" right at Project:Requests, and I have done that.

Ernstkm (talkcontribs)

I understand how to upload images to a MediaWiki instance—under normal circumstances.

However, I don't have permission to use Special:Upload on this wiki, and Commons specifically says that "fair use" images (including the example of screenshots) will be "deleted on sight."

I just (I hope) improved the section about using Extension:PdfHandler to be able to insert PDF thumbnails directly into an article with MsUpload, and I have a screenshot to demonstrate the end result (Imgur link).

Could someone advise me on the appropriate process for this?