Topic on Project:Support desk/Flow

Problems after migrating 1.28 to 1.30

19
Summary by Ciencia Al Poder
Vledru (talkcontribs)
Ciencia Al Poder (talkcontribs)

If your wiki is public, please share a link so we can take a look at the problem.

Open a file description page (a page of the File: namespace) and click on the "view full size". If it displays an error instead of the file itself, something is misconfigured. If the error is a 404 not found, either MediaWiki is pointing to the wrong URL or your webserver has problematic rewrite rules. If error is a "forbidden" or "unauthorized", there may be problems with permissions of those files.

If it works fine, then problem may be for thumbnails.

Vledru (talkcontribs)

Thank you Ciencia Al Poder

My wiki is not public ... However, I did your tests and everything works normally. When I remove the size of my thumbnail in my wikicode [[File: example.jpg | 400px | legend]] -> [[File: example.jpg | legend]] it works perfectly ...

Really strange ^^

Ciencia Al Poder (talkcontribs)

Problem is on thumbnails, then. Use the thumb.php script (from your browser) to request a file on your wiki (with the "f" parameter) and provide a width for the thumbnail (the "w" parameter), and see what happens, if it's displayed correctly or it displays an error.

Robert.hanke (talkcontribs)

Hi,

I have the same problem. This doesn't work in my wiki:

[[File:image.png|thumb|My Image]]

this works:

[[File:image.png|frame|My Image]]

thumb.php works just fine:

thumb.php?f=image.png&w=200&h=200

My wiki is also a private wiki.

Ciencia Al Poder (talkcontribs)
62.96.230.167 (talkcontribs)

We face the same problem after upgrading to 1.30: Thumbnails are shown as broken images though they are correctly rendered on server side. The developer console of chrome reveals the following error messages:

Failed parsing 'srcset' attribute value since it has an unknown descriptor.

Dropped srcset candidate "/uploads/thumb/xxx.png/450px-xxx.png"

Failed parsing 'srcset' attribute value since it has an unknown descriptor.

Dropped srcset candidate "/uploads/thumb/xxx.png/450px-xxx.png"

GET https://aaa.bbb.ccc/5x 404 (Not Found)

Turning off Manual:$wgGenerateThumbnailOnParse and running maintenance script Manual:FAQ#…are some of my images not showing up after an upgrade does not fix the issue.

thumb.php works perfectly.

Maybe this thread deals with the same issue: Topic:U7m4bysmlzhqp0y1 ?

Is this a known bug, can anybody confirm this behaviour or is there any solution?

Ciencia Al Poder (talkcontribs)

Inspect the image with the developer tools of your browser (right-click and inspect this element, or hit F12 and manually select the image). If the srcset property contains commas instead of dots, the problem is the server locale and you should change it on LocalSettings.php by adding:

setlocale(LC_NUMERIC, "C");

See task T181987

62.96.230.166 (talkcontribs)

This fixed our problem, thank you!

Vledru (talkcontribs)

Sorry for the delay, I had to let go of my investigation ... Thank you all for solution! It's resolved!

Rastaferraille (talkcontribs)

Hello, thanks for the trick but for me setlocale(LC_NUMERIC,"C"); has no effect..

dots are still replaced by comma in my html

Do you have an idea please ?

Many thanks (I'm from France, I upgraded PHP form 5.6 to 7.0 and mediawiki from 1.27 to 1.31)

Ciencia Al Poder (talkcontribs)

Have you tried editing the page and doing a preview, to be sure you're not seeing a cached version of the page generated before the change in setlocale?

2003:C3:FF06:EE45:208A:E623:86ED:4F98 (talkcontribs)

Hello Ciencia Al Poder, Rastaferraille

I have the same problem. I did update from 1.21.? to 1.30.0. I stayed on PHP 5.6.

I set setlocale(LC_NUMERIC,"C")

I can still see the "," here:

srcset="/thumb.php?f=Hertha-Trikot.png&width=375 1,5x, /thumb.php?f=Hertha-Trikot.png&width=500 2x"

If I change that line manually to:

srcset="/thumb.php?f=Hertha-Trikot.png&width=375 1.5x, /thumb.php?f=Hertha-Trikot.png&width=500 2x"

it works. But setlocale(LC_NUMERIC,"C") didnt do the trick for me.

The site is herthawiki.de.

2003:C3:FF06:EE45:208A:E623:86ED:4F98 (talkcontribs)

The second i wrote this, i clicked "See task T181987" from @Ciencia Al Poder and now i feel dumb. because

#$wgShellLocale = "de_DE.utf8";

was overriding

setlocale(LC_NUMERIC, "C");

All runs fine now. 5 years worth of updates on one evening. nice product u got there.

Ciencia Al Poder (talkcontribs)

Do you mean having both

$wgShellLocale = "de_DE.utf8";
setlocale(LC_NUMERIC, "C");

didn't fix the problem?, and you had to remove $wgShellLocale altogether?

2003:C3:FF06:EE45:208A:E623:86ED:4F98 (talkcontribs)

yes that fixed the problem

2003:C3:FF06:EE45:208A:E623:86ED:4F98 (talkcontribs)

To be more precise yes having both

$wgShellLocale = "de_DE.utf8";

setlocale(LC_NUMERIC, "C");

set in LocalSettings.php. Did not fix the problem.

When comment $wgShellLocale = "de_DE.utf8"; out. The comma in srcset is gone. And the image is shown. I can reproduce that.

195.202.154.250 (talkcontribs)

Almost the same effect here: Upgraded from 1.29.2 -> 1.31.0 (PHP 7.0.30). Using "setlocale(LC_NUMERIC, "C");" INSTEAD of "wgShellLocale = "de_AT.utf8";" fixed it. Using both doesn't work, the effect can be reproduced.

195.50.143.146 (talkcontribs)

Works for me. Thank you!

Reply to "Problems after migrating 1.28 to 1.30"