Extension talk:MultimediaViewer

Jump to navigation Jump to search

About this board

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?

4
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.

3
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."

Does MultimediaViewer work on private wiki?

8
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,

Sean

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.

thanks,

Sean

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)
Reply to "Does MultimediaViewer work on private wiki?"

Clicking an image makes the screen go black

1
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"
118.212.156.250 (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... .

106.4.161.98 (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

6
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?

Thanks.

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?"
86.124.80.209 (talkcontribs)

Hello,

I installed this very nice extension and also CommonsMetadata.

Problem is I want to display under the image the contents of the summary field. Right now it displays the file name.

Can you please explain like for dummies how can I change this?

Thank you very much,

Cristian

Tgr (WMF) (talkcontribs)

The fallback chain for the main text is image caption -> file description page summary -> file name. If both caption and summary exist, the summary will be displayed below the main text.

If you see the file name, either CommonsMetadata is not working or it does not recognize the template. Test the API directly.

86.124.80.209 (talkcontribs)

Hello,

Thank you for your feedback! Indeed if I disable CommonsMetadata I get the same result.

Now I begin to understand a little bit (at least I hope). CommonsMetadata is designed to parse information on media files using the template which is used in Wikimedia Commons.

The problem I have my wiki is a simple, basic installation and the image files I uploaded have a simple text in the summary field.

I have no clue how to make a template for that, where the templates are installed (?) or what it means to test the API directly.

Thank you very much,

Cristian

86.124.80.209 (talkcontribs)

Aha

Somehow I understood (hopefully) how to test the API directly. This is what I get for an image

{
    "batchcomplete": "",
    "query": {
        "normalized": [
            {
                "from": "File:MICRO_FEINMECHANIK_00078_3_ebay_silvanadebego.JPG",
                "to": "File:MICRO FEINMECHANIK 00078 3 ebay silvanadebego.JPG"
            }
        ],
        "pages": {
            "410": {
                "pageid": 410,
                "ns": 6,
                "title": "File:MICRO FEINMECHANIK 00078 3 ebay silvanadebego.JPG",
                "imagerepository": "local",
                "imageinfo": [
                    {
                        "timestamp": "2016-10-02T12:40:43Z",
                        "user": "Cristian.buru@gmail.com"
                    }
                ]
            }
        }
    }
}

Still, no trace of the summary field information...

Tgr (WMF) (talkcontribs)
86.124.80.209 (talkcontribs)

Hello,

Yes it worked! Thank you very much for your help! In the end I simplified to something like this:

DESCRIPTION
SOURCE
AUTHOR
Reply to "Display summary of image"
62.119.183.61 (talkcontribs)

I can't get the viewer to open on images on pages. Whenever clicking on a image it takes me to there image page, from there I can click a button under the image to open the viewer. It's clearly activated but as said above it does not open images directly on pages.

Tgr (WMF) (talkcontribs)

Ceck for javascript errors.

Toriayl (talkcontribs)
Tgr (WMF) (talkcontribs)

@Toriayl works fine for me. Can you give exact reproduction steps?

Toriayl (talkcontribs)

@Tgr (WMF) Does it open a thumbnail when you click on the image on the first page I linked?! It's never worked for me, same issue as the original poster's; clicking on an image brings me to image page instead of the lightbox effect; once on the image page, clicking on Open in Media Viewer opens up fine.

I'm using Chrome Version 53.0.2785.116 m and have the same issue on Microsoft Edge 38.14393.0.0.

I have asked a few other people and gotten the below results:

Chrome: Not working

Chrome: Not working

Firefox and Chrome: Working

So I guess it's too hard to reproduce... not sure when it would work. D:

Tgr (WMF) (talkcontribs)

You might miss the errors because the browser console is cleared when the browser navigates to the new page. There is usually an option to persist error messages which avoids that.

Reply to "Not working on thumbnails"