Open main menu

Extension talk:Echo

About this board

Cross-wiki notifications, database tables don't exist

1
NemesisAT (talkcontribs)

Hello, I'm trying to enable cross-wiki notifications. I am missing the "echo_unread_wikis" table, according to the error output. How do I go about fixing this?

Thanks

Reply to "Cross-wiki notifications, database tables don't exist"

Is there a way to merge the "alert" badge and the "notifications"?

6
Oleolsenkjhølkølk (talkcontribs)

Right now, whenever someone is doing an action that creates a notification (giving thanks, making edits etc) the alert icon doesnt change or show a red symbol or anything. So a user doesnt know he has notifications until he looks in his profile menu and se a separate bar called "notifications".

So is it possible to have notifications show where "alerts" are? It seems a bit weird to keep these two as separate, and to even hide one of them.

Quiddity (WMF) (talkcontribs)

In the default setup and skin, notifications like "Thanks" are shown under the "Notices" icon. You can see a screenshot at Help:Notifications#Detailed notification layout. I would guess that perhaps you are talking about a different skin, and possibly a non-Wikimedia site? We would need more context in order to possibly help.

88.90.0.192 (talkcontribs)

@Quiddity (WMF)

Oh, wow, i mean no offense but i actually wasnt expecting a reply until sometime next year, so thank you for noticing this. I really appreciate it.

And yes, it is a mediawiki site, with a skin that is called metrolook, which is built upon the vector skin. So, what happens is that there is a bell icon on the "toolbar" on the top, the same bar as most standard mediawiki skins have. But there is also a drop down menu for your profile related links, login/log out etc. Now, on the drop down menu there is a link called "notifications", where notifications from the echo extension shows up, while the "bell" icon remains basically unused. So, what i was wondering is whether it was possible to merge the two, as i have gotten the impression that in the echo extension "alerts" and "notifications" are two different things?

Currently, in order for a user to see notifications is to click on the alert icon (the bell) which gives a menu, and then the user clicks on a menu link saying notifications, in which they will se whether or not there are new notifications.

I have taken some screenshots, but not sure how to post them here,

Quiddity (WMF) (talkcontribs)

I'm not sure. @Roan Kattouw (WMF) do you know if there's an easy way for a 3rd party wiki to merge the two groups?

Oleolsenkjhølkølk (talkcontribs)

Or, any alternative solutions would be greatly appreciated too. Changing which events gives a notification where or something similar?

Roan Kattouw (WMF) (talkcontribs)

Ideally, the skin that you're using would display both alerts and notifications in a useful way :/

However, changing which notification types are in which group is pretty easy to do in LocalSettings.php:

// To change individual notification types:
$wgEchoNotifications['welcome']['section'] = 'alert';

// To change all notification types at once:
foreach ( $wgEchoNotificationTypes as &$data ) {
    $data['section'] = 'alert';
}
Reply to "Is there a way to merge the "alert" badge and the "notifications"?"

NotifUser.php: Class 'CentralIdLookup' not found

3
Alexandroslee (talkcontribs)

I got " NotifUser.php: Class 'CentralIdLookup' not found "

and seems from getMemcKey

how to do ?

Alexandroslee (talkcontribs)

seems Build a memcached key got wrong ?!

Alexandroslee (talkcontribs)

have to install memcached ?

Reply to "NotifUser.php: Class 'CentralIdLookup' not found"
أحمد (talkcontribs)

To ease maintenance I put all non-bundled extensions into a directory parallel to the MW base directory, and symlink to those downloaded extensions from ./extensions:

Most extensions work, however Echo is among the few that don't.

Upon running update.php I get:

PHP Warning:  require_once(/var/www/wiki/mw-extensions/Echo-REL1_28-f55bdd9/maintenance/../../../maintenance/Maintenance.php): failed to open stream: No such file or directory in /var/www/wiki/mw-extensions/Echo-REL1_28-f55bdd9/maintenance/removeOrphanedEvents.php on line 9

PHP Fatal error:  require_once(): Failed opening required '/var/www/wiki/mw-extensions/Echo-REL1_28-f55bdd9/maintenance/../../../maintenance/Maintenance.php' (include_path='/var/www/wiki/mediawiki-1.28.0/vendor/pear/pear_exception:/var/www/wiki/mediawiki-1.28.0/vendor/pear/console_getopt:/var/www/wiki/mediawiki-1.28.0/vendor/pear/pear-core-minimal/src:/var/www/wiki/mediawiki-1.28.0/vendor/pear/mail_mime:/var/www/wiki/mediawiki-1.28.0/vendor/pear/mail_mime-decode:/var/www/wiki/mediawiki-1.28.0/vendor/pear/net_socket:/var/www/wiki/mediawiki-1.28.0/vendor/pear/net_smtp:/var/www/wiki/mediawiki-1.28.0/vendor/pear/mail:.:/usr/share/php') in /var/www/wiki/mw-extensions/Echo-REL1_28-f55bdd9/maintenance/removeOrphanedEvents.php on line 9

All files reported missing actually do exist. I think it has to do with how the extnsions constructs its own path in PHP.

Legoktm (talkcontribs)

Does /var/www/wiki/mw-extensions/Echo-REL1_28-f55bdd9/maintenance/../../../maintenance/Maintenance.php exist? I suspect you need to set the MW_INSTALL_PATH env variable:

