Topic on Project:Support desk

Jump to navigation Jump to search

Installing Extension:Echo has messed up something

31
Dodger67 (talkcontribs)

I followed the instructions for installing Extension:Echo to the letter but after the last step - running the "Update script" - I get this long detailed error message that I don't understand:

Original exception: [ae2d7c99] /wiki/index.php?title=Main_Page DBQueryError from line 1119 of /home/krdspmen/public_html/wiki/includes/db/Database.php: A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script Query: SELECT etp_user,etp_page,etp_event FROM `mwsz_echo_target_page` WHERE etp_user = '2' AND etp_page = '1' Function: EchoTargetPageMapper::fetchByUserPageId Error: 1146 Table 'krdspmen_mw269.mwsz_echo_target_page' doesn't exist (localhost)

Backtrace:

  1. 0 /home/krdspmen/public_html/wiki/includes/db/Database.php(1076): DatabaseBase->reportQueryError(string, integer, string, string, boolean)
  2. 1 /home/krdspmen/public_html/wiki/includes/db/Database.php(1600): DatabaseBase->query(string, string)
  3. 2 /home/krdspmen/public_html/wiki/extensions/Echo/includes/mapper/TargetPageMapper.php(38): DatabaseBase->select(array, array, array, string)
  4. 3 /home/krdspmen/public_html/wiki/extensions/Echo/Hooks.php(643): EchoTargetPageMapper->fetchByUserPageId(User, integer)
  5. 4 [internal function]: EchoHooks::onPersonalUrls(array, Title, SkinVector)
  6. 5 /home/krdspmen/public_html/wiki/includes/Hooks.php(204): call_user_func_array(string, array)
  7. 6 /home/krdspmen/public_html/wiki/includes/skins/SkinTemplate.php(688): Hooks::run(string, array)
  8. 7 /home/krdspmen/public_html/wiki/includes/skins/SkinTemplate.php(455): SkinTemplate->buildPersonalUrls()
  9. 8 /home/krdspmen/public_html/wiki/includes/skins/SkinTemplate.php(240): SkinTemplate->prepareQuickTemplate(OutputPage)
  10. 9 /home/krdspmen/public_html/wiki/includes/OutputPage.php(2314): SkinTemplate->outputPage()
  11. 10 /home/krdspmen/public_html/wiki/includes/MediaWiki.php(690): OutputPage->output()
  12. 11 /home/krdspmen/public_html/wiki/includes/MediaWiki.php(476): MediaWiki->main()
  13. 12 /home/krdspmen/public_html/wiki/index.php(41): MediaWiki->run()
  14. 13 {main}

Exception caught inside exception handler: [8da5ecb9] /wiki/index.php?title=Main_Page DBQueryError from line 1119 of /home/krdspmen/public_html/wiki/includes/db/Database.php: A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script Query: SELECT etp_user,etp_page,etp_event FROM `mwsz_echo_target_page` WHERE etp_user = '2' AND etp_page = '1' Function: EchoTargetPageMapper::fetchByUserPageId Error: 1146 Table 'krdspmen_mw269.mwsz_echo_target_page' doesn't exist (localhost)

Backtrace:

  1. 0 /home/krdspmen/public_html/wiki/includes/db/Database.php(1076): DatabaseBase->reportQueryError(string, integer, string, string, boolean)
  2. 1 /home/krdspmen/public_html/wiki/includes/db/Database.php(1600): DatabaseBase->query(string, string)
  3. 2 /home/krdspmen/public_html/wiki/extensions/Echo/includes/mapper/TargetPageMapper.php(38): DatabaseBase->select(array, array, array, string)
  4. 3 /home/krdspmen/public_html/wiki/extensions/Echo/Hooks.php(643): EchoTargetPageMapper->fetchByUserPageId(User, integer)
  5. 4 [internal function]: EchoHooks::onPersonalUrls(array, Title, SkinVector)
  6. 5 /home/krdspmen/public_html/wiki/includes/Hooks.php(204): call_user_func_array(string, array)
  7. 6 /home/krdspmen/public_html/wiki/includes/skins/SkinTemplate.php(688): Hooks::run(string, array)
  8. 7 /home/krdspmen/public_html/wiki/includes/skins/SkinTemplate.php(455): SkinTemplate->buildPersonalUrls()
  9. 8 /home/krdspmen/public_html/wiki/includes/skins/SkinTemplate.php(240): SkinTemplate->prepareQuickTemplate(OutputPage)
  10. 9 /home/krdspmen/public_html/wiki/includes/OutputPage.php(2314): SkinTemplate->outputPage()
  11. 10 /home/krdspmen/public_html/wiki/includes/exception/MWException.php(204): OutputPage->output()
  12. 11 /home/krdspmen/public_html/wiki/includes/exception/MWException.php(244): MWException->reportHTML()
  13. 12 /home/krdspmen/public_html/wiki/includes/exception/MWExceptionHandler.php(69): MWException->report()
  14. 13 /home/krdspmen/public_html/wiki/includes/exception/MWExceptionHandler.php(180): MWExceptionHandler::report(DBQueryError)
  15. 14 /home/krdspmen/public_html/wiki/includes/MediaWiki.php(485): MWExceptionHandler::handleException(DBQueryError)
  16. 15 /home/krdspmen/public_html/wiki/index.php(41): MediaWiki->run()
  17. 16 {main}

