Page MenuHomePhabricator

Older Extension:New_User_Email_Notification (NewUserNotif) interferes with newer, modern Extension:EditNotify
Open, Needs TriagePublic

Description

Extension: EditNotify

Re: https://www.mediawiki.org/wiki/Extension:EditNotify#Issues_of_the_extension

Users can get notified when a page is created in any of namespace or category, but user cannot track a particular namespace or category. So when you are subscribing for 'create' page notifications, don't include 'namespace' or 'category' within the individual array for that notification.

@Yaron_Koren We (CCC 36C3 Congresswiki team) urgently need a way to get a notification when a new page in Namespace "Session" is created or edited. Currently, the extension apparently has an issue, that this cannot be set up.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 10 2019, 10:42 PM
Wikinaut added a comment.EditedDec 10 2019, 10:46 PM

Here's our setup:

require_once "$IP/extensions/EditNotify/EditNotify.php";
$wgEditNotifyAlerts = array(
        array(
                'action' => array( 'create', 'edit' ),
                'namespace' => 'Session',
                'users' => array( 'Andi', 'Wikinaut' ),
        )
);
Wikinaut updated the task description. (Show Details)Dec 10 2019, 10:46 PM
Wikinaut updated the task description. (Show Details)
Wikinaut renamed this task from Extenison:EditNotify: User cannot track a particular namespace or category for creation. This is however needed. to Extension:EditNotify: User cannot track a particular namespace or category for creation. This is however needed. .Dec 10 2019, 10:59 PM

Hi - I just tried this out, and I couldn't reproduce the problem. I added the following lines to LocalSettings.php:

$wgEditNotifyAlerts = array(

array(
        'action' => array( 'create', 'edit' ),
        'namespace' => 'Help',
        'users' => array('Yaron Koren')
)

);

...and I got Echo notifications for changes in the "Help:" namespace, but not any other namespaces.

What version of MediaWiki are you running? It sounds like fairly old code, since the current EditNotify code doesn't include EditNotify.php (you have to call wfLoadExtension() instead).

Wikinaut added a comment.EditedDec 11 2019, 12:26 AM

1.31.3 see https://events.ccc.de/congress/2019/wiki/index.php/Special:Version

Shall I upgrade? I wanted, but was reluctant because of my team members, but I am prepared to. Pls. let me know if an upgrade could solve this (if you can overlook it quickly)

upd: usually, on my private wikis, I always run the latest code.

Wikinaut added a comment.EditedDec 11 2019, 12:27 AM

wfLoadExtension() wasn't mentioned in the Description, that's why I didn't use the modern method.

No, it's fine, code from 2018 should work fine. II don't know why it's failing for you. I wonder if it's the specific namespace. Could you try it with the "Help" namespace instead and see if that works for you?

Will try. Just a remark: I installed the extension for the 1.31 release tag, to match the core extension.

Wikinaut added a comment.EditedDec 11 2019, 1:11 AM

Yaron, it is *not* sensitive to the Namespace:

$wgEditNotifyAlerts = array(

array(
        'action' => array( 'create', 'edit' ),
        'namespace' => array( 'Help' ),
        'users' => array( 'Wikinaut' ),
)

);

That's very strange. I tried it now with almost the exact same settings (only the username is different), and it's working fine for me. Try calling wfLoadExtension( 'EditNotify' ) in LocalSettings.php instead, maybe?

Negative. Notifs come for any creations, regardless of the Namespace.
BTW, I upgraded core to 1.33.1 and also the EditNotify extension.
Strange. Let me know, if you have something what I could test.

Wikinaut added a comment.EditedDec 11 2019, 2:36 AM

Something different: the editbuttons are gone after the upgrade, any idea, why? Perhaps a cache issue... must wait

The edit tabs are gone? I have no idea...

If this is high-priority, I would try temporarily uninstalling all extensions except Echo and EditNotify - it might be another extension that is interfering with the process.

Yaron, yes, good point, as we have the NewUserNotif.php working...! I will disable that and report here, if there is an interference.

Aha! *phew* I hope the conference can go well now.

Wikinaut renamed this task from Extension:EditNotify: User cannot track a particular namespace or category for creation. This is however needed. to Extension:EditNotify interferes with Extension:New_User_Email_Notification (NewUserNotif).Dec 11 2019, 3:50 AM

Yaron: we would like to have both extensions, or, when you can "enhance" the newer "EditNotify" so that it also can be used when a new User Account is created (not: Userpage), that would be great.

Yes, it would be great if both worked. Looking through the code of NewUserNotif now (I had actually never heard of this extension before), I don't know why this one causes EditNotify to be "over-active". NewUserNotif doesn't use Echo, and instead creates and sends emails directly. My guess is that, if it did use Echo, the problem would go away. Although you could also try reversing the order in which the two extensions are included in LocalSettings.php - who knows, that might fix the problem.

It's possible to add in notifications about new user registrations into EditNotify, although that wouldn't really fit in with the name "EditNotify"... maybe a new extension is the way to go.

By the way, given that your wiki has, or will have, hundreds or even thousands of users, how helpful is it to get an email announcing each one?

Wikinaut added a comment.EditedDec 11 2019, 4:37 AM

regarding your idea with reversing: I had this idea, too, but did not try that, because I really wanted to upgrade to 1.33.1, so I took the issue here as "reason" to upgrade first. Will do try reversing the invoke sequence now.

regarding the users: no, there are not so many users requesting an account - we had to use the notification to catch up a nasty spammer or spam bot.

Wikinaut added a comment.EditedDec 11 2019, 4:39 AM

Result: negative: the reversing of the invocation sequence does not fix the issue.

Wikinaut added a comment.EditedDec 11 2019, 4:41 AM

And regarding the missing editbuttons, I ask the MW gurus here https://www.mediawiki.org/wiki/Topic:Vcqdm74c4a1ltzg5

UPDATED:
This (off-topic) issue is a non-issue and solved: with introduction MW1.32, the editbuttons has been totally removed.

It's great that you got the edit buttons thing fixed. By the way, should the subject line of this task be flipped? It sounds like NewUserNotif is interfering with EditNotify, not the other way around. Or is it both?

This comment was removed by Wikinaut.
Wikinaut renamed this task from Extension:EditNotify interferes with Extension:New_User_Email_Notification (NewUserNotif) to Older Extension:New_User_Email_Notification (NewUserNotif) interferes with newer, modern Extension:EditNotify.Dec 11 2019, 1:34 PM
This comment was removed by Wikinaut.