Extension talk:MultimediaViewer

Jump to navigation Jump to search

About this board

Does MultimediaViewer work on private wiki?

Seanchen (talkcontribs)
Tgr (WMF) (talkcontribs)

It should work fine, If it doesn't, please file a bug with the details.

Seanchen (talkcontribs)

@Tgr thanks for the quick reply!

Here are some more details about this issue, could you help take a look to see if you have any clue.

I am working on the MediaWiki version 1.26.2 and download MultimediaViewer at version 0.3.0.

I did set up the img_auth.php to protect the access to media files. As long as user logged in, user could view the media file without problem. For example: http://dev.example.com/wiki/img_auth.php/6/69/Denmark.png. But when logged in user try to view the same image on MultimediaViewer, we got this massage:

There seems to be a technical issue. You can retry or report the issue if it persists. Error: could not load image from http://dev.example.com/wiki/img_auth.php/6/69/Denmark.png

And I could see failed to load resource error on Chrome console:

Failed to load resource: the server responded with a status of 403 (Forbidden)

It might have something to do with my Ngnix's configuration. I will double check...

Is there any configuration on MultimediaViewer related to this?

If you still think it is a issue, I will file a bug for it.

thanks a lot,


Tgr (WMF) (talkcontribs)

Disabling $wgMediaViewerUseThumbnailGuessing might help, but it should not be necessary, and it's the default anyway.

Might be a problem with how MediaViewer uses CORS. Could you try to edit resources/mmv/provider/mmv.provider.Image.js to change imagePreloadingSupported to always return false, and see if that fixes it?

Seanchen (talkcontribs)

disabling $wgMediaViewerUseThumbnailGuessing does help.

set imagePreloadingSupported to false fixed it!

Also I did test on Firefox. Everything is working on Firefox without any code change.

it seems like Chrome and Firefox handle CORS slightly different!

let me know if you want me file a bug for this.



Subfader (talkcontribs)

Thanks. Had the same problem. Incorrect CORS error on working 404 handler (images are on subdomain).

Returning imagePreloadingSupported false fixed it. $wgMediaViewerUseThumbnailGuessing could stay true.

MW 1.25 --Subfader (talk) 11:39, 4 November 2017 (UTC)

Tgr (WMF) (talkcontribs)

Please do. The bug would probably affect Firefox too, if your images were on a separate domain. MV sets cors="anonymous" on the images for various hacky reasons, for private wikis that should probably be cors="use-credentials" instead.

Seanchen (talkcontribs) (talkcontribs)

This is still a relevant help for the latest LTS-MediaWiki (1.31.2).

Thanks for this workaround. Setting <pre>imagePreloadungSupported</pre> to <pre>false</pre> helped a lot and fixed my problem.

Reply to "Does MultimediaViewer work on private wiki?"
Mjb294 (talkcontribs)

Is it possible to use this extension alongside the ImageMap extension? I would love if you could click on the thumbnail to bring up MultimediaViewer and still have the option of clicking on different parts of the image which have been mapped to link to different pages. If this isn't possible at all does anyone know of any other extensions which could do something similar?

DSquirrelGM (talkcontribs)

There's no real need to use an extension for this, since you can embed absolute-positioned divs or spans along with the image itself inside a relative-positioned div to define linked areas. Specifically using normal link syntax with the positioned structures inside them where you'd normally have the link text.

Tacsipacsi (talkcontribs)

This solution has two problems. First, absolute positioning is awkward and far less flexible than imagemaps (imagemaps can have links of virtually any shape, while absolute positioning is even more awkward if you want to use any shape other than rectangles, if possible at all). Second, they don’t work with MultimediaViewer, either.

Reply to "ImageMap"
Summary by 机智的小鱼君

It’s because of browser’s cache.

机智的小鱼君 (talkcontribs)

I am changing my site to https protocol.Then MediaViewer crashed,and display “could not load image from http://foo.bar”.

That’s strange.Can somebody teach me how to solve this?($wgServer has been modified)

