Topic on Extension talk:Echo

Little help for Cross wiki setup

14
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?

Deletedaccount4567435 (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

KHarlan (WMF) (talkcontribs)

@Spas.Z.Spasov @Revansx I was running into this issue today when trying to set up my local environment. There is code in ForeignWikiRequest.php which requires CentralAuth in order to obtain the details of the cross-wiki notice. I'll see if it's possible to have a workaround for the SharedDB approach.


As an aside, you are probably affected by the discussion in task T243276 with regards to shared tables.

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"