Hello everyone,
We want to implement a MW-based WikiFamily with a reserved "pool" instance, very similarly to Wikipedia, but we're encountering some problems with the media sharing.
We followed this process: 1) we started from - three language instances - containing about 1000 images altogether - configured with Wikipedia-style URL scheme: http://<lang>.domain.com/wiki/<Node> 2) we installed and set up one "pool" wiki instance, according to "Scenario 5" of http://www.mediawiki.org/wiki/Manual:Wiki_family 3) we modified maintenance/importImages.php to import automatically from any language instance to the "pool" all images along with metadata (description, author etc)
The pool contains all medias of all language instances, and the "Upload file" link in the toolbox of each wiki points to the pool's Special:Upload correctly.
The relevant configuration for the language wikis is as follows: === $wgUploadNavigationUrl = "http://pool.domain.com/wiki/Special:Upload"; $wgUseSharedUploads = true; $wgSharedUploadPath = 'http://pool.domain.com/wiki/File:'; $wgSharedUploadDirectory = '/var/www/wikis/wiki-pool/images/'; $wgHashedSharedUploadDirectory = true; $wgEnableUploads = false; ===
However, trying to enforce the "pool fallback lookup" documented http://www.mediawiki.org/wiki/Manual:$wgUseSharedUploads we tried moving away the instance's own images/ directory. Doing this, all images result into a broken link.
We suspect the problem is in a misconfiguration of $wgSharedUploadPath , which isn't quite clear from the WikiFamily example or its own documentation, but cannot track down the problem more specifically. Notably, we observed that none of the includes/filerepo/* files is loaded.
Can anyone help out with nailing down this problem? Thanks!
Mij wrote:
However, trying to enforce the "pool fallback lookup" documented http://www.mediawiki.org/wiki/Manual:$wgUseSharedUploads we tried moving away the instance's own images/ directory. Doing this, all images result into a broken link.
The instance still see the images as "local" at its image table in the db. MediaWiki doesn't check that the file is still there at images/ folder.
Test it with a file which wasn't previously uploaded locally, then try deleting entries from image table.
On Jan 13, 2010, at 24:57 , Platonides wrote:
Mij wrote:
However, trying to enforce the "pool fallback lookup" documented http://www.mediawiki.org/wiki/Manual:$wgUseSharedUploads we tried moving away the instance's own images/ directory. Doing this, all images result into a broken link.
The instance still see the images as "local" at its image table in the db. MediaWiki doesn't check that the file is still there at images/ folder.
Test it with a file which wasn't previously uploaded locally, then try deleting entries from image table.
That's correct. Thanks!
Hello,
Some people answered to this post asking for the code I used for importing preserving the media's metadata. I attach it here. For usage instructions see --help. For more details, see the comments heading the smartImportImages.php file. If there is a formal submission process for contribs, sorry for not following it.
On Jan 12, 2010, at 16:46 , Mij wrote:
Hello everyone,
We want to implement a MW-based WikiFamily with a reserved "pool" instance, very similarly to Wikipedia, but we're encountering some problems with the media sharing.
We followed this process:
- we started from
- three language instances
- containing about 1000 images altogether
- configured with Wikipedia-style URL scheme: http://<lang>.domain.com/wiki/<Node>
- we installed and set up one "pool" wiki instance, according to "Scenario 5"
of http://www.mediawiki.org/wiki/Manual:Wiki_family 3) we modified maintenance/importImages.php to import automatically from any language instance to the "pool" all images along with metadata (description, author etc)
The pool contains all medias of all language instances, and the "Upload file" link in the toolbox of each wiki points to the pool's Special:Upload correctly.
The relevant configuration for the language wikis is as follows:
$wgUploadNavigationUrl = "http://pool.domain.com/wiki/Special:Upload"; $wgUseSharedUploads = true; $wgSharedUploadPath = 'http://pool.domain.com/wiki/File:'; $wgSharedUploadDirectory = '/var/www/wikis/wiki-pool/images/'; $wgHashedSharedUploadDirectory = true; $wgEnableUploads = false; ===
However, trying to enforce the "pool fallback lookup" documented http://www.mediawiki.org/wiki/Manual:$wgUseSharedUploads we tried moving away the instance's own images/ directory. Doing this, all images result into a broken link.
We suspect the problem is in a misconfiguration of $wgSharedUploadPath , which isn't quite clear from the WikiFamily example or its own documentation, but cannot track down the problem more specifically. Notably, we observed that none of the includes/filerepo/* files is loaded.
Can anyone help out with nailing down this problem? Thanks!
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Mij wrote:
Hello,
Some people answered to this post asking for the code I used for importing preserving the media's metadata. I attach it here. For usage instructions see --help. For more details, see the comments heading the smartImportImages.php file. If there is a formal submission process for contribs, sorry for not following it.
The mailing list removed the attachment. You can provide an external link. Or if you license it as GPL, it could be committed into mediawiki svn.
On Jan 16, 2010, at 24:28 , Platonides wrote:
Mij wrote:
Hello,
Some people answered to this post asking for the code I used for importing preserving the media's metadata. I attach it here. For usage instructions see --help. For more details, see the comments heading the smartImportImages.php file. If there is a formal submission process for contribs, sorry for not following it.
The mailing list removed the attachment. You can provide an external link. Or if you license it as GPL, it could be committed into mediawiki svn.
http://www.howtopedia.org/public/mw-smart-import.tbz
I release it with the least restrictive license applicable, considering the code is derivative work of the respective maintenance scripts from the MW distribution. Feel free to commit this or modifications of it to your repos.
Mij wrote:
http://www.howtopedia.org/public/mw-smart-import.tbz
I release it with the least restrictive license applicable, considering the code is derivative work of the respective maintenance scripts from the MW distribution. Feel free to commit this or modifications of it to your repos.
Commited in r62087 [1]. I renamed the option from --source_wiki_url to --source-wiki-url to be consistent with the options names.
1. http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62087
mediawiki-l@lists.wikimedia.org