User:WikiMaster/Image Transclusion Issues: Difference between revisions

From PortlandWiki
Jump to navigation Jump to search
m (Seed content for this issue page was initially created with content moved from User:WikiMaster/Projects#Image Transclusion Issues -- UPDATE.)
m (Reverted edits by 187.141.81.182 (talk) to last revision by WikiMaster)
 
(3 intermediate revisions by 2 users not shown)
Line 37: Line 37:
==== Test image pull from [[pdxww:|pdx.wiki.org]] on 03:53, 19 September 2011 (UTC) ====
==== Test image pull from [[pdxww:|pdx.wiki.org]] on 03:53, 19 September 2011 (UTC) ====
InterWiki is working: [[pdxww:User:WikiMaster|User:WikiMaster]]
InterWiki is working: [[pdxww:User:WikiMaster|User:WikiMaster]]
[[File:Portland civic wiki notes.jpg|thumb|left|Image transclusions from [[pdxww:|Portland Wiki Wednesday]] NOW WORK because the front page is NO LONGER redirected to [[pdxww:|Welcome to Portland WikiWednesday!]]]]
[[File:Portland civic wiki notes.jpg|thumb|left|Image transclusions from [[pdxww:|Portland Wiki Wednesday]] BEGAN TRANSCLUDING ''in part'' because the front page is NO LONGER redirected to [[pdxww:|Welcome to Portland WikiWednesday!]]]]
[[File:Scarecrow.JPG|thumb|This image is ALSO NOW transcluding from [[pdxww:|Portland Wiki Wednesday]] because the front page is NO LONGER redirected to [[pdxww:|Welcome to Portland WikiWednesday!]]]]
[[File:Scarecrow.JPG|thumb|This image is ALSO BEGAN transcluding from [[pdxww:|Portland Wiki Wednesday]] once the front page NO LONGER redirected to [[pdxww:|Welcome to Portland WikiWednesday!]]]]
<big>Unfortunately inter-wiki transclusion between [[PortlandWiki]], [[pdxww:|Portland Wiki Wednesday]] and [[telecafe:|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.)</big>
{{Clear}}
{{Clear}}


Line 54: Line 55:
:  );
:  );


The fact that [[pdxww:|Portland WikiWednesday]]'s [[mediawikiwiki:Manual:$wgForeignFileRepos|$wgForeignFileRepos]] configuration settings result in an attempt to generate a [http://pdx.wiki.org/api.php api.php] article is probably at least one of the reasons why attempts to transclude files from [[pdxww:|Portland WikiWednesday]] aren't working. [[User:Kotra|Kotra]] suspects an issue with how the [[pdxww:|Portland WikiWednesday]] .htaccess file is written.
The fact that [[pdxww:|Portland WikiWednesday]]'s [[mediawikiwiki:Manual:$wgForeignFileRepos|$wgForeignFileRepos]] configuration settings result in an attempt to generate a [http://pdx.wiki.org/api.php api.php] article is probably '''at least one of the reasons''' why attempts to transclude files from [[pdxww:|Portland WikiWednesday]] aren't working. [[User:Kotra|Kotra]] suspects an issue with how the [[pdxww:|Portland WikiWednesday]] .htaccess file is written.
:<span style="background-color:yellow;"><big>'''SOLVED'''</big>: If the main page is redirected to an internal page, image transclusions won't work.</span>
:<span style="background-color:yellow;"><big>'''SOLVED'''</big>: If the main page is redirected to an internal page, image transclusions won't work.</span>
:: --[[User:WikiMaster|WikiMaster]] ([[User talk:WikiMaster|talk]]) 00:20, 21 September 2011 (UTC)
:: --[[User:WikiMaster|WikiMaster]] ([[User talk:WikiMaster|talk]]) 00:20, 21 September 2011 (UTC)
Line 73: Line 74:


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
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
<big>'''Seed content for section below was initially created with content moved from [[User:WikiMaster/Projects#Image Transclusion & Transclusion Issues]].'''</big>
=== Image Transclusion & Transclusion Issues ===
* [[mediawikiwiki:Manual:Linked images|Manual:Linked images]]
* [[File:MediaWiki logo without tagline.png|50px|link=File:MediaWiki logo without tagline.png]] (Link to [[commons:File:MediaWiki logo without tagline.png|MediaWiki sunflower logo]].)
* [[upwikimedia:en/e/e6/Mass Effect Wiki Collaboration.png|Mass Effect Wiki Collaboration.png]] (Goofy [[Special:Interwiki|InterWiki]] link connects to actual image located at [[upwikimedia:|upload.wikimedia.org/wikipedia]], which appears to only allow access to specific full image [[wikipedia:Uniform Resource Identifier|URI]]s like the one shown below.)
: http://upload.wikimedia.org/wikipedia/en/e/e6/Mass_Effect_Wiki_Collaboration.png ([[wikipedia:Uniform Resource Identifier|URI]] to image.)
[[File:Portland Oregon - White Stag sign.jpg|thumb|This file is from [[commons:Wikimedia Commons|Wikimedia Commons]] and may be used by other projects. The description on its [[commons:File:Portland Oregon - White Stag sign.jpg|file description page]].]]
[[File:Portland Oregon - White Stag sign.jpg|200px|Photo: White Stag sign, Portland.|link=wikipedia:Wikipedia:Meetup/Portland]]<br />(This file is from [[commons:Wikimedia Commons|Wikimedia Commons]] and may be used by other projects. The description on its [[commons:File:Portland Oregon - White Stag sign.jpg|file description page]].)


== References ==
== References ==
{{Reflist}}
{{Reflist}}

Latest revision as of 12:30, 19 December 2011

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