机智的小鱼君 (talkcontribs)
机智的小鱼君 (talkcontribs)

Sorry! That’s Cache !! All things right !!!

Jens Lallensack (talkcontribs)

Dear all – I'm writing on behalf of the WikiProject Dinosaurs in the English Wikipedia. We were intrigued to find out the Media Player now supports stl 3D files. For our topic (dinosaurs), we are describing complex bone morphologies on a regular basis. 3D models would be a very significant improvement to our articles, making it much easier for readers to comprehend what the article text tries to describe. We encountered one problem with the starting position though, and furthermore would like to file a wish.

1) The starting position in which the model is shown (both in the thumbnail and in the 3D window) is very different from that of external viewers (tested with MeshLab). Because of this, we are unable to rotate the objects into their proper orientation (e.g., side view). When I change orientation using MeshLab and re-upload the file, the orientation shown by MediaViewer changes as well, but just in a different, and seemingly arbitrary direction.

2) It would be of even more value to be able to upload models with vertex colors or, better, textures, which are possible when using the format PLY. Without color, it is very difficult for readers to recognize the bones shown. PLY would require two files for one model: A mesh file and a texture file (usually .jpg). While .stl files are the standard format for, e.g., CT data, PLY is commonly used for photogrammetry models, which are based on photos and thus naturally will include texture. Photogrammetry is an easy and cheap method that (in contrast to CT data) can be easily employed by Wikipedia authors themselves to build models for Wikipedia, provided they have access to the objects. I myself already have a bunch of self-made models, all including texture files, that would be of great use for our articles. For these reasons, we think that the support of textured PLY files would be an addition well worth the effort.

Files tested:

File:Massospondylus_skull_BP-1-5241_3D_scan.stl File:Aquilops cranium scan.stl

Reply to "3D view: bug and wishes"

How is the description in MediaViewer extracted from file descriptions?

ISO 3166 Bot (talkcontribs)

