Topic on Extension talk:Echo

Jump to navigation Jump to search

Problems Setting up Echo on my MediaWiki

10
Summary by KHarlan (WMF)

There is a phab task for this problem, and also a patch (just uploaded). Let's continue the discussion on that phab task. Thanks!

MasterBanri (talkcontribs)

I followed the installation step by step but when i load the wfLoadExtension( 'Echo' ); then when i load my wiki page, i get the following. I did run the update script through the web option. But it didnt do anything, can i get any help?

MediaWiki internal error.

Original exception: [XjeZihQ@PlaIURwVhWHuVAAAANc] /Special:Version Wikimedia\Rdbms\DBQueryError from line 1587 of /var/www/vhosts/geministation.com/wiki.geministation.com/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 COUNT(*) AS `rowcount` FROM (SELECT 1 FROM `wikiecho_notification` LEFT JOIN `wikiecho_event` ON ((notification_event=event_id)) WHERE notification_user = '4' AND notification_read_timestamp IS NULL AND event_deleted = '0' AND event_type IN ('edit-user-talk','reverted','mention','mention-summary','mention-failure','mention-failure-too-many','mention-success','user-rights','emailuser','foreign') LIMIT 100 ) `tmp_count`

Function: EchoUserNotificationGateway::getCappedNotificationCount

Error: 1146 Table 'gemwiki.wikiecho_notification' doesn't exist (localhost)


Backtrace:

#0 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/libs/rdbms/database/Database.php(1556): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)

#1 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/libs/rdbms/database/Database.php(1274): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)

#2 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/libs/rdbms/database/Database.php(1784): Wikimedia\Rdbms\Database->query(string, string)

#3 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/libs/rdbms/database/Database.php(1929): Wikimedia\Rdbms\Database->select(array, array, array, string)

#4 /var/www/vhosts/geministation.com/wiki.geministation.com/extensions/Echo/includes/gateway/UserNotificationGateway.php(171): Wikimedia\Rdbms\Database->selectRowCount(array, string, array, string, array, array)

#5 /var/www/vhosts/geministation.com/wiki.geministation.com/extensions/Echo/includes/NotifUser.php(543): EchoUserNotificationGateway->getCappedNotificationCount(integer, array, integer)

#6 /var/www/vhosts/geministation.com/wiki.geministation.com/extensions/Echo/includes/NotifUser.php(502): MWEchoNotifUser->computeLocalCountsAndTimestamps()

#7 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/libs/objectcache/WANObjectCache.php(1414): MWEchoNotifUser->{closure}(boolean, integer, array, NULL)

#8 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/libs/objectcache/WANObjectCache.php(1275): WANObjectCache->doGetWithSetCallback(string, integer, Closure, array)

#9 /var/www/vhosts/geministation.com/wiki.geministation.com/extensions/Echo/includes/NotifUser.php(503): WANObjectCache->getWithSetCallback(string, integer, Closure)

#10 /var/www/vhosts/geministation.com/wiki.geministation.com/extensions/Echo/includes/NotifUser.php(182): MWEchoNotifUser->getCountsAndTimestamps(boolean)

#11 /var/www/vhosts/geministation.com/wiki.geministation.com/extensions/Echo/includes/NotifUser.php(134): MWEchoNotifUser->getNotificationCount(string)

#12 /var/www/vhosts/geministation.com/wiki.geministation.com/extensions/Echo/includes/EchoHooks.php(966): MWEchoNotifUser->getMessageCount()

#13 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/Hooks.php(174): EchoHooks::onPersonalUrls(array, Title, SkinVector)

#14 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/Hooks.php(234): Hooks::callHook(string, array, array, NULL, string)

#15 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/skins/SkinTemplate.php(762): Hooks::runWithoutAbort(string, array)

#16 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/skins/SkinTemplate.php(463): SkinTemplate->buildPersonalUrls()

#17 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/skins/SkinTemplate.php(228): SkinTemplate->prepareQuickTemplate()

#18 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/OutputPage.php(2723): SkinTemplate->outputPage()

#19 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/MediaWiki.php(872): OutputPage->output(boolean)

#20 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/MediaWiki.php(884): MediaWiki->{closure}()

#21 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/MediaWiki.php(515): MediaWiki->main()

#22 /var/www/vhosts/geministation.com/wiki.geministation.com/index.php(42): MediaWiki->run()

#23 {main}

