Extension talk:Echo

Jump to navigation Jump to search

About this board

Apache spawns too many processes after I installed Echo

1
Silkwood (talkcontribs)

My config:

Product Version
MediaWiki 1.32.5
PHP 7.2.17-0ubuntu0.18.04.1 (apache2handler)
MariaDB 10.1.38-MariaDB-0ubuntu0.18.04.1
ICU 60.2
Elasticsearch 5.6.16

Immediately after the installation of the Echo extensions, the Apache server starts spawning a lot of processes (about 150).

The problem is solved by uninstalling the extension.

Did anyone else have the same problem?

Tnx

Reply to "Apache spawns too many processes after I installed Echo"

Configuration: $wgEchoNotifications

1
Silkwood (talkcontribs)
Product Version
MediaWiki 1.32.5
PHP 7.2.17-0ubuntu0.18.04.1 (apache2handler)
MariaDB 10.1.38-MariaDB-0ubuntu0.18.04.1

Hello,

my skin

Skin Version License Description Authors
Metrolook 7.0 alpha 2 (578ddcf) 19:13, October 11, 2018 GPL-2.0-or-later Metrolook is a Metro-inspired fork of the Vector skin immewnity, Paladox, Craig Davison and lagleki

does not show the tray icon next to the bell icon in the top-bar of my wiki, so I managed to show all the notifications in one place (the bell).

Despite every attempt, I haven't been able to redirect notifications to "alerts" (instead of "messages").

I tried (as suggested below by @Roan Kattouw (WMF)) with:

$wgExtensionFunctions[] = function () {

    global $wgEchoNotifications;

    // To change individual notification types:

    $wgEchoNotifications['welcome']['section'] = 'alert';

    // To change all notification types at once:

    foreach ( $wgEchoNotificationTypes as &$data ) {

        $data['section'] = 'alert';

    }

};

in LocalSettings.php, and also to modify the file .../extensions/Echo/extension.json (as explained in Echo Extension Configuration section) like this:

"thank-you-edit": {

                                        "user-locators": [

                                                "EchoUserLocator::locateEventAgent"

                                        ],

                                        "category": "system",

                                        "notify-type-availability": {

                                                "email": false

                                        },

                                        "group": "positive",

                                        "presentation-model": "EchoEditThresholdPresentationModel",

                                        "section": "alert"

},

but without success.

What should I do?

Reply to "Configuration: $wgEchoNotifications"
Spas.Z.Spasov (talkcontribs)

I'm trying to setup Echo within a wiki family. I'm almost done but I can't find detailed information about $wgMainStash and $wgMainWANCache and how to share them between the wikis.

What I have done at the moment:

1. In LocalSettings.php for each wiki I've added next lines:

$wgSharedDB = 'tCommons'; 
$wgSharedTables[] = 'ipblocks';
$wgSharedTables[] = 'user_groups';
$wgSharedTables[] = 'interwiki';
$wgSharedTables[] = 'user_properties';

## Extension:Echo
wfLoadExtension( 'Echo' );
$wgEchoSharedTrackingDB = 'tCommons';
$wgEchoUseJobQueue = true;
$wgEchoCrossWikiNotifications = true;
$wgEchoUseCrossWikiBetaFeature = true;
$wgDefaultUserOptions['echo-cross-wiki-notifications'] = true;

2. In the terminal:

sudo mysql -u'root' -p tCommons < /var/www/mediawiki/extensions/Echo/db_patches/echo_unread_wikis.sql
sudo php /var/www/mediawiki/maintenance/update.php --conf /var/www/each-wiki/LocalSettings.php

At this stage, I receive cross-wiki notifications, but they are empty - as it shown here.

Could someone help me, please?

Zoglun (talkcontribs)

Base on what I know for $wgMainStash and $wgMainWANCache . These are two settings for sharing cached data across data center.

I found the wgMainStash in https://noc.wikimedia.org/conf/InitialiseSettings.php.txt

It is set to

