Hello,
This message summarizes discussions about using private mediawiki and
mw-serve.
Here are previous discussions on the topic:
http://www.mail-archive.com/mw...@googlegroups.com/msg01239.html
http://www.mail-archive.com/mw...@googlegroups.com/msg01203.html
http://groups.google.com/group/mwlib/browse_thread/thread/7edf95ebe70aa781
The problem is the following. When installing a private Mediawiki,
newbees (like me) tend to use the "localhost" name as base url for
Mediawiki. Mediawiki works fine with that.
As said in discussion (
http://groups.google.com/group/mwlib/
browse_thread/thread/7edf95ebe70aa781), it is not the case for mw-
serve. Mw-serve has been implemented for Pediapress public service;
using "localhost" makes no sense for Pediapress developpers.
It happens like this:
- the Collection extension of Mediawiki send a request to mw-serve in
order mw-serve may found the collection. this request contains the url
of the generated collection
- this url contains "localhost" as normal
- mw-server answers something like : "bad base_url: u'
http://localhost/
mediawiki" .
The origin is that the function "is_good_baseurl" of serve.py module
(
http://nullege.com/codes/search/mwlib.log.Log.bad) is evaluated to
False for any base url starting with "localhost", "192.168" or
"127.0" (..??).
Nor, this trouble is mentionned in the Mediawiki documentation: using
"localhost" use is ok for Mediawiki. Neither it is mentionned in the
doc of mw-serve ... It is quite logic on their side to exclude private
use of mw-server. Poor newbees like me will continue to spend hours
for solving the trouble.
Solutions:
Solution A (best): install your private Mediawiki on another base
url : "mediawikihostname" in place of "localhost". Do not forget to
add the following line in your /etc/hosts (under linux):
127.0.0.1 mediawikihostname
Solution B (fast): Force the $wgServer variable to
"mediawikihostname" in the LocalSettings.php file. Collection
extension will use this base url in the requests to mw-serve. Do not
forget adding the following line in your /etc/hosts (under linux):
127.0.0.1 mediawikihostname
I tested the B solution with success but it is not the best one. I
hope this summary will spare your time when you got this trouble ;-)