I'm a total newbie at PHP so please assume I know nothing - I need "paint by numbers" help.

Dodger67 (talkcontribs)

Someone, please help.

The prospective users are getting impatient.

NH35 (talkcontribs)

Chane name of the echo tables. For example `echo_event` TO "wikiecho_event"

"wiki" is my prefix.

88.130.123.156 (talkcontribs)

You should call update.php, but you obviously are calling /wiki/index.php?title=Main_Page, meaning your main page.

Correct would be to run update.php from the shell, just like you are doing when you do a MediaWiki update:

cd wiki/maintenance
php update.php

The update script should then add the necessary tables to the database.

Ciencia Al Poder (talkcontribs)
Dodger67 (talkcontribs)

I've run the update multiple times - the exact same error occurs - in fact I think it is actually the update that causes the error.

As the wiki contains no user generated content yet I could simply re-install everything from scratch. But I have no assurance that the current version of Extension:Echo is actually compatible with 1.26.0. Everything was working correctly until I added Echo.

The wiki I'm building really does need a functional way to "ping" users - is Echo the only way to do it? Most of my users are total newbies to a wiki and would have a hard time keeping up with watchlists, at least until they become more proficient.

Dodger67 (talkcontribs)

Pinging this topic - it seems to be falling off the back

88.130.121.191 (talkcontribs)

You are right, the error is caused by the update of extension Echo:

A database error has occurred. 
Query: SELECT etp_user,etp_page,etp_event FROM `mwsz_echo_target_page` WHERE etp_user = '2' AND etp_page = '1' Function: EchoTargetPageMapper::fetchByUserPageId
Error: 1146 Table 'krdspmen_mw269.mwsz_echo_target_page' doesn't exist (localhost)

The update obviously did not add the table mwsz_echo_target_page. I suspect that not only this one table has not been added, but that basically none of the database changes of extension Echo have been done.

Dodger67 (talkcontribs)

Thanks for the confirmation. Does this mean Echo is simply not compatible with 1.26.0 or is there a way to make it work?

88.130.121.191 (talkcontribs)

I think there definitely will be a way to make it work. However, I do not know, how exactly the extension is supposed to add its SQL to the update.php script, so that this script recognizes it.

It looks to me like the file Extension/echo.sql contains the structure of the tables, which the extension needs. So it might be a workaround to manually run the commands from that file inside your wiki database. Note that I have not tested this.

This post was hidden by Ciencia Al Poder (history)
163.116.6.92 (talkcontribs)

I have the same problem after installation of Echo Extension, version stable 1.26.

NH35 (talkcontribs)

Also the same problem...

87.123.18.176 (talkcontribs)

Have you tried the hints by 88.130.121.191?

You should manually add the tables/columns of extension Echo to the database. In order to do that, take the SQL commands from the file Extension/echo.sql, prefix the table names with your table prefix (if you are using one) and run them in your wiki database to add the missing tables/columns.

Afterwards, you should no longer get the error "1146 Table 'echo_target_page' doesn't exist".

AhmadF.Cheema (talkcontribs)

Limited Solution:

Used the method documented here: Manual:Hooks/LoadExtensionSchemaUpdates, for adding "a new table".

Modified the following example:

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

Changed:

  • "tablename" - "echo_target_page" (the missing table from the error)
  • "table.sql" - "echo.sql"

Result:

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

Added these lines to the end of LocalSettings.php.

Was unsure whether "__DIR__" stood for the LocalSettings.php directiry or the "maintenance/update.php" directory, so I copied "echo.sql" file from the extension directory, into both these directories. Not sure which one did the trick.