Exception caught inside exception handler: [XjeZihQ@PlaIURwVhWHuVAAAANc] /Special:Version Wikimedia\Rdbms\DBQueryError from line 1587 of /var/www/vhosts/geministation.com/wiki.geministation.com/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 COUNT(*) AS `rowcount` FROM (SELECT 1 FROM `wikiecho_notification` LEFT JOIN `wikiecho_event` ON ((notification_event=event_id)) WHERE notification_user = '4' AND notification_read_timestamp IS NULL AND event_deleted = '0' AND event_type IN ('edit-user-talk','reverted','mention','mention-summary','mention-failure','mention-failure-too-many','mention-success','user-rights','emailuser','foreign') LIMIT 100 ) `tmp_count`

Function: EchoUserNotificationGateway::getCappedNotificationCount

Error: 1146 Table 'gemwiki.wikiecho_notification' doesn't exist (localhost)

KHarlan (WMF) (talkcontribs)

What configuration values do you have in place related to Echo?

Do you have multiple wikis (and databases) served from this one document root?

It certainly looks like update.php didn’t run. KHarlan (WMF) (talk) 08:18, 3 February 2020 (UTC)

MasterBanri (talkcontribs)

I only have 1 wiki and wont need multiple.

I dont have any config values, just the loading code: wfLoadExtension( 'Echo' );

Is that the issue?

I ran the web updater but yeah...

MasterBanri (talkcontribs)

I guess this thread isnt active enough to provide help.

KHarlan (WMF) (talkcontribs)

@MasterBanri it looks like update.php didn't run. Can you try via the command-line, if you have access?

MasterBanri (talkcontribs)

MediaWiki internal error.

Original exception: [XjsztnVLTtZUulTtYuz-1AAAAQs] /Main_Page Wikimedia\Rdbms\DBQueryError from line 1587 of /var/www/vhosts/geministation.com/wiki.geministation.com/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 event_id,event_type,event_variant,event_agent_id,event_agent_ip,event_extra,event_page_id,event_deleted,notification_timestamp FROM `wikiecho_event` INNER JOIN `wikiecho_notification` ON ((notification_event=event_id)) INNER JOIN `wikiecho_target_page` ON ((etp_event=event_id)) WHERE event_deleted = '0' AND notification_user = '3' AND notification_read_timestamp IS NULL AND etp_page = '1'

Function: EchoEventMapper::fetchUnreadByUserAndPage

Error: 1146 Table 'gemwiki.wikiecho_event' doesn't exist (localhost)

Backtrace:

#0 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/libs/rdbms/database/Database.php(1556): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)

#1 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/libs/rdbms/database/Database.php(1274): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)

#2 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/libs/rdbms/database/Database.php(1784): Wikimedia\Rdbms\Database->query(string, string)

#3 /var/www/vhosts/geministation.com/wiki.geministation.com/extensions/Echo/includes/mapper/EventMapper.php(151): Wikimedia\Rdbms\Database->select(array, array, array, string, NULL, array)

#4 /var/www/vhosts/geministation.com/wiki.geministation.com/extensions/Echo/includes/EchoHooks.php(885): EchoEventMapper->fetchUnreadByUserAndPage(User, integer)

#5 /var/www/vhosts/geministation.com/wiki.geministation.com/extensions/Echo/includes/EchoHooks.php(962): EchoHooks::processMarkAsRead(User, WebRequest, Title)

#6 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/Hooks.php(174): EchoHooks::onPersonalUrls(array, Title, SkinVector)

#7 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/Hooks.php(234): Hooks::callHook(string, array, array, NULL, string)

#8 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/skins/SkinTemplate.php(762): Hooks::runWithoutAbort(string, array)

#9 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/skins/SkinTemplate.php(463): SkinTemplate->buildPersonalUrls()

#10 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/skins/SkinTemplate.php(228): SkinTemplate->prepareQuickTemplate()

#11 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/OutputPage.php(2723): SkinTemplate->outputPage()

#12 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/MediaWiki.php(872): OutputPage->output(boolean)

#13 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/MediaWiki.php(884): MediaWiki->{closure}()

#14 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/MediaWiki.php(515): MediaWiki->main()

#15 /var/www/vhosts/geministation.com/wiki.geministation.com/index.php(42): MediaWiki->run()

#16 {main}

Exception caught inside exception handler: [XjsztnVLTtZUulTtYuz-1AAAAQs] /Main_Page Wikimedia\Rdbms\DBQueryError from line 1587 of /var/www/vhosts/geministation.com/wiki.geministation.com/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 event_id,event_type,event_variant,event_agent_id,event_agent_ip,event_extra,event_page_id,event_deleted,notification_timestamp FROM `wikiecho_event` INNER JOIN `wikiecho_notification` ON ((notification_event=event_id)) INNER JOIN `wikiecho_target_page` ON ((etp_event=event_id)) WHERE event_deleted = '0' AND notification_user = '3' AND notification_read_timestamp IS NULL AND etp_page = '1'

