Page MenuHomePhabricator

Special:Newsletter/id/subscribers does not properly update subscriber count
Closed, ResolvedPublic

Description

If one manually removes adds or removes subscribers from a newsletter, the "subscriber count" column on Special:Newsletters becomes out of sync with the actual number of subscribers.

Event Timeline

@01tonythomas: I guess this could be a good #GCI-2017 task if someone mentors? :)

Yes yes. I can mentor. Lets make this happen.

The question here is how are you supposed to manually remove the subscriber, by executing it in MySQL?

Aklapper renamed this task from Special:Newsletter/id/subsribers does not update subscriber count to Special:Newsletter/id/subscribers does not update subscriber count.Dec 19 2017, 10:32 AM
Aklapper moved this task from Proposed tasks to Information needed on the Google-Code-in-2017 board.

Well, I see that the counts are getting updated on all sub/unsub from http://newsletter-test.wmflabs.org/wiki/Special:Newsletters -- and due to our application limitations of course, we cannot update this on real time when you have it done on say a seperate tab on http://newsletter-test.wmflabs.org/wiki/Special:Newsletter/2/subscribe.

@Pppery should give more information, or I close this one as invalid.

Ok, there does seem to have been a misunderstanding. I was referring to manual edits to subscribers via Special:Newsletter/id/subscribers (T154080), not (un)subscribing oneself via Special:Newsletters

This task is looking a bit more complicated than I had originally reported it as.

1: Submitting the manual subscribers form removing only one user does not change the subscriber count field at all
2: Submitting the manual subscribers form with no changes increases the subscriber count by 1
3: Sumbitting the manual subscribers form adding more than one user only increases the subscriber count by 1

... and a few other wrinkles I've missed somewhere

Pppery renamed this task from Special:Newsletter/id/subscribers does not update subscriber count to Special:Newsletter/id/subscribers does not properly update subscriber count.Dec 19 2017, 9:11 PM
Pppery updated the task description. (Show Details)

One question, does the number of subscribers get out of sync after adding/removing someone manually only temporarily and then re-syncs, or are manual removals/additions cause the number of subscribers to become false, permanently out of sync?

If it is the first case, I think it is OK. What matters is that the number of subscribers is correct, say, after 24 hours max.

If it is the second case, then this is a serious bug.

As far as I can tell, nothing resyncs the subscriber count, so it will be out of sync until someone runs the updateSubscriberCount.php maintenance script.

Wow. then its a bug then. Let me deploy the latest to our http://newsletter-test.wmflabs.org/

@01tonythomas : Once this task is ready / its task description is clear enough for Google-Code-in-2017, please give a heads-up. Thanks! :)

Change 401495 had a related patch set uploaded (by Pppery; owner: Phantom42):
[mediawiki/extensions/Newsletter@master] Fix incorrect subscriber count updates

https://gerrit.wikimedia.org/r/401495

Change 401495 merged by jenkins-bot:
[mediawiki/extensions/Newsletter@master] Fix incorrect subscriber count updates

https://gerrit.wikimedia.org/r/401495

01tonythomas claimed this task.

Nice catch. Thanks!