'wgMainStash' => [ 'default' => 'redis_local', // declared in redis.php 'wikitech' => 'memcached-pecl', ],

You got all sharing setting ready but not acutally sharing the message itself.

I guess you need a single cache (uAPC / memcached/ redis) for all wiki, then point

$wgMainStash = CACHE_ACCEL; (assume using uAPC)

However, set $wgMainWANCache = true without touching $wgMainWANCache give me no result at all.

If you got it work please share it with me, thank you!

Spas.Z.Spasov (talkcontribs)

Hello, @Zoglun. Thanks for your response! I'm missing something. Yes I'm with uAPC. I have followed your advice and have set $wgMainStash = CACHE_ACCEL;, but when I set $wgMainWANCache = true; I've got an error message. Obviously, I must reading more about the caching.

Wess (talkcontribs)

Any success in that?

Spas.Z.Spasov (talkcontribs)

Unfortunately not. We don't use extensively our wiki in other languages, so I left it as it is for the moment.

Revansx (talkcontribs)

Is there an official description of how to setup cross-wiki echo notifications?

Revansx (talkcontribs)
Spas.Z.Spasov (talkcontribs)

Hello, @Revansx.

I hope you are well! Sorry I haven answered your question at the last time, I just forgot and the time went further :)

I do not have any success with this task. Did you succed with it? Did you read the article Interwiki cache?

Revansx (talkcontribs)

Hi Spas.. I'm well, thanks. likewise! :-) .. reading now

Revansx (talkcontribs)

I'm still struggling to understand how this relates specifically to getting cross-site notifications configured. Please tell me if I'm understanding this correctly.. Is it true that configuring for cross-site notifications is essential exactly as you have detailed it in your original post here:


[quoting] 1. In LocalSettings.php for each wiki I've added next lines:

$wgSharedDB = 'tCommons'; 
$wgSharedTables[] = 'ipblocks';
$wgSharedTables[] = 'user_groups';
$wgSharedTables[] = 'interwiki';
$wgSharedTables[] = 'user_properties';

## Extension:Echo
wfLoadExtension( 'Echo' );
$wgEchoSharedTrackingDB = 'tCommons';
$wgEchoUseJobQueue = true;
$wgEchoCrossWikiNotifications = true;
$wgEchoUseCrossWikiBetaFeature = true;
$wgDefaultUserOptions['echo-cross-wiki-notifications'] = true;

2. In the terminal:

sudo mysql -u'root' -p tCommons < /var/www/mediawiki/extensions/Echo/db_patches/echo_unread_wikis.sql
sudo php /var/www/mediawiki/maintenance/update.php --conf /var/www/each-wiki/LocalSettings.php

At this stage, I receive cross-wiki notifications, but they are empty.


And then that's where I don't see any resolution to your question. Did you ever get your cross-site notifications to work after the steps outlined above? what were the final steps?

Revansx (talkcontribs)
Spas.Z.Spasov (talkcontribs)

Hello, @Revansx, I spent another few hour in reading and play with the settings. I've got more familiar with the cache options, and tried some outdated cache bug solutions with no success. The situation is the same, with the settings above, I'm receiving notification that says I'm having a message from another wiki, but I can't see any details about the message until I'm not going to the wiki where it is received.

I'm assuming, probably there is something hard coded in the source, when I have enough time I will try to inspect it. Meanwhile I will review the extension that you have shared.

Regards, Spas

Revansx (talkcontribs)

Hi User:Spas.Z.Spasov, thanks for the reply. I'm pretty sure that the Extension:CentralNotice is unrelated to cross-site notifications via echo. And I have still not figured out how to implement cross-site notification on my enterprise wiki-farm that uses an common SSO for all wikis. Maybe someday someone will make it straight forward to do. If you figure out what you need to do, please let me know. I'll do the same. cheers!

Reply to "Little help for Cross wiki setup"
Kghbln (talkcontribs)

I have no clue how to set user preferences, e.g. I want to set e-mails for mentions by default. Both

$wgDefaultUserOptions['echo-subscriptions-email-mention'] = 1;

or

$wgDefaultUserOptions['echo-subscriptions-email-mention'] = true;

fail gloriously.

MSchottlender-WMF (talkcontribs)

You should be able to set that in "Preferences", under the "Notifications" tab. There's a matrix of checkboxes dictating which type of notification you wish to get via the web popup and/or email.

Kghbln (talkcontribs)

Thanks for your reply. I am aware of this and I already changed my preferences.

However I still do not know how to change the defaults for all new users that will be registering on the wiki without requiring them to got to their preferences to change them accordingly.

Sokote zaman (talkcontribs)

I have the same problem.

Lens0021 (talkcontribs)

Have you tried to create a new account after changing $wgDefaultUserOptions? Existing user accounts who had the (previous) default option and didn't set it explicitly (which means that it's not stored in the database) will then use the new default. Or simply press the "Restore all default settings (in all sections)" button? Because $wgDefaultUserOptions['echo-subscriptions-email-mention'] = true; works for me.

Sokote zaman (talkcontribs)