Compare the descriptions of File:Skulptur_Hand_und_Traube_548_bei_A-2170_Wetzelsdorf.jpg & File:Ingeborg Strobl - Mahnmal für verlorengegangene Artenvielfalt 1997 (1).jpg. While the first file shows the description: Skulptur "Hand und Traube" bei Wetzelsdorf, Gemeinde Poysdorf, Niederösterreich, Österreich, the second shows Dieses Foto zeigt das im digitalen Kulturgüterverzeichnis des Landes Niederösterreich (Österreich) unter der Nummer. (lang German selected). (you can use https://de.wikipedia.org/wiki/Liste_der_Kunstwerke_im_%C3%B6ffentlichen_Raum_in_Nieder%C3%B6sterreich/Weinviertel to run the mediaviewer)

I would expect that all the language specific parts of the description are shown (multiples possible) and that all non-language specific parts are shown too. Furthermore I would expect that templates are transcluded correctly (which means that that number in the second case must be visible).

It looks like that only the last matching paragraph is shown as the description in mediaviewer. If only one paragraph is shown, than the first one should be preferred.

Herzi Pinki (talkcontribs)

Sorry, used my bot account, but it's me --Herzi Pinki (talk) 14:43, 24 June 2018 (UTC)

Tacsipacsi (talkcontribs)
Herzi Pinki (talkcontribs)

Thanks for the hint, helped a lot. (for the template part only)

Reply to "How is the description in MediaViewer extracted from file descriptions?"

Clicking on the X button leads to a black page.

2A02:1203:ECB7:D2C0:3DA6:7EE5:29C5:591F (talkcontribs)

Just installed MultimediaViewer: it works great but if I click on X button, if I press Esc or even if I go back one page, the browser just shows an empty black page.

I fired up Chrome's Developer tool and I get the Console error reported below. I should mention I am using MediaWiki 1.26 and I tried the snapshot for both 1.27 and 1.30, as there isn't one specific for 1.26.

I also tried the require_once() loading modus rather than using wfLoadExtension() but it doesn't seem to make a difference.

I'm not into php enough to understand what's going on. Is there an incompatibility with the SimpleTooltip extension?


Uncaught Error: Invalid callback. Function or method name expected.

    at validateMethod (load.php?debug=false&lang=en&modules=ext.SimpleTooltip|ext.echo.init|ext.uls.pt|jquery.byteLength%2CcheckboxShiftClick%2CgetAttrs%2ChighlightText%2CmakeCollapsible%2Cmw-jump%2Cplaceholder%2Csuggestions|mediawiki.Title%2CsearchSuggest|mediawiki.action.view.postEdit|mediawiki.api.watch|mediawiki.page.ready|mediawiki.page.watch.ajax|mediawiki.ui.button%2Cicon|mmv.bootstrap|mmv.bootstrap.autostart|oojs%2Csite&skin=vector&version=b3e6ba0b8e8f:118)

    at CanvasButtons.oo.EventEmitter.off (load.php?debug=false&lang=en&modules=ext.SimpleTooltip|ext.echo.init|ext.uls.pt|jquery.byteLength%2CcheckboxShiftClick%2CgetAttrs%2ChighlightText%2CmakeCollapsible%2Cmw-jump%2Cplaceholder%2Csuggestions|mediawiki.Title%2CsearchSuggest|mediawiki.action.view.postEdit|mediawiki.api.watch|mediawiki.page.ready|mediawiki.page.watch.ajax|mediawiki.ui.button%2Cicon|mmv.bootstrap|mmv.bootstrap.autostart|oojs%2Csite&skin=vector&version=b3e6ba0b8e8f:119)

    at CanvasButtons.oo.EventEmitter.disconnect (load.php?debug=false&lang=en&modules=ext.SimpleTooltip|ext.echo.init|ext.uls.pt|jquery.byteLength%2CcheckboxShiftClick%2CgetAttrs%2ChighlightText%2CmakeCollapsible%2Cmw-jump%2Cplaceholder%2Csuggestions|mediawiki.Title%2CsearchSuggest|mediawiki.action.view.postEdit|mediawiki.api.watch|mediawiki.page.ready|mediawiki.page.watch.ajax|mediawiki.ui.button%2Cicon|mmv.bootstrap|mmv.bootstrap.autostart|oojs%2Csite&skin=vector&version=b3e6ba0b8e8f:120)

    at LightboxInterface.LIP.unattach (load.php?debug=false&lang=en&modules=jquery.color%2CcolorUtil%2Cfullscreen%2Chidpi|mmv&skin=vector&version=9d0baaccfde7:99)

    at HTMLDivElement.<anonymous> (load.php?debug=false&lang=en&modules=jquery.color%2CcolorUtil%2Cfullscreen%2Chidpi|mmv&skin=vector&version=9d0baaccfde7:99)

    at HTMLDivElement.dispatch (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=BNnJutks:65)

    at HTMLDivElement.elemData.handle (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=BNnJutks:60)

validateMethod @ load.php?debug=false&lang=en&modules=ext.SimpleTooltip|ext.echo.init|ext.uls.pt|jquery.byteLength%2CcheckboxShiftClick%2CgetAttrs%2ChighlightText%2CmakeCollapsible%2Cmw-jump%2Cplaceholder%2Csuggestions|mediawiki.Title%2CsearchSuggest|mediawiki.action.view.postEdit|mediawiki.api.watch|mediawiki.page.ready|mediawiki.page.watch.ajax|mediawiki.ui.button%2Cicon|mmv.bootstrap|mmv.bootstrap.autostart|oojs%2Csite&skin=vector&version=b3e6ba0b8e8f:118

oo.EventEmitter.off @ load.php?debug=false&lang=en&modules=ext.SimpleTooltip|ext.echo.init|ext.uls.pt|jquery.byteLength%2CcheckboxShiftClick%2CgetAttrs%2ChighlightText%2CmakeCollapsible%2Cmw-jump%2Cplaceholder%2Csuggestions|mediawiki.Title%2CsearchSuggest|mediawiki.action.view.postEdit|mediawiki.api.watch|mediawiki.page.ready|mediawiki.page.watch.ajax|mediawiki.ui.button%2Cicon|mmv.bootstrap|mmv.bootstrap.autostart|oojs%2Csite&skin=vector&version=b3e6ba0b8e8f:119

oo.EventEmitter.disconnect @ load.php?debug=false&lang=en&modules=ext.SimpleTooltip|ext.echo.init|ext.uls.pt|jquery.byteLength%2CcheckboxShiftClick%2CgetAttrs%2ChighlightText%2CmakeCollapsible%2Cmw-jump%2Cplaceholder%2Csuggestions|mediawiki.Title%2CsearchSuggest|mediawiki.action.view.postEdit|mediawiki.api.watch|mediawiki.page.ready|mediawiki.page.watch.ajax|mediawiki.ui.button%2Cicon|mmv.bootstrap|mmv.bootstrap.autostart|oojs%2Csite&skin=vector&version=b3e6ba0b8e8f:120

LIP.unattach @ load.php?debug=false&lang=en&modules=jquery.color%2CcolorUtil%2Cfullscreen%2Chidpi|mmv&skin=vector&version=9d0baaccfde7:99

(anonymous) @ load.php?debug=false&lang=en&modules=jquery.color%2CcolorUtil%2Cfullscreen%2Chidpi|mmv&skin=vector&version=9d0baaccfde7:99

dispatch @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=BNnJutks:65

elemData.handle @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=BNnJutks:60

Manu3d (talkcontribs)

By the way, I'm the author of this entry, I just couldn't login earlier.

Tacsipacsi (talkcontribs)

Appending ?debug=true to the URL (or &debug=true if there’s already a ? in it) is always good for debugging. (You need to place it right before the # sign if there is one.) It makes URLs simpler and line numbers easier to find.

Reply to "Clicking on the X button leads to a black page."

Clicking an image makes the screen go black

Smason3346 (talkcontribs)

Using Media Wiki 1.28.1 and MultimediaViewer ver (b426dc3) .

I'm using an internal WAMP server. Mutlimedia viewer is enabled in Preferences.

When I click on a image the screen simply goes completely black.

There are no javascript errors. I've tried changing the value of $wgMediaViewerUseThumbnailGuessing to both true and false and it made no difference.

Is this a known issue? What are some things I could check?

Reply to "Clicking an image makes the screen go black" (talkcontribs)

Forgive me if the question is noob but I don't understand how to make mediaviewer with a widget+script (that changes image based on select), since you can't use image markup, I'm wondering if it's possible at all... . (talkcontribs)

using attr seems to change a preexisting image, but still displays the link and preview of the older image dispite the href tag already change in <a class=image>

Reply to "img tags and multimediaviewer"

[Solved]Not enabled by default

Summary by Tgr (WMF)
John Cena 12321 (talkcontribs)

I recently upgraded to MediaWiki 1.27.0-wmf.17, and now Media Viewer is not enabled by default for registered users.

It works with anonymous users, and I have enabled $wgMediaViewerEnableByDefault

Is this a bug or am I missing something?


Tgr (WMF) (talkcontribs)

Probably a bug.

UksusoFF (talkcontribs)

It's because return (bool)$user->getOption( 'multimediaviewer-enable' );

Zoglun (talkcontribs)

So how to fix this error?

Zoglun (talkcontribs)

All right, I know how to fix it now.

Add $wgDefaultUserOptions['multimediaviewer-enable'] = 1; to Localsettings.php for temporary fix. and I submit a bug report to phabricator. Hope it fix soon.

Soumya.sadanandan (talkcontribs)

Thanks, this solved my issue for MW 1.27

Reply to "[Solved]Not enabled by default"
Zoglun (talkcontribs)

The bar contain title, uploader, more detail button, and copyright foot notice are not needed in my wiki. I'd like it only show the photo. How can I archive this goal?

I knew FancyBoxThumbs extension have exactly the GUI I want, but that extension only load the original file which create unacceptable huge amount of bandwidth cost.

Reply to "How to hide the bottom white bar?"