Topic on Project:Support desk

Jump to: navigation, search

Linker::makeImageLink2: File:blah.jpg does not allow inline display

4
Revil~mediawikiwiki (talkcontribs)

An example of the problem can be found here: http://50.56.114.108/index.php?title=Kodokan_Judo_Institute

If you notice, the first thing on the page is links to File:Kodokan(andLaqua).jpg and File:Kodokan logo.gif. However, these are created using [[Image:

If you click through to the image page and then click through to the image, you can view it.

I migrated to a new server recently. Previously I was on a shared host using apache, but now I have my own virtual server using lighttpd. The problem occurs on the new server using either apache or lighttpd. Before I migrated I upgraded the installation to 1.16.2 and did not notice if the problem was from that or not.

Any new files I upload will work correctly. It is just the files that I have uploaded before the migration. (so one possible solution is to re-upload all the files... but I sure hell don't want to do that.)


Here is the error the debug log gives (it gives this for any image it tries to display):

MediaHandler::getHandler: no handler found for image/jpeg
Linker::makeImageLink2: File:Kodokan(andLaqua).jpg does not allow inline display
MediaHandler::getHandler: no handler found for image/gif
Linker::makeImageLink2: File:Kodokan_logo.gif does not allow inline display

I am guessing this has something to do with $wgTrustedMediaFormats and Image::isSafeFile deeming these file types to be invalid. But I have no idea why they would be doing this.

Any help would be appreciated.

This post was posted by Revil~mediawikiwiki, but signed as Revil.

Revil~mediawikiwiki (talkcontribs)

Hrmm... interesting. If I go to the image page and force a purge, it will rebuild the image. While I am glad I am getting closer to the root issue, I still have no idea what is going on. any ideas?

This post was posted by Revil~mediawikiwiki, but signed as Revil.

Zaisarkar (talkcontribs)

1 year later. I am having same problem. Using mw version 1.17.0, supposed to be stable.Installed PHP GD Appreciate if you could share solution if you managed to fix the prob. Thanks! Zai

Bawolff (talkcontribs)

This can be caused if MediaWiki had trouble determining the width and/or height of the image.

The width and height are generally discovered at upload time and stored in the db. A purge action causes this data to be re-fetched from the image.

So it sounds like your db somehow got bad data for some images.

Try running the maintenance script refreshImageMetadata.php with the -f option

php refreshImageMetadata.php -f

(rebuildImages.php would probably also work. Both scripts do similar things).

Reply to "Linker::makeImageLink2: File:blah.jpg does not allow inline display"