tnakyou

wfLoadExtension( 'Echo' ); #NOT Complate configrations--->>>

$wgEchoEnableEmailBatch = true;

$wgEchoUseJobQueue = true;

$wgEchoBundleEmailInterval = "3";

$wgEchoEmailFooterAddress = 'ویکی‌کد: دانشنامه جامع زبان‌های برنامه‌نویسی در ایران';

#$wgNotificationSender = xxxxxxxxxxxxxxxxxxxxxxxxxx

#$wgNotificationSenderName = xxxxxxxxxxxxxxxxxxxxxxxxxx

#$wgNotificationReplyName = xxxxxxxxxxxxxxxxxxxxxxxxxx

$wgEchoCluster = false;

$wgEchoMaxUpdateCount = "2000";

$wgEchoMaxMentionsCount = "500";

$wgEchoMentionStatusNotifications = false;

$wgEchoMentionsOnMultipleSectionEdits = true;

$wgEchoMentionOnChanges = true;

$wgEchoMaxMentionsInEditSummary = "10000";

$wgEchoNewMsgAlert = true;

$wgEchoShowFooterNotice = false;

#$wgEchoFooterNoticeURL = '';

$wgNotifyTypeAvailabilityByCategory = [

    // Otherwise, a user->user email could trigger an additional redundant notification email.

    'emailuser' => [

        'web' => true,

        'email' => false,

    ],

    'mention-failure' => [

        'web' => true,

        'email' => false,

    ],

    'mention-success' => [

        'web' => true,

        'email' => false,

    ],

];

$wgEchoNotifiers = [

    'web' => [ 'EchoNotifier', 'notifyWithNotification' ],

    'email' => [ 'EchoNotifier', 'notifyWithEmail' ],

];

#$wgEchoOnWikiBlacklist = xxxxxxxxxxxxxxxxxxxxxxxxxx

#$wgEchoPerUserWhitelistFormat = xxxxxxxxxxxxxxxxxxxxxxxxxx

$wgEchoCrossWikiNotifications = false;

$wgEchoUseCrossWikiBetaFeature = false;

#$wgEchoNotificationCategories = xxxxxxxxxxxxxxxxxxxxxxxxxx

$wgDefaultUserOptions['echo-show-alert'] = true;

$wgDefaultUserOptions['echo-email-frequency'] = "0";

$wgDefaultUserOptions['echo-dismiss-feedback-alert'] = "0";

$wgDefaultUserOptions['echo-email-format'] = "HTML";

#$wgDefaultUserOptions["echo-subscriptions-email-{$category}"] = xxxxxxxxxxxxxxxxxxxxxxxxxx

#$wgDefaultUserOptions["echo-subscriptions-web-{$category}"] = xxxxxxxxxxxxxxxxxxxxxxxxxx

#$wgEchoConfig = xxxxxxxxxxxxxxxxxxxxxxxxxx

#$wgEchoConfig = xxxxxxxxxxxxxxxxxxxxxxxxxx

$wgDefaultUserOptions['echo-subscriptions-email-mention'] = true;

Reply to "Changing user preferences? How to?"

Not receiving any notifications

1
Summary by Legaulph

Well I was testing myself and I was making the changes. So it is an issue with CategoryWatch. I just had someone test and it is working as expected

Legaulph (talkcontribs)
MediaWiki	1.31.1
PHP	7.1.8 (apache2handler)
Echo release 1.31
CategoryWatch	2.0, 2017-09-19 (542f9a1) 16:24, 17 April 2018
wfLoadExtension( 'Echo' );
#$wgRCWatchCategoryMembership=true;
wfLoadExtension( 'CategoryWatch' );
$wgCategoryWatchNotifyEditor = true;


When I move a page into or out of a category I get nothing.

Notifications for anonymous users

3
181.55.114.245 (talkcontribs)

Is there any way to allow anonymous users to receive notifications?

Quiddity (WMF) (talkcontribs)

Not currently. The main complexity is that IP addresses can often be shared by many people (e.g. school networks, and sometimes entire countries!) and there is no way to guarantee that the intended person will see the notification. The task that is tracking progress towards a potential solution is phab:T58828, but moving slowly as epic tasks tend to do. HTH.

181.55.114.245 (talkcontribs)

Ok, I have installed StructuredDiscussions and I've replaced all the user talks by structured discussions. The problem is that anonymous doesn't receive a notification when someone leaves a message in their discussion.


So, is there any chance that users receive notifications of structured discussions? Or how to disable structured discussions only for the user talks of anonymous users?