Function: EchoEventMapper::fetchUnreadByUserAndPage

Error: 1146 Table 'gemwiki.wikiecho_event' doesn't exist (localhost)

Backtrace:

#0 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/libs/rdbms/database/Database.php(1556): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)

#1 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/libs/rdbms/database/Database.php(1274): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)

#2 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/libs/rdbms/database/Database.php(1784): Wikimedia\Rdbms\Database->query(string, string)

#3 /var/www/vhosts/geministation.com/wiki.geministation.com/extensions/Echo/includes/mapper/EventMapper.php(151): Wikimedia\Rdbms\Database->select(array, array, array, string, NULL, array)

#4 /var/www/vhosts/geministation.com/wiki.geministation.com/extensions/Echo/includes/EchoHooks.php(885): EchoEventMapper->fetchUnreadByUserAndPage(User, integer)

#5 /var/www/vhosts/geministation.com/wiki.geministation.com/extensions/Echo/includes/EchoHooks.php(962): EchoHooks::processMarkAsRead(User, WebRequest, Title)

#6 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/Hooks.php(174): EchoHooks::onPersonalUrls(array, Title, SkinVector)

#7 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/Hooks.php(234): Hooks::callHook(string, array, array, NULL, string)

#8 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/skins/SkinTemplate.php(762): Hooks::runWithoutAbort(string, array)

#9 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/skins/SkinTemplate.php(463): SkinTemplate->buildPersonalUrls()

#10 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/skins/SkinTemplate.php(228): SkinTemplate->prepareQuickTemplate()

#11 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/OutputPage.php(2723): SkinTemplate->outputPage()

#12 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/exception/MWExceptionRenderer.php(134): OutputPage->output()

#13 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/exception/MWExceptionRenderer.php(53): MWExceptionRenderer::reportHTML(Wikimedia\Rdbms\DBQueryError)

#14 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/exception/MWExceptionHandler.php(98): MWExceptionRenderer::output(Wikimedia\Rdbms\DBQueryError, integer)

#15 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/exception/MWExceptionHandler.php(172): MWExceptionHandler::report(Wikimedia\Rdbms\DBQueryError)

#16 /var/www/vhosts/geministation.com/wiki.geministation.com/includes/MediaWiki.php(542): MWExceptionHandler::handleException(Wikimedia\Rdbms\DBQueryError)

#17 /var/www/vhosts/geministation.com/wiki.geministation.com/index.php(42): MediaWiki->run()

#18 {main}

Lostraven (talkcontribs)

I'm having a similar problem. Apparently multiple people over the years have had similar issues. Yes, I ran the updater.


MediaWiki internal error.

Original exception: [Xjyg-XCz3wOr8mEEXQNjgwAAAAk] 2020-02-06 23:27:57: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"

Exception caught inside exception handler.

Lostraven (talkcontribs)

Apparently this problem has been happening for more than four years! I wish I could understand why this isn't yet resolved in all that time. Yes, the web updater isn't creating the tables. Yes, I'm on a hosted solution. No, I have no clue how to do this: "So I went to phpMyAdmin and imported the echo.sql to create the new tables." I'm going to try the trick mentioned by AhmadF.Cheema here:


UPDATE: Ahmad's method seems to have worked for me.

Step 1. Add this to the bottom of your LocalSettings.php:

# Schema updates for update.php
$wgHooks['LoadExtensionSchemaUpdates'][] = 'fnMyHook';
function fnMyHook( DatabaseUpdater $updater ) {
$updater->addExtensionTable( 'echo_target_page',
__DIR__ . '/echo.sql' );
return true;
}

Step 2. Go to Extensions/Echo and copy echo.sql to both the base directory (where LocalSettings.php resides) and to the Maintenance folder. (Ahmad wasn't sure which folder it pulls from.)


Step 3. Run the web updater again. Walla! The tables are created. Presumably I can then remove the added material from Step 1 and 2.

Lustiger seth (talkcontribs)

thanks!
i installed a mediawiki 1.31 LTS today and had a similar problem with the Echo extension (1_31 branch).

update.php did not work, but printed (and still prints) error messages all the time, such as:

 Wikimedia\Rdbms\DBConnectionError from line 1004 of .../includes/libs/rdbms/database/Database.php: Cannot access the database: No such file or directory (localhost)

your solution solved my problem, too! Echo works fine now. :-)

Iamchenzetian (talkcontribs)

it works by the method above


Thanks!

Reply to "Problems Setting up Echo on my MediaWiki"