I apologise if this message has come through before. But I appear to have some issues posting to the list.
---------- Hi
I am are trying to link from one wiki on one server to one wiki on another one. We can pull in text, but somehow images are not being sent through. Does anyone know why it doesn't work for images?
This is on MW 1.10.0 and Apache. $wgAllowExternalImages is set to true and scary transcluding is enabled... I am running out of ideas...
It is not Apache. I have checked and hotlinking is not disabled.
Thanks,
Andi
Andreas Rindler wrote:
I apologise if this message has come through before. But I appear to have some issues posting to the list.
Hi
I am are trying to link from one wiki on one server to one wiki on another one. We can pull in text, but somehow images are not being sent through. Does anyone know why it doesn't work for images?
Because it's for templates (page text).
This is on MW 1.10.0 and Apache. $wgAllowExternalImages is set to true
That's for URLs: http://example.com/foo.jpg
and scary transcluding is enabled... I am running out of ideas...
That's for text.
For a single integrated shared image repository, see $wgUseSharedUploads & co.
-- brion vibber (brion @ wikimedia.org)
On 23/07/07, Brion Vibber brion@wikimedia.org wrote:
Andreas Rindler wrote:
I apologise if this message has come through before. But I appear to have some issues posting to the list.
Hi
I am are trying to link from one wiki on one server to one wiki on another one. We can pull in text, but somehow images are not being sent through. Does anyone know why it doesn't work for images?
Because it's for templates (page text).
But it works for regular articles. The only problem is that pictures are not coming through. And it looks like as if the picture is about to get displayed, but then only a box with the image name ends up on the transcluded page.
This is on MW 1.10.0 and Apache. $wgAllowExternalImages is set to true
That's for URLs: http://example.com/foo.jpg
ahh! I get it!
and scary transcluding is enabled... I am running out of ideas...
That's for text.
see above? It's not possible for images? There would be no technical reason why this shouldn't work.
For a single integrated shared image repository, see $wgUseSharedUploads & co.
-- brion vibber (brion @ wikimedia.org)
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Thanks, Andi
Andreas Rindler wrote:
and scary transcluding is enabled... I am running out of ideas...
That's for text.
see above? It's not possible for images? There would be no technical reason why this shouldn't work.
See what Brion told you: "For a single integrated shared image repository, see $wgUseSharedUploads & co"
It's a different parameter. You make one wiki the place whose uploasd can be used by all your wikis . Then you make sure your transwikied pages only use images from that place (which can be the original wiki ;) ).
ok, thanks for the double pointer. I need to explain further then: wiki A is public wiki B is private (behind firewall, so no access from the outside, but any access from the inside to the outside)
wiki B should transclude pages from wiki A. but the images aren't coming through.
==> configure $wgUseSharedUploads to store all images from A and B on A so that B can pull from A.
my problem is that some of the images (and the content) on B are sensitive and shouldn't be stored on a public wiki (wiki B).
any suggestions for that?
On 24/07/07, Platonides Platonides@gmail.com wrote:
Andreas Rindler wrote:
and scary transcluding is enabled... I am running out of ideas...
That's for text.
see above? It's not possible for images? There would be no technical reason why this shouldn't work.
See what Brion told you: "For a single integrated shared image repository, see $wgUseSharedUploads & co"
It's a different parameter. You make one wiki the place whose uploasd can be used by all your wikis . Then you make sure your transwikied pages only use images from that place (which can be the original wiki ;) ).
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
==> configure $wgUseSharedUploads to store all images from A and B on A so that B can pull from A.
my problem is that some of the images (and the content) on B are sensitive and shouldn't be stored on a public wiki (wiki B).
any suggestions for that?
I don't think there is anything stopping you having images on B as well (which are only accessible by B). The $wgUseSharedUploads parameter just lets B use A's images in addition to its own.
On 24/07/07, Thomas Dalton thomas.dalton@gmail.com wrote:
==> configure $wgUseSharedUploads to store all images from A and B on A so that B can pull from A.
my problem is that some of the images (and the content) on B are sensitive and shouldn't be stored on a public wiki (wiki B).
any suggestions for that?
I don't think there is anything stopping you having images on B as well (which are only accessible by B). The $wgUseSharedUploads parameter just lets B use A's images in addition to its own.
this will allow me to specify a [[Image:imagename.png]] link to an image that is not stored locally but rather on a shared image folder on wiki A. But does it pull down the image that is linked within an article. When the article comes through on wiki B, it appears that the link to the image is a complete link and not a wiki link. Would it still resolve the $wgshareduploadspath?
this will allow me to specify a [[Image:imagename.png]] link to an image that is not stored locally but rather on a shared image folder on wiki A. But does it pull down the image that is linked within an article. When the article comes through on wiki B, it appears that the link to the image is a complete link and not a wiki link. Would it still resolve the $wgshareduploadspath?
According to [[Help:Images]] on Wikipedia, [[Image:imagename.png]] will be turned into the picture with that file name as stored on the local wiki if it exists, if it doesn't exist it will look at the wiki specificed in the sharedupload parameter and use that (if it still doesn't exist, it will be a redlink).
Thomas Dalton wrote:
According to [[Help:Images]] on Wikipedia, [[Image:imagename.png]] will be turned into the picture with that file name as stored on the local wiki if it exists, if it doesn't exist it will look at the wiki specificed in the sharedupload parameter and use that (if it still doesn't exist, it will be a redlink).
IIRC, this will get buggered up if one of the wikis uses image subdirectories and the other does not. The default assumption is that both use image subdirectories. (unless this has been fixed since I messed with it a year ago).
Mike
On 24/07/07, Michael Daly michaeldaly@kayakwiki.org wrote:
IIRC, this will get buggered up if one of the wikis uses image subdirectories and the other does not. The default assumption is that both use image subdirectories. (unless this has been fixed since I messed with it a year ago).
Assuming the repository does not have $wgHashedUploadDirectory switched on, one would need to set $wgHashedSharedUploadDirectory to false in LocalSettings.php.
For remote repositories configured using the $wgForeignFileRepos directive, set matching values for the "hashLevels" property of the corresponding data structure.
Rob Church
Rob Church wrote:
Assuming the repository does not have $wgHashedUploadDirectory switched on, one would need to set $wgHashedSharedUploadDirectory to false in LocalSettings.php.
Live and learn - I guess I didn't mess around enough.
Mike
On 24/07/07, Rob Church robchur@gmail.com wrote:
On 24/07/07, Michael Daly michaeldaly@kayakwiki.org wrote:
IIRC, this will get buggered up if one of the wikis uses image subdirectories and the other does not. The default assumption is that both use image subdirectories. (unless this has been fixed since I messed with it a year ago).
Assuming the repository does not have $wgHashedUploadDirectory switched on, one would need to set $wgHashedSharedUploadDirectory to false in LocalSettings.php.
For remote repositories configured using the $wgForeignFileRepos directive, set matching values for the "hashLevels" property of the corresponding data structure.
I have been reading up on all the pages mentioned in this thread and here is what I have tried to configure:
I didn't change anything on A (=public, = http://mike2.openmethodology.org)
I added the following variables to the internal wiki: $wgSharedUploadPath="http://mike2.openmethodology.org/images/"; $wgUseSharedUploads=true; $wgHashedSharedUploadDirectory=false; (although by default this was uncommented in my LocalSettings file)
But I can't get it to work.
We want a similar setup like Wikipedia and Wikimedia. All our free content is on mike2.openmethodology.org (=Wikimedia) and our internal wiki can pull any content from the open site. Any article or image on mike2 can be transcluded from the open site by any wiki that we specify (otherwise we will get hit with hotlinking)
Andreas Rindler wrote:
I didn't change anything on A (=public, = http://mike2.openmethodology.org)
I added the following variables to the internal wiki: $wgSharedUploadPath="http://mike2.openmethodology.org/images/"; $wgUseSharedUploads=true; $wgHashedSharedUploadDirectory=false; (although by default this was uncommented in my LocalSettings file)
You seem to miss $wgSharedUploadDirectory, $wgSharedUploadDBname
On 25/07/07, Platonides Platonides@gmail.com wrote:
Andreas Rindler wrote:
I didn't change anything on A (=public, = http://mike2.openmethodology.org)
I added the following variables to the internal wiki: $wgSharedUploadPath="http://mike2.openmethodology.org/images/"; $wgUseSharedUploads=true; $wgHashedSharedUploadDirectory=false; (although by default this was uncommented in my LocalSettings file)
You seem to miss $wgSharedUploadDirectory, $wgSharedUploadDBname
and these are also configured on B, the internal wiki? I read through the description on the below links, but I can't make out which directory on what server I need to configure.
http://www.mediawiki.org/wiki/Manual:$wgSharedUploadDirectory http://www.mediawiki.org/wiki/Manual:$wgSharedUploadDBname
Thanks!
Andreas Rindler wrote:
Platonides wrote:
You seem to miss $wgSharedUploadDirectory, $wgSharedUploadDBname
and these are also configured on B, the internal wiki? I read through the description on the below links, but I can't make out which directory on what server I need to configure.
Yes, you tell B which db A uses (by default tries to access with the same db login as B's) and on which local folder (for B) the images are (for creating thumbnails). It's a folder seen from B's server, so if A is on another computer you would mount it on B using a remote filesystem like NFS.
On 25/07/07, Platonides Platonides@gmail.com wrote:
Andreas Rindler wrote:
Platonides wrote:
You seem to miss $wgSharedUploadDirectory, $wgSharedUploadDBname
and these are also configured on B, the internal wiki? I read through the description on the below links, but I can't make out which directory on what server I need to configure.
Yes, you tell B which db A uses (by default tries to access with the same db login as B's) and on which local folder (for B) the images are (for creating thumbnails).
ah, makes sense. I tried the setup but got an error:
Sorry! This site is experiencing technical difficulties. Try waiting a few minutes and reloading. (Can't contact the database server: Access denied for user 'wikiadmin'@'%' to database 'wikidb@localhost' (localhost))
I also found an old posting regarding this issues: http://lists.wikimedia.org/pipermail/mediawiki-l/2005-December/008696.html
It's a folder seen from B's server, so if A is on another computer you would mount it on B using a remote filesystem like NFS.
mhh,. I will have to look into that because that has security implications, right? Is there a way to have the thumbnail generation somewhere else?
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
I am gonna change my setup. I am currently using a Linux box to host Mike2 (external website A) and a Windows machine for the internal site. I will switch to Linux internally, set up an exact mirror of the public site and try to use NFS over SSH between the two sites ( http://www.howtoforge.com/nfs_ssh_tunneling). I know that Wikipedia is run on multiple, distributed server farms. Are you using the same setup then in order to have all the Wikipedia project sites connect to Wikicommons to transclude/include the media files?
Another option I am considering is to schedule a 1 minute cron job with rscync over ssh to mirror the public site internally and then use transclusion from a local server.
I will keep you posted on my experiments...
Thanks, Andi
On 25/07/07, Andreas Rindler arindler@jenandi.com wrote:
On 25/07/07, Platonides Platonides@gmail.com wrote:
Andreas Rindler wrote:
Platonides wrote:
You seem to miss $wgSharedUploadDirectory, $wgSharedUploadDBname
and these are also configured on B, the internal wiki? I read through the description on the below links, but I can't make out which directory on what server I need to configure.
Yes, you tell B which db A uses (by default tries to access with the same db login as B's) and on which local folder (for B) the images are (for creating thumbnails).
ah, makes sense. I tried the setup but got an error:
Sorry! This site is experiencing technical difficulties. Try waiting a few minutes and reloading. (Can't contact the database server: Access denied for user 'wikiadmin'@'%' to database ' wikidb@localhost' (localhost))
I also found an old posting regarding this issues: http://lists.wikimedia.org/pipermail/mediawiki-l/2005-December/008696.html
It's a folder seen from B's server, so if A is on another computer you would mount it on B using a remote filesystem like NFS.
mhh,. I will have to look into that because that has security implications, right? Is there a way to have the thumbnail generation somewhere else?
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Hi, we got it to work (big thanks to Liam!) but the solution is not related to anything in this thread (!?). Just to recap, I wanted to pull articles with images from my public wiki to my internal wiki (using transclusion). The articles came through, but images appeared as placeholders with a link to the source images on the public wiki (so you could click on it and view the image on the public wiki)..
The solution is to add the below to LocalSettings.php on the source wiki: $wgUploadBaseUrl=$wgServer;
This adds the proper scr= attribute to the <img> tag which means that the transcluded article also pulls through the image.
Make sure you also set the following on the local wiki: $wgAllowExternalImages = true; $wgEnableScaryTranscluding = true;
So no $wgSharedUploadXXX configuration or NFS configuration is necessary at all. Shareduploads enable you to specify a link in a regular article (no transclusion) to an image that doesn't exist on the local wiki and force the local wiki to check the image repository at another wiki (configured in $wgSharedUploadPath and $wgSharedUploadDirectory) if it can pull the image from there.
Anyone have a suggestion where on mediawiki.org I should document this properly?
Cheers, Andreas
On 27/07/07, Andreas Rindler arindler@jenandi.com wrote:
I am gonna change my setup. I am currently using a Linux box to host Mike2 (external website A) and a Windows machine for the internal site. I will switch to Linux internally, set up an exact mirror of the public site and try to use NFS over SSH between the two sites ( http://www.howtoforge.com/nfs_ssh_tunneling). I know that Wikipedia is run on multiple, distributed server farms. Are you using the same setup then in order to have all the Wikipedia project sites connect to Wikicommons to transclude/include the media files?
Another option I am considering is to schedule a 1 minute cron job with rscync over ssh to mirror the public site internally and then use transclusion from a local server.
I will keep you posted on my experiments...
Thanks, Andi
On 25/07/07, Andreas Rindler arindler@jenandi.com wrote:
On 25/07/07, Platonides Platonides@gmail.com wrote:
Andreas Rindler wrote:
Platonides wrote:
You seem to miss $wgSharedUploadDirectory, $wgSharedUploadDBname
and these are also configured on B, the internal wiki? I read through the description on the below links, but I can't make out which directory on what server I need to configure.
Yes, you tell B which db A uses (by default tries to access with the same db login as B's) and on which local folder (for B) the images are (for creating thumbnails).
ah, makes sense. I tried the setup but got an error:
Sorry! This site is experiencing technical difficulties. Try waiting a few minutes and reloading. (Can't contact the database server: Access denied for user 'wikiadmin'@'%' to database ' wikidb@localhost' (localhost))
I also found an old posting regarding this issues: http://lists.wikimedia.org/pipermail/mediawiki-l/2005-December/008696.html
It's a folder seen from B's server, so if A is on another computer you would mount it on B using a remote filesystem like NFS.
mhh,. I will have to look into that because that has security implications, right? Is there a way to have the thumbnail generation somewhere else?
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
The solution is to add the below to LocalSettings.php on the source wiki: $wgUploadBaseUrl=$wgServer;
This adds the proper scr= attribute to the <img> tag which means that the transcluded article also pulls through the image.
Make sure you also set the following on the local wiki: $wgAllowExternalImages = true; $wgEnableScaryTranscluding = true;
So no $wgSharedUploadXXX configuration or NFS configuration is necessary at all.
Allowing all external images is rather overkill. If you just want images from one other wiki, shareduploads seems like your best bet. Since it's an internal wiki you're talking about, turning on external images is ok, but it isn't generally a good idea on publicly editable wikis.
On 02/08/07, Thomas Dalton thomas.dalton@gmail.com wrote:
The solution is to add the below to LocalSettings.php on the source wiki: $wgUploadBaseUrl=$wgServer;
This adds the proper scr= attribute to the <img> tag which means that the transcluded article also pulls through the image.
Make sure you also set the following on the local wiki: $wgAllowExternalImages = true; $wgEnableScaryTranscluding = true;
So no $wgSharedUploadXXX configuration or NFS configuration is necessary at all.
Allowing all external images is rather overkill. If you just want images from one other wiki, shareduploads seems like your best bet. Since it's an internal wiki you're talking about, turning on external images is ok, but it isn't generally a good idea on publicly editable wikis.
But in order to use shareduploads I have to create a NFS connection to the public (remote) wiki, that's at least the suggestion from previous comments on this thread. And NFS seems overkill if all I want is to transclude articles.
In my case, I will actually work on getting NFS to work anyway, because I think there is a value add in enabling this feature between the two wikis. but it's not a necessity and if it is going to be too much of a hassle, I will leave it.
But in order to use shareduploads I have to create a NFS connection to the public (remote) wiki, that's at least the suggestion from previous comments on this thread. And NFS seems overkill if all I want is to transclude articles.
In the case of an internal wiki, setting up the connection may well be more work than it's worth. If it were a public wiki, you wouldn't really have much choice.
good point ;)
On 02/08/07, Thomas Dalton thomas.dalton@gmail.com wrote:
But in order to use shareduploads I have to create a NFS connection to the public (remote) wiki, that's at least the suggestion from previous comments on this thread. And NFS seems overkill if all I want is to transclude articles.
In the case of an internal wiki, setting up the connection may well be more work than it's worth. If it were a public wiki, you wouldn't really have much choice.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
I got NFS to work. So I can now use a shared upload directory across two remote machines (e.g. a link [[Image:file.jpg]] that isn't found locally but exists in the remote wiki directory will be properly displayed).
Transclusion, however, is still now displaying the images within an article. If I check the html source then I can see that the img scr attribute points to a relative path on the remote wiki that is not resolved by the browser (hence, it displays stub box with a hyperlink to the image article on the remote wiki).
So setting $wgUploadBaseUrl=$wgServer; would solve this problem again, but then I wouldn't need the whole NFS setup again.
Any ideas how to get transclusion with images to work without $wgUploadBaseUrl=$wgServer; ?
Btw, $wgUploadBaseUrl=$wgServer; causes a wrong path if the remote wiki installation is not in the top level directory (yoursite.com) but in a sub directory (yoursite.com/wiki).
And I still haven't figured out how to configure $wgForeignFileRepos and whether this would make any difference?
Thanks, Andi
Andreas Rindler wrote:
I got NFS to work. So I can now use a shared upload directory across two remote machines (e.g. a link [[Image:file.jpg]] that isn't found locally but exists in the remote wiki directory will be properly displayed).
Transclusion, however, is still now displaying the images within an article. If I check the html source then I can see that the img scr attribute points to a relative path on the remote wiki that is not resolved by the browser (hence, it displays stub box with a hyperlink to the image article on the remote wiki).
So setting $wgUploadBaseUrl=$wgServer; would solve this problem again, but then I wouldn't need the whole NFS setup again.
Any ideas how to get transclusion with images to work without $wgUploadBaseUrl=$wgServer; ?
Btw, $wgUploadBaseUrl=$wgServer; causes a wrong path if the remote wiki installation is not in the top level directory (yoursite.com) but in a sub directory (yoursite.com/wiki).
Then you should be using $wgUploadBaseUrl='yoursite.com/wiki'.
The NFS setuup is so you can make thumbnails of shared images, which your previous trick didn't achieve.
mediawiki-l@lists.wikimedia.org