Home Download Buy Blog Forum Support

Anyone using Mediawiker?

Anyone using Mediawiker?

Postby rehabs4quitters on Sun Jul 21, 2013 2:06 pm

Hello, I was wondering if anyone is using the Plugin Mediawiker?

Because i can't seem to get it to work with a local installation of MediaWiki (via Xampp). Although it works wonderfully for regular Wikipedia entries!

Has anyone ever tried to get this plugin to work with a local installation and has any hints? I have not yet customized any settings of MediaWiki.

Thanks!
rehabs4quitters
 
Posts: 4
Joined: Sun Jul 21, 2013 2:04 pm

Re: Anyone using Mediawiker?

Postby tosher on Sun Jul 21, 2013 4:09 pm

I'm tried to check plugin with my local wiki site - all working correctly.
Can you post the errors from console and your config entries?
tosher
 
Posts: 4
Joined: Sun Apr 14, 2013 5:02 pm

Re: Anyone using Mediawiker?

Postby tosher on Sun Jul 21, 2013 4:16 pm

First of all, please, check the api of your wiki, it must be enabled and url like
http://yourdomain.com/wiki_api_path/api.php
(for example http://en.wikipedia.org/w/api.php)
must show api page..
tosher
 
Posts: 4
Joined: Sun Apr 14, 2013 5:02 pm

Re: Anyone using Mediawiker?

Postby rehabs4quitters on Sun Jul 21, 2013 4:50 pm

This is what i get in the console:

Code: Select all
Traceback (most recent call last):
  File ".\sublime_plugin.py", line 356, in run_
  File ".\mediawiker.py", line 371, in run
  File ".\mediawiker.py", line 75, in mw_get_page_text
AttributeError: 'NoneType' object has no attribute 'Pages'


I have a Page called "Testpage" in my Wiki, when i open it, the Url is "localhost/mediawiki/index.php/Testpage"; the Api Url is "localhost/mediawiki/api.php" (shows the api documentation page)

My connection string in sublime text is :

Code: Select all
      "MyWiki":
      {
         "domain": "",
         "host": "localhost",
         "pagepath": "/mediawiki/index.php/",
         "password": "something,
         "path": "/mediawiki/",
         "username": "something"
      },


$wgEnableWriteAPI and $wgEnableAPI are both set true in DefaultSettings.php.

What am i missing here?
rehabs4quitters
 
Posts: 4
Joined: Sun Jul 21, 2013 2:04 pm

Re: Anyone using Mediawiker?

Postby tosher on Sun Jul 21, 2013 5:42 pm

And "MyWiki" activated as current site?

"mediawiki_site_active": "MyWiki"
You can do it from menu.. "select wiki"
tosher
 
Posts: 4
Joined: Sun Apr 14, 2013 5:02 pm

Re: Anyone using Mediawiker?

Postby rehabs4quitters on Sun Jul 21, 2013 5:54 pm

Yes, i have done that... As i was saying, it works for Wikipedia, but when i try to open a page from my local MediaWiki, i just get an "untitled" new tab.
rehabs4quitters
 
Posts: 4
Joined: Sun Jul 21, 2013 2:04 pm

Re: Anyone using Mediawiker?

Postby rehabs4quitters on Sun Jul 21, 2013 5:59 pm

Ok, apparently i just fixed it... It is a bit embarassing, but the Username in MediaWiki is case-sensitive, which i neglected in Sublime Text. Seems to work now ;)

Thanks for a creating a really cool plugin!
rehabs4quitters
 
Posts: 4
Joined: Sun Jul 21, 2013 2:04 pm

Re: Anyone using Mediawiker?

Postby tosher on Sun Jul 21, 2013 6:33 pm

Yes, username is case-sensitive.
Strange, on incorrect authorization, "Login failed.." message must be shown in status line.
I will check it..

Thank you!
tosher
 
Posts: 4
Joined: Sun Apr 14, 2013 5:02 pm

Re: Anyone using Mediawiker?

Postby ruizzito on Wed Feb 12, 2014 6:32 pm

Hi,

First of all, thank you very much for the pluggin.
If it works as expected ( :) ), it will be very usefully for me.

Anyway, I am open this query because i am unable to open a WikiPage that I have on my server.

<----- The MediaWiki API pag. is fine ----->
http://192.168.145.21/api.php

<----- The file that i am trying to open with sublime is the following----->
http://192.168.145.21/index.php/Temporal

<----- My Mediawiker.sublime-settings is the following----->
Code: Select all
"mediawiki_site":
    {
        ...
        "my_wiki":
            {
                "host": "192.168.145.21",
                "path": "",
                "pagepath": "",
                "username": "...",
                "password": "...",
                "domain": ""
        }
    },
    "mediawiki_site_active": "my_wiki",


<--- When I opened the "Temporal" page, i saw the following in console--->
Code: Select all
Traceback (most recent call last):
  File "./sublime_plugin.py", line 356, in run_
  File "./mediawiker.py", line 410, in run
  File "./mediawiker.py", line 65, in mw_get_connect
  File "./mwclient/client.py", line 113, in __init__
    self.site_init()
  File "./mwclient/client.py", line 120, in site_init
    meta = self.api('query', meta='siteinfo|userinfo', siprop='general|namespaces', uiprop='groups|rights')
  File "./mwclient/client.py", line 183, in api
    info = self.raw_api(action, **kwargs)
  File "./mwclient/client.py", line 280, in raw_api
    json_data = self.raw_call('api', data).read()
  File "./mwclient/client.py", line 249, in raw_call
    stream = self.connection.post(self.host, url, data=data, headers=headers)
  File "./mwclient/httpmw.py", line 274, in post
    return self.find_connection(host).post(host, path, headers, data)
  File "./mwclient/httpmw.py", line 202, in post
    return self.request('POST', host, path, headers, data)
  File "./mwclient/httpmw.py", line 192, in request
    raise errors.HTTPStatusError(res.status, res)
mwclient.errors.HTTPStatusError: (400, <httplib.HTTPResponse instance at 0x10807c5a8>) <--------- HTTPStatusError: 400 ??


Do you have any suggestion?
Can you please help me?

Thanks in advance.
Rui
ruizzito
 
Posts: 2
Joined: Wed Feb 12, 2014 5:59 pm

Re: Anyone using Mediawiker?

Postby ruizzito on Thu Feb 13, 2014 11:40 am

OK. now is fine :)

Changes:
Code: Select all
                "path": "/",
                "pagepath": "/",
ruizzito
 
Posts: 2
Joined: Wed Feb 12, 2014 5:59 pm


Return to Plugin Development

Who is online

Users browsing this forum: BugFix and 3 guests