Project:Support desk

From MediaWiki.org
(Redirected from Support desk)
Jump to: navigation, search
vde   Welcome to MediaWiki.org's Support desk, where you can ask MediaWiki questions!

There are also other places where to ask: IRC, mailing lists, Q&A etc.

Before you post

Post a new question

  1. To help us answer your questions, please always indicate which versions you are using (reported by your wiki's Special:Version page):
    • MediaWiki
    • PHP
    • Database
  2. Please include the URL of your wiki unless you absolutely can't. It's often a lot easier for us to identify the source of the problem if we can look for ourselves.
  3. To start a new thread, click "Start a new discussion".
Start a new discussion
First page
First page
Previous page
Previous page
Last page
Last page

How can i translate pages in this site to zh-hant?

How can i translate pages in this site to zh-hant? All the pages i translated to zh-hant has been deleted by FuzzyBot. https://www.mediawiki.org/wiki/Download/zh-hant https://www.mediawiki.org/wiki/How_to_contribute/zh-hant https://www.mediawiki.org/wiki/Manual:What_is_MediaWiki%3F/zh-hant

Cwlin0416 (talk)16:23, 1 July 2015

Utilizing MAGICWORD PATH

I have a external path as such: [file://\\network\shared folder\application file\] i would like to use string but only to insert the empty space with %20, and not replacing \ i tried [file://%5C%5Cnetwork%5Cshared%20folder%5Capplication%20file%5C] it converts all the \\ and spaces. What can i do to just convert spaces to %20?

71.67.124.17403:39, 30 June 2015

What magic word are you using and why?

Ciencia Al Poder (talk)15:55, 30 June 2015
Edited by another user.
Last edit: 14:43, 1 July 2015

I have enable the following: https://www.mediawiki.org/wiki/Manual:$wgUrlProtocols When i link an external link through Visual Editor: [file://\\network\shared folder\application file\] , this will not work because it will get concatenated at the space because it can't recognize space but %20 instead: file://\\network\shared.

I tried using {{urlencode:string|PATH}}, but it replaces my \\ with %5C as well. I would only like the code to replace spaces with %20. Doing this [file://{{urlencode:\\network\shared folder\application file\|PATH}}]; result in : file://%5C%5Cnetwork%5Cshared%20folder%5Capplication%20file%5C And the browser does not recognize %5C

206.51.148.213:50, 1 July 2015

Apparently, urlencode with PATH won't work, because it encodes "/" characters, which from my understanding it shouldn't.

You should use forward slashes in URLs, and it should end with 5 forward slashes at the start: file://///network/shared%20folder/application%20file.

Try to not use spaces in URLs, or use URLENCODE on every segment of the URL, not on the whole URL.

Ciencia Al Poder (talk)14:54, 1 July 2015
 
 
 

adding CSS at onBeforePageDisplay hook

Hello,

In an extension Im working on, I add additional modules containing CSS at the onBeforePageDisplay hook. The problem is that when the page loads, first the normal mediawiki CSS is displayed for a milisecond, and only after this my CSS is loaded.. which doesn't look too nice. How can I resolve this? Thanks :]

146.175.202.3014:02, 25 June 2015

That's not the 'proper' way to add CSS: ResourceLoader/Developing_with_ResourceLoader.

But are you adding a style block, or an external stylesheet ? Can you give links perhaps ?

TheDJ (Not WMF) (talkcontribs)20:25, 28 June 2015
Edited by another user.
Last edit: 15:52, 30 June 2015

Thanks for the reply :] Im adding an external stylesheet. The idea of what I want is simple: I have a custom SpecialPage on which I have added HTML buttons and I want to change the way these buttons look like. So I want to load a custom .css file only when the user lands on my SpecialPage. Unfortunately I have not uploaded my code to the web yet, so I can't give you a link, but my basic code for the hook looks like this:

  public function onBeforePageDisplay(OutputPage &$out, Skin &$ski ){

    $page_title = $out->getPageTitle();

    if($page_title === 'My SpecialPage Title Name'){
      $out->addModules("ext.myModule");    
    }

    return true; 
  }

ext.myModule then retrieves a small .css file with the changes I want for my buttons:

#button{
  width: 30em;  
  height: 1.5em;
  cursor: pointer;
}

#letter_button{
  cursor: pointer;
}
62.205.118.23716:53, 29 June 2015

Could it have something to do with that mw.loader.load(); is called at the bottom of the HTML page? When I just add my css using normal <style> </style> blocks, and $out->addHTML the CSS loads immediately

146.175.202.3014:53, 1 July 2015
 
 
 

how to get creator/owner of the created article

Hi all,

I would like to ask is it possible to get the author/owner/creator of the article created? Is it to use wgUser?

Any advise is appreciated!!

Thanks all for your kind assistance and time!!!!

Hi!

When you speak of the "creator" of an article, I guess that you then mean the user, who created the first revision of that article, right?

When and where do you want to get that information? Somewhere inside PHP obviously... But where should it be used? Maybe you find an according method inside the article object...

88.130.81.11217:18, 28 June 2015

Hi,

