1
limesle
Mediawiki 1.17 and pages import
  • 2006/11/7 8:17

  • limesle

  • Just popping in

  • Posts: 8

  • Since: 2006/11/4


Hello,
I've got a XOOPS 2.015 site with the mediawiki 1.71 module.
I imported some pages from another mediawiki site, with the import function of mediawiki itself.
Those pages appear correctly. I uploaded the images repertory to my xoopsed mediawiki, in the images repertory of mediawiki with all subrepertories. But I can't see the images in articles.

So I changed 2 lines in the LocalSetting.php.

Quote:
$wgUploadPath = str_replace( $wgServer, '', XOOPS_UPLOAD_URL )."/".MEDIAWIKI_DIRNAME;
$wgUploadDirectory = XOOPS_UPLOAD_PATH."/".MEDIAWIKI_DIRNAME;


by the original mediawiki lines.

Quote:

$wgUploadPath = "$wgScriptPath/images";
$wgUploadDirectory = "$IP/images";


But the problem still there.
Do you have an idea ?

2
Blazer
Re: Mediawiki 1.17 and pages import
  • 2006/11/8 19:49

  • Blazer

  • Just popping in

  • Posts: 3

  • Since: 2006/11/8


I have this exact same problem (not able to upload images). Please post if you figure out how to fix it.

Also, not only do links to existing images not work, but when I try to upload a new image, I get:

Upload warning
The file is corrupt or has an incorrect extension. Please check the file and upload again.

3
Blazer
Re: Mediawiki 1.17 and pages import
  • 2006/11/8 22:06

  • Blazer

  • Just popping in

  • Posts: 3

  • Since: 2006/11/8


I just worked on this some more, and by turning on $wgDebugLogFile in LocalSettings.php, I was able to discover that apparently whenever I upload an image file, its being detected as plaintext and thus rejected:


Quote:

Start request
POST /modules/mediawiki/index.php/Special:Upload
Host: internal.ciscolearning.org
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.4) Gecko/20060614 Fedora/1.5.0.4-1.2.fc5 Firefox/1.5.0.4 pango-text
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://mysite.com/modules/mediawiki/index.php?title=Special:Upload&wpDestFile=Masterlinux.gif
Cookie: PHPSESSID=42fb2b5c30956453f; ZMSESSID=1ba25b575f155650e953ec6
Content-Type: multipart/form-data; boundary=---------------------------127218194617346527312089452390
Content-Length: 3919

Main cache: FakeMemCachedClient
Message cache: MediaWikiBagOStuff
Parser cache: MediaWikiBagOStuff
Using reader #0: 10.0.0.3...

UploadForm: watchthis is: ''
WebRequest::getFileName() 'masterlinuxadministrator.gif' normalized to 'masterlinuxadministrator.gif'
User::isBlocked: enter
User::getBlockedStatus: checking...
IP: 10.216.50.112
Block::load: '10.0.0.112', '19', 1
User::getBlockedStatus: No block.
MacBinary: 0000: 47 49 46 38 39 61 aa 00 32 00 f7 00 00 00 00 00 GIF89a..2.......
MacBinary: 0010: ff 52 00 7b 66 00 ff ff ff 99 a1 a9 ff 66 08 ff .R.{f........f..
MacBinary: 0020: b1 80 08 08 08 b9 4a 00 42 18 00 80 80 88 ff 6b ......J.B......k
MacBinary: 0030: 00 7b 7b 7b 90 7b 10 80 80 80 66 66 66 ff 88 4a .{{{.{....fff..J
MacBinary: 0040: ff da c2 a1 a1 a1 ff 88 39 52 21 00 ff c2 00 d2 ........9R!.....
MacBinary: 0050: 6b 29 88 39 00 e3 b1 00 4a 4a 52 da d2 b9 e3 5a k).9....JJR....Z
MacBinary: 0060: 00 f3 e3 88 4a 4a 4a 99 7b 66 66 52 42 cc 4a 00 ....JJJ.{ffRB.J.
MacBinary: 0070: 99 66 42 42 42 42 b1 73 42 ff 90 42 4a 21 08 eb .fBBBB.sB..BJ!..
MacBinary::loadHeader: header bytes 0 and 74 not null
MimeMagic::MimeMagic: loading mime types from includes/mime.types
MimeMagic::MimeMagic: loading mime info from includes/mime.info
MimeMagic::detectMimeType: magic mime type of /tmp/phpclxVzv: text/plain
MimeMagic::guessMimeType: final mime type of /tmp/phpclxVzv: text/plain
SpecialUpload::verifyExtension: mime type text/plain mismatches file extension gif, rejecting file
Request ended normally
*/

4
Blazer
Re: Mediawiki 1.17 and pages import
  • 2006/11/8 22:49

  • Blazer

  • Just popping in

  • Posts: 3

  • Since: 2006/11/8


Good news, I figured out the problem. I had to put the following into my LocalSettings.php

Quote:

$wgMimeDetectorCommand= "file -bi"; #use external mime detector (linux)

5
limesle
Re: Mediawiki 1.17 and pages import
  • 2006/11/9 16:00

  • limesle

  • Just popping in

  • Posts: 8

  • Since: 2006/11/4


Thank you Blazer for this tip.

But I don't have the same problem. I can upload new images. The problem is that I can't import Page using the XHTML file produced by the export function of mediawiki.
Pages can be imported, but image cannot.
I uploaded the image repertoty on the mediawiki module, in both location (in uploads/mediawiki and in module/mediawiki/image) But the mudole can't find them.

A new problem is that I can't creat image with accent in the name, which can be important in french. (like : bébé.jpg)
The software save this image with the name : Bébé.jpg
So the link created in the page doesn't work.
How can I manage this problem ?

Thank you

6
limesle
Re: Mediawiki 1.17 and pages import
  • 2006/11/10 21:13

  • limesle

  • Just popping in

  • Posts: 8

  • Since: 2006/11/4


OK I've got a solution for Image import.
You've got to copy the two tables : yourprefix_image and yourprefix_imagelink.
Then your images, uploaded on uploads/mediawiki, will appear correctly.

But images with accents in the file name don't appear.

How can I fix this charset problem ?

7
limesle
Re: Mediawiki 1.17 and pages import
  • 2006/11/11 9:30

  • limesle

  • Just popping in

  • Posts: 8

  • Since: 2006/11/4


Is my english correct ?
Do you call [é] a [e] with an accent ?

Phppp could you please help me and tell me which are the files you hacked in the mediawiki to do the mediawiki module ?

I found this in your LocalSetting.php :

Quote:
/** We speak UTF-8 all the time now, unless some oddities happen */
//$wgInputEncoding = 'UTF-8';
//$wgOutputEncoding = empty($GLOBALS["xlanguage"]['charset_base'])?_CHARSET:$GLOBALS["xlanguage"]['charset_base'];
//$wgEditEncoding = '';


I changed it, but nothing happens.
Please help me with the "accent" named image.(if it's the right way to say it in english)

8
limesle
Re: Mediawiki 1.17 and pages import
  • 2006/11/14 16:42

  • limesle

  • Just popping in

  • Posts: 8

  • Since: 2006/11/4


Another problem.
In the mediawiki mode, when I click on an image, and I go in the image's page, the navigation bar disappear...

Why ?

And I still have problems with accent and image name

Login

Who's Online

355 user(s) are online (284 user(s) are browsing Support Forums)


Members: 0


Guests: 355


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits