Extension talk:EditNotify

Related documentation
Thanks for the documentation! When you consider the extension ready to be used by others, please add links from related documentation, like the MediaWiki core feature Manual:$wgUsersNotifiedOnAllChanges. Nemo 08:39, 1 September 2016 (UTC)

Exclude some namespaces
This extension could be very useful if one can exclude notifications from some namespaces (action => create), i.e. "File" namespace, because it produces enormous amount of notifications. 217.108.170.8 15:04, 20 December 2016 (UTC)
 * filed as bug https://phabricator.wikimedia.org/T240656 --Wikinaut (talk) 08:09, 13 December 2019 (UTC)
 * and another one, allow only one unread notification for one page, i.e. if some one made multiple edits of one page in an hour 217.108.170.8 10:50, 21 December 2016 (UTC)

Warnings and notices
Setup
 * MediaWiki 	1.27.1 (36b636d) 20:26, 11. Jan. 2017
 * PHP 	5.6.29-0+deb8u1 (apache2handler)
 * MariaDB 	10.0.29-MariaDB-0+deb8u1
 * Page Forms	4.1 (f97847f) 18:30, 15. Nov. 2016
 * Edit Notify 1.0.0
 * Edit Notify Connector 0.1.0

Issue Warning: Invalid argument supplied for foreach in /.../w/extensions/EditNotify/EditNotify.hooks.php on line 807 Warning: Invalid argument supplied for foreach in /.../w/extensions/EditNotify/EditNotify.hooks.php on line 807 Notice: Undefined variable: categoryUserArray in /.../w/extensions/EditNotify/EditNotify.hooks.php on line 850 Warning: array_diff: Argument #1 is not an array in /.../w/extensions/EditNotify/EditNotify.hooks.php on line 850 Warning: array_unique expects parameter 1 to be array, null given in /.../w/extensions/EditNotify/EditNotify.hooks.php on line 850 Warning: array_merge: Argument #2 is not an array in /.../w/extensions/EditNotify/EditNotify.hooks.php on line 853 Warning: Invalid argument supplied for foreach in /.../w/extensions/EditNotify/EditNotify.hooks.php on line 855

This armada of notices and warnings is emitted multiple times when editing a page using the Page Forms extension.

Cheers --&#91;&#91;kgh&#93;&#93; (talk) 23:12, 14 February 2017 (UTC)

FYI.


 * It sounds like the problem might be just that you haven't set $wgEditNotifyAlerts. (Although the code should itself set a default value of a blank array for that variable, to prevent these error messages - that's a bug.) What's "Edit Notify Connector", by the way - an extension of yours? Yaron Koren (talk) 15:19, 15 February 2017 (UTC)


 * Oops, I indeed set nothing to $wgEditNotifyAlerts. EditNotify was added to the BlueSpice software bundle which also includes the Edit Notify Connector extension integrating this extension into the bundle. I just deployed Edit Notify without further thought. It is automatically invoked via one of the config files they provide so I relied on this. Having a default value preventing the error messages from happening will indeed be cool. Cheers --&#91;&#91;kgh&#93;&#93; (talk) 21:03, 15 February 2017 (UTC)


 * Oh, good to know. Yaron Koren (talk) 01:12, 16 February 2017 (UTC)

Track certain namespaces pages creation

 * filed as bug https://phabricator.wikimedia.org/T240656 --Wikinaut (talk) 08:09, 13 December 2019 (UTC)

EditNotify.hooks.php: &darr;

you will get ability to track certain namespaces pages creation and every user can toggle this in settings manually. But you need to add hook and some strings to language files

"Hooks": { "BeforeCreateEchoEvent": [ "EditNotifyHooks::onBeforeCreateEchoEvent" ],		"EchoGetDefaultNotifiedUsers": [ "EditNotifyHooks::onEchoGetDefaultNotifiedUsers" ],		"PageContentSave": [ "EditNotifyHooks::onPageContentSave" ],		"PageContentInsertComplete": [ "EditNotifyHooks::onPageContentInsertComplete" ],		"GetPreferences": [ "EditNotifyHooks::onGetPreferences" ]	},

 "prefs-newnotifications": "New Notifications", "prefs-page-create-notifs": "Page creation", "prefs-page-edit-notifs": "Page edit"

