User:WikiMaster/Image Transclusion Issues

From PortlandWiki
Revision as of 17:57, 27 November 2011 by WikiMaster (talk | contribs) (Notes.)
Jump to navigation Jump to search

Seed content for this issue page was initially created with content moved from User:WikiMaster/Projects#Image Transclusion Issues -- UPDATE.

In the discussion referred to below, a MediaWiki user was unable to successfully transclude images using ForeignDBRepo, MediaWiki's approved method for transcluding images from the Wikimedia Commons and other wikis within the Wikimedia family.

Another user suggested that a "hacky and inefficient"[1] method -- ForeignAPIRepo worked for him, and suggested the first user try it. (See RESOLVED $wgUseSharedUploads causes trouble.)

Indeed, the "hacky and inefficient" method seemed to transclude images successfully, for a time. Unfortunately, Dave's experiments with attempting to use the ForeignAPIRepo method to transclude images between PortlandWiki, Telecafe and WikiWednesday appeared to relentlessly crash our server.

ForeignDBRepo Attempt

ForeignDBRepo[] = array(
'class' => 'ForeignDBRepo',
'name' => 'otherwiki',
'url' => "http://pdx.wiki.org/images/",
'directory' => '/home/wikiwednesday/pdx.wiki.org/images',
'hashLevels' => 2, // This must be the same for the other family member
'dbType' => $wgDBtype,
'dbServer' => 'other.db.server.name.org',
'dbUser' => OtherWikiUserName,
'dbPassword' => OtherWikiPassword,
'dbFlags' => DBO_DEFAULT,
'dbName' => 'pdx_wiki_org',
'tablePrefix' => 'mediawiki',
'hasSharedCache' => false,
'descBaseUrl' => 'http://pdx.wiki.org/File:',
'fetchDescription' => false
);

$wgForeignFileRepos Usage: ForeignAPIRepo vs. ForeignDBRepo

(Shared uploads.)
Using files from a database that you can access : ForeignDBRepo
  • Workarounds:
RESOLVED $wgUseSharedUploads causes trouble (Full snippet.)
RESOLVED $wgUseSharedUploads causes trouble (The most relevant snippet of the thread.)

Test image pull from pdx.wiki.org on 03:53, 19 September 2011 (UTC)

InterWiki is working: User:WikiMaster

File:Portland civic wiki notes.jpg
Image transclusions from Portland Wiki Wednesday BEGAN TRANSCLUDING in part because the front page is NO LONGER redirected to Welcome to Portland WikiWednesday!
File:Scarecrow.JPG
This image is ALSO BEGAN transcluding from Portland Wiki Wednesday once the front page NO LONGER redirected to Welcome to Portland WikiWednesday!

Unfortunately inter-wiki transclusion between PortlandWiki, Portland Wiki Wednesday and Telecafe caused some sort of server loop or other issue that quickly overloaded the server, so we had to switch it off. (See note referring to "hacky and inefficient" method shown at top.)

At Monday Meets (19 September 2011) Kotra discovered the following api.php anomalies:
$wgForeignFileRepos[] = array(
'class' => 'ForeignAPIRepo',
'name' => 'shared',
'apibase' => 'http://portlandwiki.org/api.php', (Link goes straight to PortlandWiki api.php file.)
'apibase' => 'http://telecafe.org/smw/api.php', (Link goes straight to Telecafe api.php file.)
'apibase' => 'http://pdx.wiki.org/api.php', (Link attempts to initiate new Portland WikiWednesday api.php article.)
'apibase' => 'http://pdx.wiki.org/api.php', (UPDATED: Link goes straight to Portland WikiWednesday api.php file because front page is no longer redirected to an internal page.)
'fetchDescription' => true, // Optional
'descriptionCacheExpiry' => 43200, // 12 hours, optional (values are seconds)
'apiThumbCacheExpiry' => 43200, // 12 hours, optional, but required for local thumb caching
);

The fact that Portland WikiWednesday's $wgForeignFileRepos configuration settings result in an attempt to generate a api.php article is probably at least one of the reasons why attempts to transclude files from Portland WikiWednesday aren't working. Kotra suspects an issue with how the Portland WikiWednesday .htaccess file is written.

SOLVED: If the main page is redirected to an internal page, image transclusions won't work.
--WikiMaster (talk) 00:20, 21 September 2011 (UTC)

Changes to php.ini file on 27 September 2011.

  • display_errors = Off
27 September 2011
Changed by dave myers from "On" to "Off".
  • log_errors = On
27 September 2011
Changed by dave myers from "Off" to "On".
Latest error while editing this article with Changes to php.ini file on 27 September 2011.

Warning: mkdir() [function.mkdir]: Permission denied in /home/portlandwiki_ps/portlandwiki.org/includes/GlobalFunctions.php on line 2176

Warning: wfMkdirParents: failed to mkdir "/home/wikiwednesday/pdx.wiki.org/images/thumb/a/a4/Portland_civic_wiki_notes.jpg" mode 511 in /home/portlandwiki_ps/portlandwiki.org/includes/GlobalFunctions.php on line 2179

Warning: mkdir() [function.mkdir]: Permission denied in /home/portlandwiki_ps/portlandwiki.org/includes/GlobalFunctions.php on line 2176

Warning: wfMkdirParents: failed to mkdir "/home/wikiwednesday/pdx.wiki.org/images/thumb/0/0f/Scarecrow.JPG" mode 511 in /home/portlandwiki_ps/portlandwiki.org/includes/GlobalFunctions.php on line 2179

Seed content for section below was initially created with content moved from User:WikiMaster/Projects#Image Transclusion & Transclusion Issues.

Image Transclusion & Transclusion Issues

Mass_Effect_Wiki_Collaboration.png (URI to image.)
This file is from Wikimedia Commons and may be used by other projects. The description on its file description page.

Photo: White Stag sign, Portland.
(This file is from Wikimedia Commons and may be used by other projects. The description on its file description page.)

References