require_once ( getenv( 'MW_INSTALL_PATH' ) !== false
	? getenv( 'MW_INSTALL_PATH' ) . '/maintenance/Maintenance.php'
	: __DIR__ . '/../../../maintenance/Maintenance.php' );
Alexandroslee (talkcontribs)

in localsetting.php ?

require_once ( getenv( 'MW_INSTALL_PATH' ) !== false ? getenv( 'MW_INSTALL_PATH' ) . '/maintenance/Maintenance.php' : __DIR__ . '/../../../maintenance/Maintenance.php' );

Reply to "Not working when symlinked"

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

2
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.

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

Alerts don't work for existing users

2
Guindelo (talkcontribs)

Hi¡

I have installed the extension in MW. 1.29, when I create a new user, alerts and welcome messages work's fine, but, the existing users before the installation don't see any alert or message,

It's normal?

Another question.... Can anyone explain me how to receive alerts in discussion pages where someone cites me ""user""?

Thanks for all.

guindelo.

Oleolsenkjhølkølk (talkcontribs)

Did anyone have a solution for this? Have the same problem, alerts dont seem to be working.

Reply to "Alerts don't work for existing users"

How to setup cross-wiki echo notifications

16
Revansx (talkcontribs)

Is there an official page describing how to setup cross-wiki echo notifications? Notes about what to Do, Not do, and be-advised about before trying.

JMatazzoni (WMF) (talkcontribs)

Hi @Revansx. Do you mean set it up for an individual or for a wiki? If for an individual, go to Preferences > Notifications. Find the section for "Cross-wiki notifications" and check the box for "Show notifications from other wikis." That should do the trick.

Revansx (talkcontribs)

Hi JMatazzoni, thanks. That's good to know. But my question was actually aimed at how Wiki admin can set it up for a set of wikis on the same server.

Any instructions or tutorials would be much appreciated. Thanks. -Rich

Revansx (talkcontribs)
JMatazzoni (WMF) (talkcontribs)

OK for an admin question, I'll call on my colleague @Sbisson (WMF), who can answer your question I'm sure. Stephane, can you point Revansx to the documentation for x-wiki notifications, please?

Revansx (talkcontribs)
Trizek (WMF) (talkcontribs)

Hey Rich

Most of people with an expertise on that field have been recently busy (European Wikimedia hackathon) or are on vacation.

AFAK, unfortunately, there is no documentation concerning cross-wiki notifications.

Revansx (talkcontribs)
Revansx (talkcontribs)

@Trizek (WMF), @JMatazzoni (WMF), Is now a better time to get some insights on setting up cross-wiki echo notifications for wikis on the same server?

Trizek (WMF) (talkcontribs)

@Revansx, you've bad luck on timing again: most of people with an expertise on that field have been recently busy (Wikimania) or are on vacation. I'll ping people with the technical skills when they will be back.

Revansx (talkcontribs)

ha. ok.. thanks.. this is merely on my wish list :-) .. but I'll keep trying periodically as the weeks go on. thanks again.

Revansx (talkcontribs)
Roan Kattouw (WMF) (talkcontribs)

One day, I will find the time to write documentation about how to set up cross-wiki notifications...

In the meantime, I suggest first getting a wiki family with shared user accounts working (either with $wgSharedDB as in the post you linked to, or with CentralAuth). Once shared logins work well, you can try to set up cross-wiki notifications by setting $wgEchoCrossWikiNotifications = true; and point $wgEchoSharedTrackingDB to a shared database. You will also need to ensure that you have caching set up in a way that is shared between these wikis (e.g. point them all to the same memcached server, or set up DB caching in a shared DB somehow; I'll have to investigate that more later when I write this documentation).

Revansx (talkcontribs)

ok. thanks! .. my site uses a SSO provider (CA Policy Agent) that creates an immutable session from which the user's username is set by the SSO as a header property and consumed by Extension:Auth_RemoteUser on each wiki. So each wiki on my server sees the exact same users. Do you see any reason why I can't use CentralAuth in this scenario?

Roan Kattouw (WMF) (talkcontribs)

Oof, that is above my pay grade, sorry :( I know a lot about the Echo side of things, but not much about the CentralAuth side of things.

Revansx (talkcontribs)

fair enough. Can you give me the name of a CentralAuth guru in WMF?

Reply to "How to setup cross-wiki echo notifications"

Notifications aren't marked for all users except first registered user

1
PlavorSeol (talkcontribs)

When I press Mark all as read, it works well. But any other user presses Mark all as read, it seems to be marked at that time, but marked as unread again when they move to another page.

Korean

제 계정으로 Mark all as read를 누르면 정상 작동하는데, 다른 사용자가 Mark all as read를 누르면 읽은 것처럼 보였다가 다른 문서로 이동하면 다시 읽지 않은 알림으로 표시됩니다.

UpsandDowns1234 (talkcontribs)

Can't there be an option to enable desktop and email notifications for Echo? Ups and Downs () 23:10, 27 February 2018 (UTC)

Tinss (talkcontribs)

That is a good idea. Maybe you could suggest it on phabricator?

UpsandDowns1234 (talkcontribs)

Sure. Let me do that as soon as possible.  :-) Ups and Downs () 03:12, 8 July 2018 (UTC)

Reply to "Desktop notification"

Little help for Cross wiki setup

7
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)
Reply to "Little help for Cross wiki setup"
Return to "Echo" page.