Hi Team,
I am stuck while Implementing the AutoLogin. Any help would be great.
I am using MediaWiki for my purpose. I have a website and would like to give the MediaWiki URL When a user clicks the links of MediaWiki It should redirect with MediaWiki URL with AutoLogin.
Currently, I have setup in my localhost.I am using login API for this and able to create a new user in MediaWiki. So when I am using the API for login I am able to get login success response from API. but when it redirects to MediaWiki localhost links I can't see the logged in user.
Below Environment I am using for development:
Media wiki version: 1.26System: Ubuntu14.04Server: Apache2Language: PHP/MySQL.
Looking forward to hearing back from you!
Thank you,Sudhir Gupta.
Previously, if none of the values supplied for the pltitles, tltemplates,
clcategories, or imimages parameters to prop=links, prop=templates,
prop=categories, or prop=images were valid titles, the parameter would be
ignored and all links, templates, categories, or images would be returned.
With the merge of Gerrit change 347879,[1] this situation will result in no
links, templates, categories, or images being returned, as none match the
invalid titles supplied.
Note that submitting an empty value for one of these parameters will
continue to ignore the parameter and return all links, templates,
categories, or images, since this seems to be relatively common practice.
[1]: https://gerrit.wikimedia.org/r/#/c/347879/
--
Brad Jorsch (Anomie)
Senior Software Engineer
Wikimedia Foundation
_______________________________________________
Mediawiki-api-announce mailing list
Mediawiki-api-announce(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce
Hi,
I am trying to fetch the deleted revisions of a page using API
<https://www.mediawiki.org/wiki/API:Deletedrevisions>, but meet an error
saying that "You don't have the permission to view a page's deleted
history". I wonder if it is caused by my inappropriate operation, or just
the feature has been blocked by Wikipedia? Thank you!
Hi,
I'm using two step approach to retrieve "see also" section links from
articles by retrieving sections and using the section index for links
action.
Today I noticed that for the article "Synchronous programming language"
this gives unexpected results.
The page
https://en.wikipedia.org/w/api.php?action=parse&prop=sections&page=Synchron…
returns
... <s toclevel="1" level="2" line="See also" number="4" index="4" .....
and the following query
https://en.wikipedia.org/w/api.php?action=parse&prop=links&page=Synchronous…
gives a long list of links very different to the actual correct list shown
in the wikipedia article. Other usage of the same algorithm with other
articles works correctly.
Is this a bug?
Thanks
Max
Hi,
I am not sure if this is right place to post this question. It's about link
target black. I insert a hyper link in the wikicode. When people click it,
I want it to be popped out in another new window. Anyone knows how it could
work out? Thanks!
Here is how the wikicode looks like now:
[https://website.. hyper_link]
Hi there,
I am new to the media wiki. Any help on this below query is highly
appreciated.
Query:
I have created a media wiki server and update a section of one particular
page (a table of values) dynamically.
I am planning to do this using rest APIs referring to
https://www.mediawiki.org/wiki/API:Tutorial
What is the flow I should follow to edit a page? Should I use APIs to login
first and then get the csrf token using another rest API and then finally
update the page.
What is the exact sequence??
Thanks in advance
Hi,
I am not sure if anyone met this problem before. I am calling the
contributors API (https://en.wikipedia.org/w/api.php?action=query&format=
json&prop=contributors& ... ) with a list of titles as the input (less than
50), and then I continue until nothing more is available. However, in the
responses I gather for that single request, I am not getting the same
number of distinguished pages that I input. I cannot really figure out why.
Could somebody provide some suggestion? Thanks!
Sincerely,
Bowen
Hi,
I am using Wikipedia api
<https://www.mediawiki.org/wiki/API:Parsing_wikitext#parse> to convert
wiki text into html.
Everything works fine except that in the output there are also warning
messages which are normally seen in preview mode. To exclude them, I
set 'preview' parameter to False in the query but warning messages are
still in the html output.
Here is an exmaple query:
https://en.wikipedia.org/w/api.php?action=parse&format=json&preview=False&t…
Is there any idea how to get html output without preview warning messages.
Thanks a lot,
Kenan
--
GESIS - Leibniz Institute for the Social Sciences
Computational Social Science (CSS)
Team Social Analytics and Services
M.Sc. Kenan Erdogan
Unter Sachsenhausen 6-8, 50667 Cologne, Germany
Tel: + 49 (0) 221-47694-211
I'm trying to log into a MediaWiki 1.28 site using the API and a standalone PHP script, but it keeps failing with the error "invalid token." I can successfully retrieve a login token:
$tokenRequest = array(
'action' => 'query',
'format' => 'json',
'meta' => 'tokens',
'type' => 'login',
);
But when I issue my "action=clientlogin" request, I always get the error "code=badtoken, info = invalid token":
$loginRequest = array(
'action' => 'clientlogin',
'format' => 'json',
'logintoken' => $token,
'loginreturnurl' => 'https://example.com/',
'username' => $username,
'password' => $password,
'domain' => 'mydomain',
'rememberMe' => 1,
);
I suspect the problem is that the two requests are not explicitly being made in the same session. That is, I'm not adding the header "Cookie: <session cookie>" to my second HTTP POST. How do I retrieve the session cookie after issuing my meta=tokens request so I can hand it to the client login request? In earlier versions of MediaWiki, I could get the cookie information from an API call, "action=login". This has been deprecated but I haven't seen any examples of the new way to do it, just generic instructions like "Clients should handle cookies to properly manage session state."
I'm not operating inside the MediaWiki codebase with its WebRequest, SessionManager, etc. classes -- this is a standalone script.
Thank you,
DanB