Reply to "Notifications for anonymous users"

Can this be installed without command line access to manually update schema at all?

4
CayceP (talkcontribs)

I'm on shared hoster, which means I have no command line access to run any php script besides whatever Extension:MainanceShell does (or pretends do be doing) I tried to install the extensions, did run /mw-config/ but it doesn't seem to create the necessary tables via this. If I activate the extension it throws exceptions because the tables are missing (no surprise there):


[89cc3e61a284ed2f4a851274] 2018-06-08 09:48:03: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"

MediaWiki internal error.

Original exception: [3ce14ff778f71f0be6b696d4] /wiki/Hauptseite Wikimedia\Rdbms\DBQueryError from line 1149 of /home/webpages/server/user/html/w/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? Query: SELECT * FROM `w1_echo_event` INNER JOIN `w1_echo_notification` ON ((notification_event=event_id)) INNER JOIN `w1_echo_target_page` ON ((etp_event=event_id)) WHERE event_deleted = '0' AND notification_user = '13' AND notification_read_timestamp IS NULL AND etp_page = '1' Function: EchoEventMapper::fetchUnreadByUserAndPage Error: 1146 Table 'db_12345_3.w1_echo_event' doesn't exist (mysql.server.de)

Backtrace:

  1. 0 /home/webpages/server/user/html/w/includes/libs/rdbms/database/Database.php(979): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
  2. 1 /home/webpages/server/user/html/w/includes/libs/rdbms/database/Database.php(1343): Wikimedia\Rdbms\Database->query(string, string)
  3. 2 /home/webpages/server/user/html/w/extensions/Echo/includes/mapper/EventMapper.php(155): Wikimedia\Rdbms\Database->select(array, string, array, string, NULL, array)
  4. 3 /home/webpages/server/user/html/w/extensions/Echo/Hooks.php(883): EchoEventMapper->fetchUnreadByUserAndPage(User, integer)
  5. 4 [internal function]: EchoHooks::onPersonalUrls(array, Title, SkinDarkVector)
  6. 5 /home/webpages/server/user/html/w/includes/Hooks.php(177): call_user_func_array(string, array)
  7. 6 /home/webpages/server/user/html/w/includes/Hooks.php(205): Hooks::callHook(string, string, array, NULL)
  8. 7 /home/webpages/server/user/html/w/includes/skins/SkinTemplate.php(732): Hooks::run(string, array)
  9. 8 /home/webpages/server/user/html/w/includes/skins/SkinTemplate.php(475): SkinTemplate->buildPersonalUrls()
  10. 9 /home/webpages/server/user/html/w/includes/skins/SkinTemplate.php(249): SkinTemplate->prepareQuickTemplate()
  11. 10 /home/webpages/server/user/html/w/includes/OutputPage.php(2442): SkinTemplate->outputPage()
  12. 11 /home/webpages/server/user/html/w/includes/MediaWiki.php(858): OutputPage->output(boolean)
  13. 12 /home/webpages/server/user/html/w/includes/MediaWiki.php(870): MediaWiki->{closure}()
  14. 13 /home/webpages/server/user/html/w/includes/MediaWiki.php(523): MediaWiki->main()
  15. 14 /home/webpages/server/user/html/w/index.php(43): MediaWiki->run()
  16. 15 {main}

Exception caught inside exception handler: [3ce14ff778f71f0be6b696d4] /wiki/Hauptseite Wikimedia\Rdbms\DBQueryError from line 1149 of /home/webpages/server/user/html/w/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? Query: SELECT * FROM `w1_echo_event` INNER JOIN `w1_echo_notification` ON ((notification_event=event_id)) INNER JOIN `w1_echo_target_page` ON ((etp_event=event_id)) WHERE event_deleted = '0' AND notification_user = '13' AND notification_read_timestamp IS NULL AND etp_page = '1' Function: EchoEventMapper::fetchUnreadByUserAndPage Error: 1146 Table 'db_12345_3.w1_echo_event' doesn't exist (mysql.server.de)