217.108.170.8 15:15, 10 April 2017 (UTC)

Namespaces ang page creation notification
Hi and thank you for this very useful extension.

in 6 Issues of the extension you say that "when you are subscribing for create page notifications, don t include namespace"

but in 4 Usage you put an example with a namespace for page creation notification. :(

Can I remove the line

Thanks,

Nicolas NALLET Wiki-Valley.com, Semantiki.fr (talk) 09:41, 23 March 2017 (UTC)

User-subscribed notifications
So this extension requires an admin with access to LocalSettings.php to manage the list of users to whom the notifications are sent both via web (Echo) and via email. How do I add the notification types enabled by this extension to User preferences for Notifications (Echo) so that they manage their own notifications?
 * Ultimately, I want to allow users to opt-in to notifications for changes to pages on their watchlist. MW already allows email notifications, but I like to provide an option to receive only Web notifications.  I figured this extension is the closest thing I've found so far that might allow this.

--Tommy H (talk) 02:07, 29 June 2019 (UTC)
 * @Tommy H, any plans on implementing this feature yourself soon? We also have a need for it on my wiki. If not, I might do it in the coming months. Tinss (talk) 22:20, 19 September 2019 (UTC)
 * @Tinss, not really, my skillset in this area is very limited and haven't had the opportunity to get over the learning curve. Tommy H (talk) 00:18, 25 September 2019 (UTC)
 * @Tommy H, no worries, I'll try to inform you if I ever get to making an extension for this. I might then need your help for some testing :) Tinss (talk) 22:32, 26 September 2019 (UTC)

Support for group
Is it possible to set these settings for members of an entire group? Even if there were some other code we could use to yank all the members of a group into an array and then use that when calling the "users" argument. --Realsalt (talk) 17:56, 16 April 2021 (UTC)

Extension notifies using the article title instead of the category
Even though I put the category filter on my code, the extension only notifies when a change is made on an article with the category title. Example: the following code notifies when a change is made in the article with the title 'Example' inside the Example category, but not on others articles on that same category.

$wgEditNotifyAlerts = array (  array( 'action' => 'edit', 'category' => 'Example', 'users' => array('Ghosth96') ) );

Wiki version: 1.36.1
 * Edit: it was corrected by changing a line on the *Notification for edit in non template pages* section, replacing this line inside the first if:

$categories[$row->cl_to] = $title->getFullText;

with this line:

$categories[$title->getFullText]=$row->cl_to;

EditNotify - How to assign action to a user group rather than a user
I would like to assign EventNotify action to a user group rather than a user. Is this possible? Jamesyoungottawa (talk) 17:58, 3 November 2022 (UTC)

PageContentSave Depricated in 1.35.0
Since PageContentSave was depricated in 1.35.0 could it cause EditNotify to have Internal Errors happen after editing and saving pages on a wiki?

I am currently using MediaWiki 1.35.6 on my Wiki.

Error Message I am getting at the very top of the page: "Warning: strcmp expects two parameter 2 to be a string, array given C:\...\...\extensions\EditNotify\EditNotify.hooks.php on line 289."

Error Message I am getting on the page: "INTERNAL ERROR ... Object of class ENPageComponent could not be converted to string. Backtrace ..."

LINKS:

Manual:Hooks/PageContentSave - MediaWiki https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/EditNotify/+/refs/heads/REL1_35/EditNotify.hooks.php#:~:text=public%20static%20function-,onPageContentSave,-(%20WikiPage%20%26 https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/EditNotify/+/refs/heads/REL1_35/EditNotify.hooks.php#:~:text=if%20(%20strcmp,%24name%5D%3B 216.123.208.21 14:08, 31 January 2023 (UTC)