Page MenuHomePhabricator

LQT doesn't throw an error if user is not allowed to edit.
Closed, ResolvedPublic

Description

Author: admin

Description:
Setting is that anons are not allowed to start a discussion, neither may they reply to an existing (in LocalSettings by "$wgGroupPermissions['*']['createtalk']=false"). When they nevertheless try to, there is no error message, but the spinning wheel appears. That is misleading, because it rather suggests a software problem than that the user is trying something he is not permitted to. When afterwards trying to move to a different location, the browser crashes.

You can reproduce this: Go here http://k6.juniorwiki.org/index.php?title=Diskussion:Ring. Then try to start a new discussion or to reply to a message. Be aware that the browser may crash, when you try to move on from there afterwards.

Running MW1.16, LiquidThreads2.0-alpha


Version: unspecified
Severity: major

Details

Reference
bz25993

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:12 PM
bzimport set Reference to bz25993.

Which browser crashed, I can't reproduce with chrome? I can reproduce the spinning wheel though:
lqt.js:227 Uncaught TypeError: Cannot read property 'inlineeditform' of undefined

admin wrote:

(In reply to comment #1)

Which browser crashed, I can't reproduce with chrome? I can reproduce the
spinning wheel though:
lqt.js:227 Uncaught TypeError: Cannot read property 'inlineeditform' of
undefined

Crashing browser is FF (3.6).
Opera doesn't crash, either.

Just tested again, now FF didn't crash. So crashing browser was: FF.

Error is:

"result.threadaction is undefined.
var content = $j(result.threadaction.inlineeditform.html);
lqt.js line 227."

API result:
{"query":{"pages":{"-1":{"ns":0,"title":"Some Title","missing":"","starttimestamp":"2010-12-05T19:56:34Z"}}},"warnings":{"info":{"*":"Action 'edit' is not allowed for the current user"}}}

Does LQT has any error-handling at all?

(In reply to comment #3)

API result:
{"query":{"pages":{"-1":{"ns":0,"title":"Some
Title","missing":"","starttimestamp":"2010-12-05T19:56:34Z"}}},"warnings":{"info":{"*":"Action
'edit' is not allowed for the current user"}}}

Does LQT has any error-handling at all?

This should be caught, but apparently isn't. I'll take a look later today.

Should now be fixed, and the buttons now do not show up in the first place.

Thanks for reporting this bug. Please let me know if you continue to encounter it after updating to r77850.