Backtrace:

  1. 0 /home/webpages/server/user/html/w/includes/libs/rdbms/database/Database.php(979): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
  2. 1 /home/webpages/server/user/html/w/includes/libs/rdbms/database/Database.php(1343): Wikimedia\Rdbms\Database->query(string, string)
  3. 2 /home/webpages/server/user/html/w/extensions/Echo/includes/mapper/EventMapper.php(155): Wikimedia\Rdbms\Database->select(array, string, array, string, NULL, array)
  4. 3 /home/webpages/server/user/html/w/extensions/Echo/Hooks.php(883): EchoEventMapper->fetchUnreadByUserAndPage(User, integer)
  5. 4 [internal function]: EchoHooks::onPersonalUrls(array, Title, SkinDarkVector)
  6. 5 /home/webpages/server/user/html/w/includes/Hooks.php(177): call_user_func_array(string, array)
  7. 6 /home/webpages/server/user/html/w/includes/Hooks.php(205): Hooks::callHook(string, string, array, NULL)
  8. 7 /home/webpages/server/user/html/w/includes/skins/SkinTemplate.php(732): Hooks::run(string, array)
  9. 8 /home/webpages/server/user/html/w/includes/skins/SkinTemplate.php(475): SkinTemplate->buildPersonalUrls()
  10. 9 /home/webpages/server/user/html/w/includes/skins/SkinTemplate.php(249): SkinTemplate->prepareQuickTemplate()
  11. 10 /home/webpages/server/user/html/w/includes/OutputPage.php(2442): SkinTemplate->outputPage()
  12. 11 /home/webpages/server/user/html/w/includes/exception/MWExceptionRenderer.php(135): OutputPage->output()
  13. 12 /home/webpages/server/user/html/w/includes/exception/MWExceptionRenderer.php(54): MWExceptionRenderer::reportHTML(Wikimedia\Rdbms\DBQueryError)
  14. 13 /home/webpages/server/user/html/w/includes/exception/MWExceptionHandler.php(75): MWExceptionRenderer::output(Wikimedia\Rdbms\DBQueryError, integer)
  15. 14 /home/webpages/server/user/html/w/includes/exception/MWExceptionHandler.php(130): MWExceptionHandler::report(Wikimedia\Rdbms\DBQueryError)
  16. 15 /home/webpages/server/user/html/w/includes/MediaWiki.php(550): MWExceptionHandler::handleException(Wikimedia\Rdbms\DBQueryError)
  17. 16 /home/webpages/server/user/html/w/index.php(43): MediaWiki->run()
  18. 17 {main}


So this means I can't use this since it requires to run update.php via command line to update the schema? Or should the tables be created via /mw-config/ as well (as it usual does for other Extension with databases changes) and it's just not working for me? I'm using a custom skin but it didn't work with one from of the bundled ones either.

Software Version
MediaWiki 1.30.0
PHP 5.6.36 (apache2handler)
MySQL 5.6.39-83.1-log
ICU 4.8.1.1
177.184.220.229 (talkcontribs)

I have the same problem.

104.142.125.214 (talkcontribs)

Same issue here also.

104.142.125.214 (talkcontribs)

Another user (S3r3nd1) pointed towards the fix to this for ppl without command line access:

"If you look inside the Echo extension directory, you'll see a nice "echo.sql".

I opened it and saw there were just the queries to create Echo missing tables which are indeed not created with the Update script.

So I went to phpMyAdmin and imported the echo.sql to create the new tables.

For me, this worked. I don't think this is quite regular, but it works, so...

PS : if you have prefix to your wiki installation, don't forget to add it for the echo_email_batch, echo_event, echo_notification, and echo_target_page"

Reply to "Can this be installed without command line access to manually update schema at all?"

Displaying Database Label instead of "inbox"

1
Steveengelhardt (talkcontribs)

So it looks like this bit of code makes it display my database label, "steveeng_mw19717-mw8z_", when i believe it should say "Inbox". What file do i need to edit with this bit of code in it?

<span class="oo-ui-labelElement-label mw-echo-ui-pageNotificationsOptionWidget-title-label">steveeng_mw19717-mw8z_</span>

Reply to "Displaying Database Label instead of "inbox""

Can you trigger an email from within a conditional statement?

2
Legaulph (talkcontribs)

Is this possible?

{{#if: {{{Contact|}}}|yes|email support group}}

Email a certain person or group

Dinoguy1000 (talkcontribs)

No, that would be horrifically abusable.

Reply to "Can you trigger an email from within a conditional statement?"

Suggestion: add "run composer install" into Installing session.

2
Zoglun (talkcontribs)

Suggestion: add "run composer install" into Installing session. Without composer components, Echo return fatal error sometimes.


(Using Mediawiki 1.31.1 with matched Echo version.)

Legoktm (talkcontribs)

Echo has no composer dependencies, what fatal errors are you seeing?

Reply to "Suggestion: add "run composer install" into Installing session."