Topic on Project:Support desk

Include files of de:wikipedia

13
Karl Gruber (talkcontribs)

My version is 1.23.6 Till today morning I used nearby of commons-files files from de-wikipedia. But since few hours only "Es ist keine Datei dieses Namens vorhanden." No file with this name exists appears and not a connection to the wikipedian file exist. As sample http://regiowiki.at/wiki/Datei:Logo_Polizei_AT.svg works okay. In our Localsettings.php nothing of changes were made. So perhaps some changes from Wikipedia-de. Perhaps somebody knows more thx in advance

88.130.116.30 (talkcontribs)
AKlapper (WMF) (talkcontribs)
Karl Gruber (talkcontribs)
Karl Gruber (talkcontribs)

In the meantime the commons doesn't work too :-(( - but with a little difference. With commons the link to the image appears and with clicks I can reach the file. Other in wikipedia - not a link appears. You can see it at mainpage of http://regiowiki.at --

88.130.116.214 (talkcontribs)

Also see Manual:$wgForeignFileRepos. It is important to use HTTPS and not HTTP in the links pointing to the Wikipedia commons. The Wikimedia guys have changed their setup, redirecting people from HTTP to HTTPS and this change basically caused the issue we got reported here. This change has been reverted for now (so that it's again working also with HTTP), but it is still planned to switch to HTTPS in the future (see task T102566).

The solution is to use HTTPS in the URLs pointing to the commons repository! $wgForeignFileRepos has to be adjusted accordingly! See Manual:$wgForeignFileRepos!

Karl Gruber (talkcontribs)

I set this in the localsettings: $wgForeignFileRepos[] = array(

  'class'                   => 'ForeignAPIRepo',
  'name'                    => 'commonswiki', // Must be a distinct name
  'apibase'                 => 'https://commons.wikimedia.org/w/api.php',
  'hashLevels'              => 2,
  'fetchDescription'        => true, // Optional
  'descriptionCacheExpiry'  => 43200, // 12 hours, optional (values are seconds)
  'apiThumbCacheExpiry'     => 86400, // 24 hours, optional, but required for local thumb caching
  );

then I try with

$wgUseInstantCommons = yes and no have the same effect - a link will be created but not a thumb will be created
//$wgUseInstantCommons = ; -> not a link is created
88.130.116.214 (talkcontribs)

Hi Karl,

the URL, which you have there looks ok. However, please note that for $wgUseInstantCommons, valid values are true and false. So basically both of the lines you posted above might make your wiki explode or run away with your girlfriend, but they most likely don't do what you think they do. ;-) Depending on how the source code is written, invalid values might "work" at one place while they don't work at another.

$wgUseInstantCommons = true;
$wgUseInstantCommons = false;

are valid. To activate instant commons, set $wgUseInstantCommons = true;!

Karl Gruber (talkcontribs)

I tried it now, with a lokal testinstallation. I have the same effekt. If I link to a lokal image ->all is okay - if I link to a commons I get the error: Error creating thumbnail without more information. If I link to the file without "thumb" or other options so the link appears as File:image.jpg as a blue link, and its possible to click to commons. In the wanted files the file appears also correctly. I dont know more :-( regards and thx--

Karl Gruber (talkcontribs)
Ciencia Al Poder (talkcontribs)

I see your wiki is using InstantCommons on http instead of https

Please comment out $wgUseInstantCommons = true; and use instead:

        $wgForeignFileRepos[] = array(
                'class' => 'ForeignAPIRepo',
                'name' => 'wikimediacommons',
                'apibase' => 'https://commons.wikimedia.org/w/api.php',
                'hashLevels' => 2,
                'fetchDescription' => true,
                'descriptionCacheExpiry' => 43200,
                'apiThumbCacheExpiry' => 86400,
        );

If it continues failing, then your webserver may have problems with the certificate that WMF is using for HTTPS, for example if the server doesn't have updated certificates.

Karl Gruber (talkcontribs)

Hi, the first method I tried, it was not the failure. I think the missing certificate is the problem. But now I am not sure, how does work - so I will try it on my local test and following I can make the changes on regiowiki. But in the meantime I search a german a explanation - it's a little bit easier for me ;-) but muchas gracias :-) --

Karl Gruber (talkcontribs)

Now, I couldn't find an answer, what I should do in an local apache server, that I can call the commons-server. thx in advance --

Reply to "Include files of de:wikipedia"