Page MenuHomeMiraheze

Bug exists in ManageWiki logs when creating a user group with no set rights
Closed, ResolvedPublic

Description

Bug report: If you'll refer to the attached screenshot from anarquianovaerawiki,

2021-03-31 07.30.55 anarquianovaera.miraheze.org d18790b93eb1.jpg (331×1 px, 161 KB)
, you'll see strange formatting in the log entries for a deleted user group. I suspect it may only occur when deleting a user group with a user still in the group. It's mainly a cosmetic bug, but nonetheless should be fixed. You'll note the rights are displayed as the $9 value and included within the log entry is Reih talk contribs block0, which should not be there.

I thought this had been fixed, but I guess not. Anyway, if Universal Omega gets a chance, it'd be much appreciated if he can fix this.

Event Timeline

Dmehus triaged this task as Normal priority.Wed, Mar 31, 14:35
Dmehus created this task.
Dmehus moved this task from Backlog to Short Term on the MediaWiki (SRE) board.
Dmehus moved this task from Backlog to Bugs on the ManageWiki board.
Universal_Omega moved this task from Goals to Short Term on the MediaWiki (SRE) board.

Whoops, accidentally did that.

I looked and I don't know what causes this.

Reception123 lowered the priority of this task from Normal to Low.Sat, Apr 3, 15:19

Due to the fact that it's "cosmetic" I don't think this warrants a normal priority.

It looks like this issue is not caused by deleting user groups as the original post stated, but is rather caused when someone attempts to create a user group that has no rights assigned.

When this is the case, the commit() method in ManageWikiPermissions gets called and will return an error, but ManageWikiFormFactoryBuilder (which is where the logs are published) ignores the fact that there is an error and will publish the log even though ManageWikiPermission never defined the parameters for the log entry.

I was going to attempt to fix this issue on my own but I could not set up ManageWiki/CreateWiki on a local environment and do not feel comfortable trying to fix it without being able to test it.

Reception123 assigned this task to Universal_Omega.

Thanks for the advice @Joritochip. This should be fixed (I hope) with this commit

Universal_Omega renamed this task from Bug exists in ManageWiki logs when deleting a user group to Bug exists in ManageWiki logs when creating a user group with no set rights.Wed, Apr 7, 05:34

It looks like this issue is not caused by deleting user groups as the original post stated, but is rather caused when someone attempts to create a user group that has no rights assigned.

When this is the case, the commit() method in ManageWikiPermissions gets called and will return an error, but ManageWikiFormFactoryBuilder (which is where the logs are published) ignores the fact that there is an error and will publish the log even though ManageWikiPermission never defined the parameters for the log entry.

I was going to attempt to fix this issue on my own but I could not set up ManageWiki/CreateWiki on a local environment and do not feel comfortable trying to fix it without being able to test it.

@Joritochip Ah, interesting. That's similar to what my original theory was, which was when attempting to delete a user group with zero user rights.