Page MenuHomePhabricator

Empty string displayed instead of Full Name/username in email notifications when no User: page exists
Closed, ResolvedPublic

Description

Tested on: MediaWiki 1.21.1

Email notifications regarding changes made by a user with no User: page display a blank instead of user's Full Name (or username).

For example:

Dear Admiral Ackbar,

The Foobar Wiki page CinnamonBun has been changed on 2013-05-31 by , see http://wiki.example.org/CinnamonBun for the current revision.

If the User: page exists, the Full Name appears:

Dear Admiral Ackbar,

The Foobar Wiki page CinnamonBun has been changed on 2013-05-31 by Princess Leia, see http://wiki.example.org/CinnamonBun for the current revision.

I haven't done rigorous testing here, so I'm not sure what happens if the User: page exists but the 'Full Name' is not set... probably good to check that case as well.

Danke.

Details

Reference
bz49017

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:45 AM
bzimport set Reference to bz49017.

mails2vichu wrote:

Do you have any test case sir?

(In reply to comment #1)

Do you have any test case sir?

I can write one up, I guess. Are you unable to repro the bug?

Off the top of my head:

  1. install mediawiki
  2. Create accounts 'foo' and 'bar' (with full names 'Foobie Fool' and 'Barbie Barn', respectively). Make sure they have associated email addresses so that they may get notifications. Do *not* create User:xxx pages for them.
  3. Log-in as 'foo' and create page /Test (automagically watching that page)
  4. Log-in as 'bar' and edit page /Test

Result:

User foo will receive a notification email as described in my previous comment, with what looks like incorrect/missing variable substitution (?).

Expected:

Complete sentences in the email notification :-)

mails2vichu wrote:

Thankyou sir.
anyway im interested in this bug.Can you please assign it to me?

(In reply to comment #3)

Thankyou sir.
anyway im interested in this bug.Can you please assign it to me?

Hi Vishnu,

I don't have high enough privs in this Bugzilla installation to assign this bug to you, but perhaps Andrew Klapper (who did some triaging of the bug) can help you out with that :-)

mails2vichu wrote:

Can anyone help me for getting more about the issue and how to fix this?

Vishnu Nk: It's more likely if you ask clear and specific questions.
Also see http://www.catb.org/~esr/faqs/smart-questions.html

mails2vichu wrote:

Sir,Where I can find the file to change the code and fix this issue?

You could use some strings from comment 0 that are not variable and search for them yourself in a local copy of the codebase, in order to find the place(s).

mails2vichu wrote:

Thank you sir.will be working on it

(In reply to Robinson Tryon from comment #2)

  1. install mediawiki
  2. Create accounts 'foo' and 'bar' (with full names 'Foobie Fool' and

'Barbie Barn', respectively). Make sure they have associated email addresses
so that they may get notifications. Do *not* create User:xxx pages for them.

  1. Log-in as 'foo' and create page /Test (automagically watching that page)
  2. Log-in as 'bar' and edit page /Test

Result:

User foo will receive a notification email as described in my previous
comment, with what looks like incorrect/missing variable substitution (?).

I cannot reproduce this bug. Looks like its fixed already. The email notif I got in the above scenario contained the Name perfectly.
Note that I had given the Full name field completely for both the users.

(In reply to Tony Thomas from comment #10)

I cannot reproduce this bug. Looks like its fixed already. The email notif I
got in the above scenario contained the Name perfectly.
Note that I had given the Full name field completely for both the users.

Hi Tony,

Against what version of MediaWiki are you testing? I'm still seeing these results with the MediaWiki instance we're running for TDF/LibreOffice.

Danke.

(In reply to Robinson Tryon from comment #11)

Against what version of MediaWiki are you testing? I'm still seeing these
results with the MediaWiki instance we're running for TDF/LibreOffice.

I am on the development version (1.23 alpha). This was reported for 1.21.0.
Do you get the same, even when Full Name was given during a/c creation ?

(In reply to Tony Thomas from comment #12)

(In reply to Robinson Tryon from comment #11)

Against what version of MediaWiki are you testing? I'm still seeing these
results with the MediaWiki instance we're running for TDF/LibreOffice.

I am on the development version (1.23 alpha). This was reported for 1.21.0.
Do you get the same, even when Full Name was given during a/c creation ?

We're currently using MW 1.21.6, and I've seen this issue repro recently. I'll try to find some time to test a dev version soon. Can you verify on current stable (1.22, I think?)

(In reply to Robinson Tryon from comment #13)

We're currently using MW 1.21.6, and I've seen this issue repro recently.
I'll try to find some time to test a dev version soon. Can you verify on
current stable (1.22, I think?)

Verified on Current stable release 1.22.4. I get this email

Dear Foo,

The test page FOO has been changed on 23 March 2014 by Bar, see
http://localhost/mediawiki/index.php/FOO for the current revision.

See http://localhost/mediawiki/index.php?title=FOO&diff=next&oldid=2 to
view this change.

See http://localhost/mediawiki/index.php?title=FOO&diff=0&oldid=2 for
all changes since your last visit.

Editor's summary: -

Contact the editor:
mail: http://localhost/mediawiki/index.php/Special:EmailUser/Bar
wiki: http://localhost/mediawiki/index.php/User:Bar

even though User:Bar is redlink

Given this hasn't seen any new activity of late, can we close as WFM or WONTFIX?

Given this hasn't seen any new activity of late, can we close as WFM or WONTFIX?

The TDF wiki is running MW 1.23.7. I'll see if we can upgrade to 1.24 soon, and I'll cross my fingers that the problem is fixed there.

Try these (updated) steps to Repro:

  • Create new test account
  • Do not set a Real name
  • (Optional) create a user page
  • Edit some page being watched by a 3rd party

RESULT: email body missing a noun (as described before)

It looks like the 'Real name' field is just being plunked into the body of the email without an is_empty? check. Should hopefully be a quick fix.

Thanks!

Try these (updated) steps to Repro:

  • Create new test account
  • Do not set a Real name
  • (Optional) create a user page
  • Edit some page being watched by a 3rd party

RESULT: email body missing a noun (as described before)

It looks like the 'Real name' field is just being plunked into the body of the email without an is_empty? check. Should hopefully be a quick fix.

Thanks!

I tried reproducing the bug as mentioned above. I think it has been fixed

matmarex set Security to None.

What's the status of this task? Has this been fixed or not?

Qubit claimed this task.

What's the status of this task? Has this been fixed or not?

After upgrading to MW 1.24, the bug appears to be fixed. Marking as resolved.