I really appreciated your response! Yes, you are correct. I want to get the user who created the first revision of that article. I have already retrieved the title but I am not sure on how to retrieve the user (http://postimg.org/image/oj3ybel2x/) . I want it to be displayed like that.

Just to add on, the "Requests:" is a namespace and the title is displayed on the main page using the newestpage extension. I used Special:Newestpages/Requests/5

I tried to look at the link you provided but could not see any documentation that would aid me in getting the creator.

Please advise and tell me if you need anymore information. Thank You!!!!!

Anyhowputx (talk)03:23, 29 June 2015

You need to access a WikiPage class for that page and use the getOldestRevision method. It returns a Revision class that you can use to get the user. You can navigate the documentation for this.

Ciencia Al Poder (talk)15:40, 30 June 2015

Thanks for your advise!!

I managed to get the author of the article but I am facing another issue now. :(

Right now, I am retrieving the content of the article and displayed on my main page. But it is giving me the html format instead. (As seen in this picture: http://i62.tinypic.com/99mlvd.png) It is showing me == (text here) == instead of the header.

I have my full code here (https://dpaste.de/ro3r#L329). I've tried to output $wgOut->addWikiText on line 197, but it is giving me weird characters as shown here (http://i60.tinypic.com/eslrhy.png)

I have also tried implementing parser as seen in line 133 but it is not going into that function. Why is that so?

Really really appreciated your response and time and help and everything!!!!! Thank you so much!!!!!!!

Anyhowputx (talk)16:10, 30 June 2015

As said in QINU fix, apparently you need to use the method recursiveTagParse of the parser

Ciencia Al Poder (talk)16:44, 30 June 2015
 
 
 
 
 

Finding Mediawiki Administrators

I am not sure if this is the right forum to ask this questions. We have 7 wikis, and we are in need of a Mediawiki Admiistrator to manage and improve our setup.

I am not sure where to find Mediawiki Admins for our organisational requirements. If you can redirect me to more appropriate forums to find and hire admins please mention below on the thread.

If you are interested please do respond with your interest and we can connect and discuss.


Sincerely, Arnab

123.201.127.10112:24, 1 July 2015

Error on 'mwlib' server

Hi,

Does anybody knows this issue?

When converting a page to PDF, I have an error in the mwlib server.

RuntimeError: RuntimeError: command failed with returncode 256:
so with the results is this one below:
JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Here's my setup:
MediaWiki       1.26alpha
Collection      1.7.0   GPL-2.0+        Create books


My config:
require_once "$IP/extensions/Collection/Collection.php";
$wgEnableAPI = true;
$wgGroupPermissions['user']['collectionsaveasuserpage'] = true;
$wgGroupPermissions['user']['collectionsaveascommunitypage'] = true;
$wgCollectionFormats = array(
    'rl' => 'PDF',
    'odf' => 'ODT',
);

$wgCollectionMWServeURL = "http://hc.dev:8899/";
$wgCollectionMWServeCredentials = '<username>:<password>';
$wgCollectionMaxArticles = 150;
$wgCollectionArticleNamespaces = array(
      NS_MAIN,
      NS_TALK,
      NS_USER,
      NS_USER_TALK,
      NS_PROJECT,
      NS_PROJECT_TALK,
      NS_MEDIAWIKI,
      NS_MEDIAWIKI_TALK,
      NS_CATEGORY,
      100,
      101,
      102,
      103,
      104,
      105,
      106,
      107,
      108,
      109,
      110,
      111
);

Complete logs:

256 1.30313515663 ['mw-zip', '-o', '/home/vagrant/cache/78/78a10694db6e0745/collection.zip', '-m', '/home/vagrant/cache/78/78a10694db6e0745/metabook.json', '--status', 'qserve://localhost:14311/78a10694db6e0745:makezip', '--config', 'http://hc.dev/w', '--username', 'Ace-hotcopper', '--password', '{O
MITTED}']
1%  /usr/lib64/python2.6/site-packages/mwlib/net/fetch.py:7: DeprecationWarning: gevent.coros has been renamed to gevent.lock
  import gevent, gevent.pool, gevent.coros, gevent.event
/usr/lib64/python2.6/site-packages/mwlib/metabook.py:225: DeprecationWarning: deprecated call get('mw_license_url')
  if l.get('mw_license_url'):
/usr/lib64/python2.6/site-packages/mwlib/metabook.py:240: DeprecationWarning: deprecated call get('mw_rights_text')
  if l.get('mw_rights_text'):
/usr/lib64/python2.6/site-packages/mwlib/metabook.py:242: DeprecationWarning: deprecated call get('mw_rights_page')
  if l.get('mw_rights_page'):
/usr/lib64/python2.6/site-packages/mwlib/metabook.py:244: DeprecationWarning: deprecated call get('mw_rights_url')
  if l.get('mw_rights_url'):
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/gevent-1.1a1-py2.6-linux-x86_64.egg/gevent/greenlet.py", line 368, in run
    result = self._run(*self.args, **self.kwargs)
  File "/usr/lib64/python2.6/site-packages/mwlib/apps/make_nuwiki.py", line 117, in run
    api = self.get_api()
  File "/usr/lib64/python2.6/site-packages/mwlib/apps/make_nuwiki.py", line 31, in get_api
    api.login(self.username, self.password, self.domain)
  File "/usr/lib64/python2.6/site-packages/mwlib/net/sapi.py", line 194, in login
    res = self._post(**args)
  File "/usr/lib64/python2.6/site-packages/mwlib/net/sapi.py", line 114, in _post
    res = loads(self._fetch(req))
  File "/usr/lib64/python2.6/site-packages/mwlib/net/sapi.py", line 23, in loads
    return json.loads(s)
  File "/usr/lib64/python2.6/site-packages/simplejson/__init__.py", line 505, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python2.6/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/lib64/python2.6/site-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
<Greenlet at 0x2c26af0: <bound method start_fetcher.run of <mwlib.apps.make_nuwiki.start_fetcher object at 0x2c8df10>>> failed with JSONDecodeError

creating nuwiki in u'/home/vagrant/cache/78/78a10694db6e0745/tmpH9YDfe/nuwiki'
removing tmpdir u'/home/vagrant/cache/78/78a10694db6e0745/tmpH9YDfe'
memory used: res=20.4 virt=390.9
1% error Traceback (most recent call last):
  File "/usr/bin/mw-zip", line 9, in <module>
    load_entry_point('mwlib==0.15.15', 'console_scripts', 'mw-zip')()
  File "/usr/lib64/python2.6/site-packages/mwlib/apps/buildzip.py", line 155, in main
    make_zip(output, options, env.metabook, podclient=podclient, status=status)
  File "/usr/lib64/python2.6/site-packages/mwlib/apps/buildzip.py", line 50, in make_zip
    make_nuwiki(fsdir, metabook=metabook, options=options, podclient=podclient, status=status)
  File "/usr/lib64/python2.6/site-packages/mwlib/apps/make_nuwiki.py", line 192, in make_nuwiki
    pool.join(raise_error=True)
  File "/usr/lib/python2.6/site-packages/gevent-1.1a1-py2.6-linux-x86_64.egg/gevent/pool.py", line 102, in join
    raise greenlet.exception
simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

error: command failed with returncode 256: ['mw-zip', '-o', '/home/vagrant/cache/78/78a10694db6e0745/collection.zip', '-m', '/home/vagrant/cache/78/78a10694db6e0745/metabook.json', '--status', 'qserve://localhost:14311/78a10694db6e0745:makezip', '--config', 'http://hc.dev/w', '--username', 'Ace-hotc
opper', '--password', '{OMITTED}']
Last Output:
    1%  /usr/lib64/python2.6/site-packages/mwlib/net/fetch.py:7: DeprecationWarning: gevent.coros has been renamed to gevent.lock
      import gevent, gevent.pool, gevent.coros, gevent.event
    /usr/lib64/python2.6/site-packages/mwlib/metabook.py:225: DeprecationWarning: deprecated call get('mw_license_url')
      if l.get('mw_license_url'):
    /usr/lib64/python2.6/site-packages/mwlib/metabook.py:240: DeprecationWarning: deprecated call get('mw_rights_text')
      if l.get('mw_rights_text'):
    /usr/lib64/python2.6/site-packages/mwlib/metabook.py:242: DeprecationWarning: deprecated call get('mw_rights_page')
      if l.get('mw_rights_page'):
    /usr/lib64/python2.6/site-packages/mwlib/metabook.py:244: DeprecationWarning: deprecated call get('mw_rights_url')
      if l.get('mw_rights_url'):
    Traceback (most recent call last):
      File "/usr/lib/python2.6/site-packages/gevent-1.1a1-py2.6-linux-x86_64.egg/gevent/greenlet.py", line 368, in run
        result = self._run(*self.args, **self.kwargs)
      File "/usr/lib64/python2.6/site-packages/mwlib/apps/make_nuwiki.py", line 117, in run
        api = self.get_api()
      File "/usr/lib64/python2.6/site-packages/mwlib/apps/make_nuwiki.py", line 31, in get_api
        api.login(self.username, self.password, self.domain)
      File "/usr/lib64/python2.6/site-packages/mwlib/net/sapi.py", line 194, in login
        res = self._post(**args)
      File "/usr/lib64/python2.6/site-packages/mwlib/net/sapi.py", line 114, in _post
        res = loads(self._fetch(req))
      File "/usr/lib64/python2.6/site-packages/mwlib/net/sapi.py", line 23, in loads
        return json.loads(s)
      File "/usr/lib64/python2.6/site-packages/simplejson/__init__.py", line 505, in loads
        return _default_decoder.decode(s)
      File "/usr/lib64/python2.6/site-packages/simplejson/decoder.py", line 370, in decode
        obj, end = self.raw_decode(s)
      File "/usr/lib64/python2.6/site-packages/simplejson/decoder.py", line 400, in raw_decode
        return self.scan_once(s, idx=_w(s, idx).end())
    JSONDecodeError: Expecting value: line 1 column 1 (char 0)
    <Greenlet at 0x2c26af0: <bound method start_fetcher.run of <mwlib.apps.make_nuwiki.start_fetcher object at 0x2c8df10>>> failed with JSONDecodeError

    creating nuwiki in u'/home/vagrant/cache/78/78a10694db6e0745/tmpH9YDfe/nuwiki'
    removing tmpdir u'/home/vagrant/cache/78/78a10694db6e0745/tmpH9YDfe'
    memory used: res=20.4 virt=390.9
    1% error Traceback (most recent call last):
      File "/usr/bin/mw-zip", line 9, in <module>
        load_entry_point('mwlib==0.15.15', 'console_scripts', 'mw-zip')()
      File "/usr/lib64/python2.6/site-packages/mwlib/apps/buildzip.py", line 155, in main
        make_zip(output, options, env.metabook, podclient=podclient, status=status)
      File "/usr/lib64/python2.6/site-packages/mwlib/apps/buildzip.py", line 50, in make_zip
        make_nuwiki(fsdir, metabook=metabook, options=options, podclient=podclient, status=status)
      File "/usr/lib64/python2.6/site-packages/mwlib/apps/make_nuwiki.py", line 192, in make_nuwiki
        pool.join(raise_error=True)
      File "/usr/lib/python2.6/site-packages/gevent-1.1a1-py2.6-linux-x86_64.egg/gevent/pool.py", line 102, in join
        raise greenlet.exception
    simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

error finish: 78a10694db6e0745:makezip: 'RuntimeError: command failed with returncode 256: [\'mw-zip\', \'-o\', \'/home/vagrant/cache/78/78a10694db6e0745/collection.zip\', \'-m\', \'/home/vagrant/cache/78/78a10694db6e0745/metabook.json\', \'--status\', \'qserve://localhost:14311/78a10694db6e0745:mak
ezip\', \'--config\', \'http://hc.dev/w\', \'--username\', \'Ace-hotcopper\', \'--password\', \'{OMITTED}\']\nLast Output:\n    1%  /usr/lib64/python2.6/site-packages/mwlib/net/fetch.py:7: DeprecationWarning: gevent.coros has been renamed to gevent.lock\n      import gevent, gevent.pool, gevent.coro
s, gevent.event\n    /usr/lib64/python2.6/site-packages/mwlib/metabook.py:225: DeprecationWarning: deprecated call get(\'mw_license_url\')\n      if l.get(\'mw_license_url\'):\n    /usr/lib64/python2.6/site-packages/mwlib/metabook.py:240: DeprecationWarning: deprecated call get(\'mw_rights_text\')\n
      if l.get(\'mw_rights_text\'):\n    /usr/lib64/python2.6/site-packages/mwlib/metabook.py:242: DeprecationWarning: deprecated call get(\'mw_rights_page\')\n      if l.get(\'mw_rights_page\'):\n    /usr/lib64/python2.6/site-packages/mwlib/metabook.py:244: DeprecationWarning: deprecated call get(\
'mw_rights_url\')\n      if l.get(\'mw_rights_url\'):\n    Traceback (most recent call last):\n      File "/usr/lib/python2.6/site-packages/gevent-1.1a1-py2.6-linux-x86_64.egg/gevent/greenlet.py", line 368, in run\n        result = self._run(*self.args, **self.kwargs)\n      File "/usr/lib64/python2
.6/site-packages/mwlib/apps/make_nuwiki.py", line 117, in run\n        api = self.get_api()\n      File "/usr/lib64/python2.6/site-packages/mwlib/apps/make_nuwiki.py", line 31, in get_api\n        api.login(self.username, self.password, self.domain)\n      File "/usr/lib64/python2.6/site-packages/mw
lib/net/sapi.py", line 194, in login\n        res = self._post(**args)\n      File "/usr/lib64/python2.6/site-packages/mwlib/net/sapi.py", line 114, in _post\n        res = loads(self._fetch(req))\n      File "/usr/lib64/python2.6/site-packages/mwlib/net/sapi.py", line 23, in loads\n        return j
son.loads(s)\n      File "/usr/lib64/python2.6/site-packages/simplejson/__init__.py", line 505, in loads\n        return _default_decoder.decode(s)\n      File "/usr/lib64/python2.6/site-packages/simplejson/decoder.py", line 370, in decode\n        obj, end = self.raw_decode(s)\n      File "/usr/lib
64/python2.6/site-packages/simplejson/decoder.py", line 400, in raw_decode\n        return self.scan_once(s, idx=_w(s, idx).end())\n    JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n    <Greenlet at 0x2c26af0: <bound method start_fetcher.run of <mwlib.apps.make_nuwiki.start_fetcher obj
ect at 0x2c8df10>>> failed with JSONDecodeError\n    \n    creating nuwiki in u\'/home/vagrant/cache/78/78a10694db6e0745/tmpH9YDfe/nuwiki\'\n    removing tmpdir u\'/home/vagrant/cache/78/78a10694db6e0745/tmpH9YDfe\'\n    memory used: res=20.4 virt=390.9\n    1% error Traceback (most recent call last
):\n      File "/usr/bin/mw-zip", line 9, in <module>\n        load_entry_point(\'mwlib==0.15.15\', \'console_scripts\', \'mw-zip\')()\n      File "/usr/lib64/python2.6/site-packages/mwlib/apps/buildzip.py", line 155, in main\n        make_zip(output, options, env.metabook, podclient=podclient, stat
us=status)\n      File "/usr/lib64/python2.6/site-packages/mwlib/apps/buildzip.py", line 50, in make_zip\n        make_nuwiki(fsdir, metabook=metabook, options=options, podclient=podclient, status=status)\n      File "/usr/lib64/python2.6/site-packages/mwlib/apps/make_nuwiki.py", line 192, in make_n
uwiki\n        pool.join(raise_error=True)\n      File "/usr/lib/python2.6/site-packages/gevent-1.1a1-py2.6-linux-x86_64.egg/gevent/pool.py", line 102, in join\n        raise greenlet.exception\n    simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n     in function syste
m, file /usr/lib64/python2.6/site-packages/mwlib/nslave.py, line 64'
error: RuntimeError: command failed with returncode 256: ['mw-zip', '-o', '/home/vagrant/cache/78/78a10694db6e0745/collection.zip', '-m', '/home/vagrant/cache/78/78a10694db6e0745/metabook.json', '--status', 'qserve://localhost:14311/78a10694db6e0745:makezip', '--config', 'http://hc.dev/w', '--userna
me', 'Ace-hotcopper', '--password', '{OMITTED}']
Last Output:
    1%  /usr/lib64/python2.6/site-packages/mwlib/net/fetch.py:7: DeprecationWarning: gevent.coros has been renamed to gevent.lock
      import gevent, gevent.pool, gevent.coros, gevent.event
    /usr/lib64/python2.6/site-packages/mwlib/metabook.py:225: DeprecationWarning: deprecated call get('mw_license_url')
      if l.get('mw_license_url'):
    /usr/lib64/python2.6/site-packages/mwlib/metabook.py:240: DeprecationWarning: deprecated call get('mw_rights_text')
      if l.get('mw_rights_text'):
    /usr/lib64/python2.6/site-packages/mwlib/metabook.py:242: DeprecationWarning: deprecated call get('mw_rights_page')
      if l.get('mw_rights_page'):
    /usr/lib64/python2.6/site-packages/mwlib/metabook.py:244: DeprecationWarning: deprecated call get('mw_rights_url')
      if l.get('mw_rights_url'):
    Traceback (most recent call last):
      File "/usr/lib/python2.6/site-packages/gevent-1.1a1-py2.6-linux-x86_64.egg/gevent/greenlet.py", line 368, in run
        result = self._run(*self.args, **self.kwargs)
      File "/usr/lib64/python2.6/site-packages/mwlib/apps/make_nuwiki.py", line 117, in run
        api = self.get_api()
      File "/usr/lib64/python2.6/site-packages/mwlib/apps/make_nuwiki.py", line 31, in get_api
        api.login(self.username, self.password, self.domain)
      File "/usr/lib64/python2.6/site-packages/mwlib/net/sapi.py", line 194, in login
        res = self._post(**args)
      File "/usr/lib64/python2.6/site-packages/mwlib/net/sapi.py", line 114, in _post
        res = loads(self._fetch(req))
      File "/usr/lib64/python2.6/site-packages/mwlib/net/sapi.py", line 23, in loads
        return json.loads(s)
      File "/usr/lib64/python2.6/site-packages/simplejson/__init__.py", line 505, in loads
        return _default_decoder.decode(s)
      File "/usr/lib64/python2.6/site-packages/simplejson/decoder.py", line 370, in decode
        obj, end = self.raw_decode(s)
      File "/usr/lib64/python2.6/site-packages/simplejson/decoder.py", line 400, in raw_decode
        return self.scan_once(s, idx=_w(s, idx).end())
    JSONDecodeError: Expecting value: line 1 column 1 (char 0)
    <Greenlet at 0x2c26af0: <bound method start_fetcher.run of <mwlib.apps.make_nuwiki.start_fetcher object at 0x2c8df10>>> failed with JSONDecodeError


Any help is appreciated.

Kind Regards,
Ace
Ace.philscan (talk)10:21, 1 July 2015

Can't upgrade (xampp)

Hi,

When I run maintenance/update.php, I get the error "DatabaseBase::factory no viable database extension found for type 'mysql'":

mywiki/maintenance$ php update.php 
MediaWiki 1.24.1 Updater

[1c0b983f] [no req]   Exception from line 890 of /opt/lampp/htdocs/mywiki/includes/db/Database.php: DatabaseBase::factory no viable database extension found for type 'mysql'
Backtrace:
#0 /opt/lampp/htdocs/mywiki/includes/db/LoadBalancer.php(737): DatabaseBase::factory(string, array)
#1 /opt/lampp/htdocs/mywiki/includes/db/LoadBalancer.php(610): LoadBalancer->reallyOpenConnection(array, boolean)
#2 /opt/lampp/htdocs/mywiki/includes/db/LoadBalancer.php(490): LoadBalancer->openConnection(integer, boolean)
#3 /opt/lampp/htdocs/mywiki/includes/GlobalFunctions.php(3632): LoadBalancer->getConnection(integer, array, boolean)
#4 /opt/lampp/htdocs/mywiki/maintenance/update.php(136): wfGetDB(integer)
#5 /opt/lampp/htdocs/mywiki/maintenance/doMaintenance.php(101): UpdateMediaWiki->execute()
#6 /opt/lampp/htdocs/mywiki/maintenance/update.php(206): require_once(string)
#7 {main}

I searched in other threads, and didn't understand where the error comes from: my PHP version is 5.5.9-1ubuntu4.9 (so I guess it's ok), and my wiki works hosted on localhost works fine. So, how can I upgrade my MediaWiki version?

Hydorn (talk)15:32, 25 June 2015

The error

DatabaseBase::factory no viable database extension found for type 'mysql'

means that MySQL is not available from inside PHP. You can upload a PHP file to your server with the following content:

<?php phpinfo();

When you call this file with your webbrowser, you will see information on your PHP installation.

Make sure that the MySQL extension of PHP is enabled (by editing php.ini)! After you enabled it, restart the server for your changes to take effect. The phpinfo() output then should contain a section on MySQL and it should say that MySQL is "enabled".

88.130.101.15516:26, 25 June 2015

MediaWiki now requires mysqli driver instead of mysql, IIRC

Ciencia Al Poder (talk)09:22, 26 June 2015

I don't know that, but newer versions of PHP definitely have the mysql extension deprecated in favour of mysqli. So you surely should use the mysqli extension, if that is available.

Thanks for noting!

88.130.71.19812:18, 26 June 2015

Well, apparently mediawiki now uses mysqli as default, and mysql as fallback, but both are still supported.

Ciencia Al Poder (talk)14:57, 26 June 2015

OK, here is my php configuration (got with phpinfo()) : Php configuration.png Is mysqli or mysql disabled? Not clear to me...

Hydorn (talk)09:39, 1 July 2015
 
 
 
 
 

Mediawiki Dropdown Button in Article

Hi,

I'm rly new @mediawiki.

I get a project and we would edit some Content in an existing Wiki. There are some Templates, something like Forward and Backward Buttons at each process page. Now we would more than one option to go forward, and here we need a dropdown button with choice between three possibilities.

I hope this is understandable.

Here are a example:

[..]
<!-- Doppeltes Menu -->
{{OPT|(31.1) Überführung LL in ES-Vorlage| RK|Konsens|Entscheidung 31.2a|Kein Konsens|(31.2_b)_Klärung im größeren Expertenkreis|31.2a}}
[..]

and here the code from template OPT:

<includeonly>
{| width="100%" cellspacing="0" cellpadding="0" margin="0" border=0
|-
| width="2%" cellspacing="0" cellpadding="0" margin="0" border=0 style="vertical-align:center; background-color:#7094b7"| [[Datei:zurueck_blau.png|30px|center|verweis={{{1}}}|vorheriger Prozessschritt]]
| width="60%" cellspacing="0" cellpadding="0" margin="0" border=0 style="vertical-align:center; background-color:#7094b7; color: white;font-size: 120%; text-align: center; font-weight: bold;"| {{{7}}}&nbsp;-&nbsp;Prozessschritt gilt für:{{{2}}} 
| width="36%" cellspacing="0" cellpadding="0" margin="0" border=0 style="vertical-align:center; background-color:#7094b7; color: white;font-size: 110%; text-align: right; font-weight: bold;"| {{{3}}}&nbsp; 
| width="2%" cellspacing="0" cellpadding="0" margin="0" border=0 style="vertical-align:center; background-color:#7094b7"| [[Datei:vor_blau.png|30px|center|verweis={{{4}}}|nächster Prozessschritt]]
|}
<br>
{| width="30%" cellspacing="0" cellpadding="0" margin="0" border=0 align="Right"
|-
| width="28%" cellspacing="0" cellpadding="0" margin="0" border=0 style="vertical-align:center; background-color:#7094b7; color: white;font-size: 110%; text-align: right; font-weight: bold;"| {{{5}}}&nbsp;
| width="2%" cellspacing="0" cellpadding="0" margin="0" border=0 style="vertical-align:center; background-color:#7094b7;"| [[Datei:vor_blau.png|30px|center|verweis={{{6}}}|nächster Prozessschritt]]
|}

</includeonly>

Now I don't need the Button "Konsens" instead i need a Drop Down by mouseover "konsens" with three Options "Option A", "Option B" and "Option C" I tried a few things and used google, but i only find examples by using a drop down for main Menue - but i need it, only in a few pages ...

I Hope someone have a nice hint for me and i hope my bad english is understandable.

Rly Thanks.

194.114.62.8811:40, 1 July 2015

why does mediamonkey create duplicate songs?

why does mediamonkey create duplicate songs?

75.80.148.20401:25, 1 July 2015

Feel free to ask in a Mediamonkey support forum. This is a MediaWiki support forum. Mediamonkey and MediaWiki are not related.

Malyacko (talk)10:31, 1 July 2015
 

how to check is it main page

Hi guys,

I am trying to check if the current title is on the main page. If it is on the main page, don't show the like icon, else show the like icon. (Meaning I want to show the like icon on every page except the main page)

Currently my code to check the main page is like this

$wgExtensionFunctions[] = 'wfSetupLikes';
/*
Some other codes 
*/
function wfSetupLikes()
{
    global $wgLikes;
        if (!($this->getTitle()->isMainPage()))
        {
                  $wgLikes = new Likes;
        }
        else
        {
                //do nothing
        }
}

But php error log is giving me the error(PHP Fatal error: Using $this when not in object context) .

Thanks for all assistance!

Anyhowputx (talk)10:18, 1 July 2015

mediawiki最新版1.24.2在windows下无法上传带有中文的目录文件名

mediawiki最新版1.24.2在windows下无法上传带有中文的目录文件名

ITliuhuan (talk)08:21, 30 June 2015

mediawiki最新版1.24.2在windows下无法上传带有中文的目录文件名 谢谢大家能够帮忙告诉一下怎样更改,环境windows 2008 wamp+mediawiki 无法上传中文名附件

ITliuhuan (talk)08:21, 30 June 2015

You are using MediaWiki 1.24.2 on a Windows 2008 server. According to Google Translate you are unable to upload catalog file name with Chinese.

I understand you want to upload a file. This file has Chinese characters in its filename. Uploading this file does not work.

---

It's a consequence of task T3780. A current limitation of PHP and the handling of character sets of NTFS filesystems. There's a patch set, but it is not yet implemented in MediaWiki.

88.130.97.25215:54, 30 June 2015

有补丁?叫什么名字 task t3780?

ITliuhuan (talk)08:29, 1 July 2015
 

If you are unable to upload, could you please describe steps and what exactly happens when?

AKlapper (WMF) (talk)15:54, 30 June 2015

上传文件时,目录文件名 这边写入中文之后,提示:本wiki不支持在文件名中使用特殊字符 其实我只是使用了中文文件名 thank you.

ITliuhuan (talk)08:40, 1 July 2015
 

There's a limitation in PHP regarding filenames on windows. See task T3780

Ciencia Al Poder (talk)16:05, 30 June 2015
 
 

Getting article content using Title ?

Hello all,

I would like to ask how do I get the article content using the Title class and display the content on my main page.


Currently, I have to first retrieve the recently created articles then get the content of those title. I am using newest page extension (https://www.mediawiki.org/wiki/Extension:Newest_Pages) to do so. However, I tried editing the file but fail because I am echo-ing out the content instead of displaying on the main page.

$article = new Article( Title::newFromText( $title ) ) ;
echo $article->getContent();

How should I do that? I am thinking of parser function. But I am not sure if I am on the right track.

Thanks for all assistance and time!

Anyhowputx (talk)09:22, 25 June 2015

What you say basically is right: $article->getContent(); will contain the actual article text.

I guess that you are somehow editing this file here, right: https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FNewestPages/1547d9f6891e2c5831d315d6d6d3ed2e4301a882/NewestPages.page.php?

I have not yet tested, how exactly that extension is working, but reading the code, I guess that inside function execute(), where the code deals with $wgOut, that this would be where you can somehow add the actual article text (instead of letting the code create the link, which it would normally create). Maybe something like

$article = new Article( Title::newFromText( $title ) );
$articleText = $article->getContent();
$wgOut->addWikiText( $articleText );

works the way you want...

88.130.101.15512:42, 25 June 2015

Hello there,

Thanks for giving me the direction to start. Yes you are right, I am editing the NewestPages.page.php file

I have created a new function to retrieve the content and it works fine

<?php
function showArticleText ($row)
        {
                $titleText = Title::newFromText($row->page_title);
                if (!$titleText) return '<h1>Could not retrieve this Article Page.</h1>';
                $page = $titleText->getFullText();
                $article = new Article( $titleText );
                $articleText = $article->getContent();
                $limit = 100;
                if (strlen($articleText) > $limit) {
                 $words = str_word_count($articleText, 2);
                 $pos = array_keys($words);
                 $articleText = html_cutArticle($articleText, $limit). '<br/>' . '<br/>' . '[[' . $titleText . '|(Read more)]]';
                 // return the changed text
                 return $articleText . "<br/>";
        } else {
                echo "<br/>";
                 return  $articleText . "<br/>";        
        }
?>

and also added the

$wgOut->addHTML( $this->showArticleText( $row) );

in the execute function.

Right now, I am trying to implement a "Read More" function if the article is > 100 words. However, I tried to do the above but it is giving me TitlePage instead. I can't even click on that.

I am guessing because no parser function was used? How should I implement that? Or are there any other methods to implement it?

Really appreciate your assistance and time!! Have a good day!

 

Hi,

I have used your method and it works (partially). However, it is giving me weird characters as shown here (http://i60.tinypic.com/eslrhy.png).

Any idea how to fixed it?

Please advise. Thank You so much!

Anyhowputx (talk)00:09, 1 July 2015
 

I have put the code you advise here (https://dpaste.de/T4Yu) from line 181 - 191 but it is giving me the weird characters as seen here (http://i60.tinypic.com/eslrhy.png)

Thank you for your time and assistance!

Anyhowputx (talk)00:48, 1 July 2015
 
 

Getting the URL of a page section

Is there a quick way to get the URL of a page section (H2, H3 etc headers within a page)? When the page has a table of contents I can just right click and copy the URL to that section, but what about when there is no table of contents?

Thanks

2.34.114.23110:40, 30 June 2015

This should be fixed when someone solves task T18691. In the meantime, there's no simple way of getting them without a table of contents :(

Ciencia Al Poder (talk)15:57, 30 June 2015

Ok I found a sort of shortcut, I just right click the title to edit and then save it again, and this gives me the URL of the section in the browser address bar

2.34.114.23120:48, 30 June 2015
 
 

Featured Articles like on wikipedia

Hello, I updated my Mediawiki to the newest Version to get the Topicon Function. Now I want to know how to get a Featured Article Function like on Wikipedia.

I did one Topicon as Template but that can be set by anyone I want this Template to be only usable by SysOPs. How to do this?

I am from germany and do not know english very good and also I am very new to mediawiki.

Regards

95.90.54.118:00, 30 June 2015

Unable to create a Grqqwwwwlink a a "Main article"

I have an article with a section.

The section itself is a concise form of another full-fledged article.

What I want to do is create a link to the second article.

I am using the tag:

{{Main|History of Battle of Plassey}}

Instead of a link, what I am getting is a red link (to a page that does not exist) saying:

Template:Main

Do I have to install some new extension for this? Or am I getting the code wrong?

NB: This is what I am doing on my own new site. The MediaWiki version is 1.25.1.

Nokho (talk)08:31, 28 June 2015

Use [[Main|History of Battle of Plassey]], not {{Main|History of Battle of Plassey}}!

Suriyaa Kudo (iSC Inc.) (talk)10:15, 28 June 2015

When I do this, the text 'History of Battle of Plassey' does appear in red colour.

And the link leads to index.php?title=Main&action=edit&redlink=1

Ideally, it should look like what appears here: https://en.wikipedia.org/wiki/James_Bond#Young_Bond

i.e. Main article: History of Battle of Plassey

Nokho (talk)11:43, 28 June 2015
 

In fact, I have an identical problem with 'see also'

[[See also|Battle of Plassey]]

I get the same error.

Even this leads to the same link: index.php?title=Main&action=edit&redlink=1

Nokho (talk)12:08, 28 June 2015

Please, see the link provided by FriedhelmW. You want to use [[Battle of Plassey|See also]] instead

Ciencia Al Poder (talk)15:54, 30 June 2015
 
 
 

SQLite isn't listed when running MediaWiki setup

Edited by another user.
Last edit: 15:43, 30 June 2015

Dear all,

I try to setup a Mediawiki 1.25.1 on a ubuntu 14.04 server. I followed the instructions of this homepage.

I want to use SQLite as database but mediawiki doesnt show this option.

Can somone tell me what I can do that mediawiki recognize that sqlite is installed?

I have the following packages intalled:

ii  apache2                2.4.7-1ubuntu4.4 amd64            Apache HTTP Server
ii  apache2-bin            2.4.7-1ubuntu4.4 amd64            Apache HTTP Server (binary files and modules)
ii  apache2-data           2.4.7-1ubuntu4.4 all              Apache HTTP Server (common files)
ii  php-apc                4.0.2-2build1    all              APC User Cache for PHP 5 (transitional package)
ii  php-pear               5.5.9+dfsg-1ubun all              PEAR - PHP Extension and Application Repository
ii  php5                   5.5.9+dfsg-1ubun all              server-side, HTML-embedded scripting language (met
ii  php5-apcu              4.0.2-2build1    amd64            APC User Cache for PHP 5
ii  php5-cli               5.5.9+dfsg-1ubun amd64            command-line interpreter for the php5 scripting la
ii  php5-common            5.5.9+dfsg-1ubun amd64            Common files for packages built from the php5 sour
ii  php5-curl              5.5.9+dfsg-1ubun amd64            CURL module for php5
ii  php5-intl              5.5.9+dfsg-1ubun amd64            internationalisation module for php5
ii  php5-json              1.3.2-2build1    amd64            JSON module for php5
ii  php5-readline          5.5.9+dfsg-1ubun amd64            Readline module for php5
ii  php5-sqlite            5.5.9+dfsg-1ubun amd64            SQLite module for php5
ii  sqlite                 2.8.17-10ubuntu2 amd64            command line interface for SQLite
ii  sqlite3                3.8.2-1ubuntu2   amd64            Command line interface for SQLite 3

Thank u in advance Simon

2A02:5D8:200:600:82:150:200:415:24, 29 June 2015

Use phpinfo() to see if sqlite modules are enabled in php.ini

Ciencia Al Poder (talk)15:45, 30 June 2015
 

Support Desk cannot reply

Hi there, i tried clicking reply on a thread and then click save page. it does not save the page. it comes back to the Wiki-Editor. Show-preview & Show changes work. but SavePage does not work for me in reply. What should i check?

AmazingTrans (talk)17:45, 26 June 2015

I met the same problem

Huhuang03 (talk)08:55, 27 June 2015

Anybody else having same issue? Looks like it works now for me again.

AmazingTrans (talk)02:35, 29 June 2015

Any error messages in your browser console output is welcome if this happens again.

AKlapper (WMF) (talk)08:42, 29 June 2015

This could happen if your edit triggers one of the filters of AbuseFilter, or if you include external links that trigger a captcha. That's because LQT can't display captchas nor Abuse Filter warnings,

Ciencia Al Poder (talk)15:43, 30 June 2015
 
 
 
 

Opening external network link with UNC or $wgUrlProtocols

Edited by author.
Last edit: 15:06, 26 June 2015

I am using Media wiki 1.25.1, tried chrome, firefox, IE11.

I would want to open an external link of a drive for example. So, I have tried a couple of ways but none seem to work for me. I have added the following in my LocalSettings.php: $wgUrlProtocols[] = 'file://'; $wgExternalLinkTarget = '_blank';

Case 1: Then in the wiki page, i added: [file://Q:/Document/]

I tried clicking it with IE, nothing came up, no explorer open. No response. When i hover over the link, it is the correct link that i need: file:///Q:/Document/ When I paste this link on the IE address bar; it opens the directory explorer.

Case 2: Then i tried UNC Template: https://www.mediawiki.org/wiki/UNC_links I added the following link into mediawiki page: [file:///{{#replace:{{#replace: \\home_network\Document| |%20}}|\|/}} ]

When i hover my mouse i get: file://home_network/Document/ When i click on the link, nothing happens in the browser. When I paste this link on the IE address bar; it opens the directory explorer.

Hope someone can help me with this.

Thanks! AT

AmazingTrans (talk)17:19, 25 June 2015

You say that clicking that link does nothing, but does that text look actually like a link?

You said you have $wgUrlProtocols[] = 'file//'; but it should be $wgUrlProtocols[] = 'file://'; (note the colon)

Ciencia Al Poder (talk)09:26, 26 June 2015

yes it is a link. and sorry about the mistyped there. I actually have $wgUrlProtocols[] = 'file://'; after reading more on the UNC links in detailed, i got the links working in Chrome if i have LocalLinks extensions installed. After clicking on the links in chrome, it open the directory trees in the browser, or open xls, doc in chrome. But could not get pptx to work in chrome.

Whereas, for IE11, clicking the link doesn't do anything at all. Ideas?

AmazingTrans (talk)03:39, 29 June 2015

This seems to be a security restriction on the browser.

For IE11, see http://arstechnica.com/civis/viewtopic.php?f=15&t=1250955

Ciencia Al Poder (talk)15:24, 30 June 2015
 
 
 

Confirmation Email not working - Pear not installed

Edited by another user.
Last edit: 13:46, 30 June 2015

I get the following error after creating a new account.

828d69a3] /w/index.php?title=Special:UserLogin&action=submitlogin&type=signup&returnto=PadPedia MWException from line 268 of C:\Inetpub\vhosts\gamepaduniverse.com\wiki.gamepaduniverse.com\w\includes\mail\UserMailer.php: PEAR mail package is not installed Backtrace:

  1. 0 C:\Inetpub\vhosts\gamepaduniverse.com\wiki.gamepaduniverse.com\w\includes\User.php(4208): UserMailer::send(MailAddress, MailAddress, string, string, NULL)
  2. 1 C:\Inetpub\vhosts\gamepaduniverse.com\wiki.gamepaduniverse.com\w\includes\User.php(4184): User->sendMail(string, string)
  3. 2 C:\Inetpub\vhosts\gamepaduniverse.com\wiki.gamepaduniverse.com\w\includes\specials\SpecialUserlogin.php(409): User->sendConfirmationMail()
  4. 3 C:\Inetpub\vhosts\gamepaduniverse.com\wiki.gamepaduniverse.com\w\includes\specials\SpecialUserlogin.php(314): LoginForm->addNewAccount()
  5. 4 C:\Inetpub\vhosts\gamepaduniverse.com\wiki.gamepaduniverse.com\w\includes\specialpage\SpecialPage.php(384): LoginForm->execute(NULL)
  6. 5 C:\Inetpub\vhosts\gamepaduniverse.com\wiki.gamepaduniverse.com\w\includes\specialpage\SpecialPageFactory.php(582): SpecialPage->run(NULL)
  7. 6 C:\Inetpub\vhosts\gamepaduniverse.com\wiki.gamepaduniverse.com\w\includes\MediaWiki.php(267): SpecialPageFactory::executePath(Title, RequestContext)
  8. 7 C:\Inetpub\vhosts\gamepaduniverse.com\wiki.gamepaduniverse.com\w\includes\MediaWiki.php(566): MediaWiki->performRequest()
  9. 8 C:\Inetpub\vhosts\gamepaduniverse.com\wiki.gamepaduniverse.com\w\includes\MediaWiki.php(414): MediaWiki->main()
  10. 9 C:\Inetpub\vhosts\gamepaduniverse.com\wiki.gamepaduniverse.com\w\index.php(41): MediaWiki->run()
  11. 10 {main}


I am using Windows Server 2012 R2 and PHP 5.4. The following was inputted into Cygwin64:

$ pear list
Installed packages, channel pear.php.net:
=========================================
Package          Version State
Archive_Tar      1.3.16  stable
Auth_SASL2       0.1.0   beta
Console_Getopt   1.4.0   stable
Mail             1.2.0   stable
Net_SMTP         1.6.2   stable
Net_Socket       1.0.14  stable
PEAR             1.9.5   stable
Structures_Graph 1.1.0   stable
XML_Util         1.3.0   stable

paulbanwart@u ~
$ pear install Mail
pear/Mail is already installed and is the same as the released version 1.2.0
install failed
75.72.156.12923:48, 29 June 2015

Follow this checklist: http://pear.php.net/manual/en/installation.checking.php. Specially, be sure that PHP include_path setting contains the PEAR installation directory

88.130.97.25213:48, 30 June 2015
 

[SOLVED]Widgets not workings

Edited by author.
Last edit: 06:22, 21 June 2015

I have two widgets that are not working in the way that they should. The result shows blank on both my Widget:Daily Motion and Widget:DISQUS found at the respective locations:


The result of the Disqus widget can be found here under the header that says "Comments": https://wiki.gamepaduniverse.com/wiki/List_of_Device_Manufacturers

Why are they displaying improperly and how can i fix the issue?

GamepadUniverse (talk)06:22, 21 June 2015

Disqus loads for me on the given link, after telling my web browser to not block mixed content (as you load Disqus via http while your page is https).

Malyacko (talk)11:29, 21 June 2015

OMG! Thanks for pointing that out. Is there anyway to get around that in https so the user doesn't have to unblock each time?

GamepadUniverse (talk)17:05, 21 June 2015

Change the URLs of the widget that point to disqus, so they use https:// instead of http://

Ciencia Al Poder (talk)17:33, 21 June 2015

I changed the widget to the following code with no effect:


<noinclude>__NOTOC__ This widget allows you to embed '''[http://www.disqus.com/ DISQUS Comments]''' on your wiki page. Created by [http://www.mediawikiwidgets.org/User:Sergey_Chernyshev Sergey Chernyshev] == Using this widget == For information on how to use this widget, see [http://www.mediawikiwidgets.org/DISQUS widget description page on MediaWikiWidgets.org]. == Copy to your site == To use this widget on your site, just install [https://www.mediawiki.org/wiki/Extension:Widgets MediaWiki Widgets extension] and copy [{{fullurl:{{FULLPAGENAME}}|action=edit}} full source code] of this page to your wiki as '''{{FULLPAGENAME}}''' article. </noinclude><includeonly><div id="disqus_thread"></div> <script type="text/javascript"> /* * * CONFIGURATION VARIABLES * * */ var disqus_shortname = '<!--{$id|escape:'urlpathinfo '}-->'; // required: replace example with your forum shortname <!--{if (isset($uniqid))}-->var disqus_identifier = '<!--{$uniqid|escape:'quotes'}-->';<!--{/if}--> <!--{if (isset($url))}-->var disqus_url = '<!--{$url|escape:'quotes'}-->';<!--{/if}--> /* * * DON'T EDIT BELOW THIS LINE * * */ (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); </script> <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>

GamepadUniverse (talk)20:34, 21 June 2015

If you inspect the HTML source code of the pages that include that widget, you will see that it's still using the code with "http://" urls on it. This seems to be a caching issue.

Try purging the page, or perform a null edit and see if it succeeds.

Ciencia Al Poder (talk)09:40, 22 June 2015
 
 
 
 
 
First page
First page
Previous page
Previous page
Last page
Last page