Login error
Brought to you by:
eldurloki
When do I start the bot message appears:
SEVERE: null
net.sourceforge.jwbf.actions.mw.util.ActionException: Please login first
at net.sourceforge.jwbf.bots.MediaWikiBotImpl.writeContent(Unknown Source)
at net.sourceforge.jwbf.contentRep.mw.Article.save(Unknown Source)
at wikirc.IrcBot.hello(IrcBot.java:124)
at wikirc.HelloThread.run(HelloThread.java:23)
I think this is due to recent changes in the engine mediawiki. https://bugzilla.wikimedia.org/show_bug.cgi?id=23076
Are you plan to fix it?
Can you suggest hotfix for this?
problem is already known. But no time to fix it in the next days because of "real live" ;-) ... sorry. Can you help ?
Patch for this bug.
Yes of course. I created patch for this bug (see in attached files)
PS. This is my first patch. Please tell me if something is wrong.
there will be a NPE because msg is not set, have you test if your patch works with e.g. Wikipedia ?
Of course, I tested it on my bot in wikipedia.
So strange bug, because msg is never used in PostLogin.java, I replaced it by function
public Post createMessage()
sounds intersting, how do you test the login ? My common testcase starts like the following:
bot = new MediaWikiBot(getValue("login_wikipedia1_url"));
bot.login(getValue("login_wikipedia1_user_valid"), getValue("login_wikipedia1_pass_valid"));
...
how is yours ?
MediaWikiBot bot = new MediaWikiBot("http://ru.wikipedia.org/w/api.php");
bot.login("user","pass");
System.out.println(bot.isLoggedIn());
Result is true.
okay I have applied a patch to last snapshot version, can you send me some feedback if it's ok or not ?
It's worked for me.
s/worked/work/
Sorry, for my English. :)