After this I updated the MediaWiki installation, for which I used the "Web browser" method (because I don't have SSH access on my hosting server). This gave the following results in the "Upgrade existing installation" browser MediaWiki interface.

...spoofuser table already exists.
Creating echo_target_page table ...done.
...site_stats is populated...done.
Purging caches...done.

The WikiSdid not break like before after this and the Echo icons in the user toolbar also became visible. So, I imagine this method worked.

Testing:

On testing the extension, by creating a test account, I was unable to see notifications for watch pages and some other edits too. The only time the notifications worked was, when the user talk page was edited.

It appears that at this moment most of the features of this extension are not working, using this method.

Maybe, the other extension database tables are also not being automatically created.

Update: Just checked the other three tables from echo.sql using the same method, they were apparently automatically created like they should have been.

AhmadF.Cheema (talkcontribs)

Update:

Apparently, I made a mistake. While I was testing, I overwrote the master release of the extension onto the stable release (which I was testing before). I deleted the extension folder "Echo" completely and re-uploaded the stable release.

Notifications appear to be working now, aside from the "Mention" i.e. "Notify me when someone links to my user page" but maybe I'm testing this one wrong.

Steveengelhardt (talkcontribs)

Okay.. so this thread is like a year old and I'm getting this error now. Has this not been resolved yet? I'm following the instructions to run the update through the browser. Something i can handle. But adding adding the code in localsettings is breaking my site because the update seems like it takes you through this process, but obviously is not updating the files. I don't understand these instructions on how to update it the other way or adding tables manually and what have you. I have tried installing a couple other extensions that require this third step of running this update script and i get the same effect. My hosting is thru Siteground if maybe that has something to do with it But i feel like i'm just missing something somehow. I follow the directions : Navigate your webbrowser to /mw-config/. For example, if your wiki is at http://example.org/w/index.php, then navigate to http://example.org/w/mw-config/. I feed it the upgrade key and run thru everything. Seems like it worked visually, but has not actually updated any files aparently.

I don't understand how to run the update from the command line. Can i even get to a command line if i have hosting on siteground? I've never used it.

I'm also trying to make my wiki multilingual and running into the same wall as it requires this update step. I'm having no problem installing extensions that just require (1) to ftp the files up and (2) to add a line to the localsettings file. But all the ones that require this 3rd step of running the update crash my site

S3r3nd1 (talkcontribs)
AhmadF.Cheema (talkcontribs)

For running the update.php script, take a look at this: https://www.siteground.com/tutorials/ssh/

See if you can understand the tutorials. Additionally, you can probably ask customer support at Siteground for help with SSH too.

Steveengelhardt (talkcontribs)

After some fumbling around, I Figured out how to use putty and then actually remembered how to move directories and shit on the terminal to get to the maintenance folder to run the update script :) Happy day! Thanks. They should remove the one about updating it thru the browser, Doesn't fkn work. Thanks again! Now to figure out this node.js bit to get the visual editor... http://FlatEarthWiki.com

Bruceillest (talkcontribs)

Im running Windows server 2012R2

Product Version
MediaWiki 1.32.0
PHP 7.2.7 (cgi-fcgi)
MySQL 8.0.15
ICU 61.1

So I'm not sure why this worked but it did. I cleared out my wincache using the following script I created awhile back ago from someone else recommended for a different issue on a different extension.

<?php

wincache_ucache_set('green', 1);

wincache_ucache_set('red', 2);

wincache_ucache_set('orange', 4);

wincache_ucache_set('blue', 8);

wincache_ucache_set('cyan', 16);

$array1 = array('green', 'red', 'orange', 'blue', 'cyan');

var_dump(wincache_ucache_get($array1));

var_dump(wincache_ucache_clear());

var_dump(wincache_ucache_get($array1));

?>

I named the file wincache_ucache_clear.php and saved it to my site folder then I opened command prompt as admin and ran cd C:\inetpub\wwwroot\"YourWIKISite" then php wincache_ucache_clear.php I then ran php update.php from the maintenance directory and viola. In the stream I was able to see that it added all echo tables. Hope this helps.

AhmadF.Cheema (talkcontribs)

Did you run update.php before running wincache_ucache_clear.php? Far as I know, the issue of tables not getting automatically created was fixed and users should no longer have to go through any such hacks.

Steveengelhardt (talkcontribs)

It's still a problem. I just ran into it again very recently. It only exists when you run update.php thru the web. I didn't have access to the command line this time so i found Importing the echo.sql to database with phpMyAdmin and then adding my prefixes to the tables worked. ~ParamotorWiki.com

Bruceillest (talkcontribs)

Yes I ran update.php before running wincache_ucache_clear.php and I got the following

[fatal] [7348d6842ad5793ac217096e] update.php   PHP Fatal Error from line 5 of C:\inetpub\wwwroot\CAS\extensions\Flow\includes\Container.php: Class 'Pimple\Container' not found

After clearing cache it worked just fine.

Falcopragati (talkcontribs)

I am having the same error ,please assist me.

and please tell guide me how & where to run 'update.php' ..?

I am a total newbie at this..

This is the error-->

) Fatal error: Class 'Pimple\Container' not found in C:\wamp64\www\wiki\extensions\Flow\includes\Container.php on line 5

AhmadF.Cheema (talkcontribs)

You're facing a completely different issue.

For your error, make sure that the Extension:StructuredDiscussions version corresponds to your MediaWiki version.

Falcopragati (talkcontribs)

Thanks Ahmad

I have uninstalled my current version of Extension:StructuredDiscussions & am looking for the compatible version.

Can you please send me a link from where I can download the Extension:StructuredDiscussions for MediaWiki version- 1.32.2 ?

AhmadF.Cheema (talkcontribs)
Falcopragati (talkcontribs)

Yes, the distributor is bugged :( .

I tried the link you sent me and it was compatible with my MediaWiki version, 'Flow' extension appears on the 'Special:version' page too ...in the 'Installed extensions' sections.

But still, it does not runs and this error now appears again-->

Fatal error: Class 'Pimple\Container' not found in C:\wamp64\www\wiki\extensions\Flow\includes\Container.php on line 5


turns out this was the version of extension I deleted before.....

still..Thanks buddy !

This post was hidden by Falcopragati (history)
Falcopragati (talkcontribs)

This error is now resolved by downloading the 'composer'