Topic on Extension talk:TimedMediaHandler

[481534518f1aa907bf368137] /wikiwiki/index.php/Especial:TimedMediaHandler Wikimedia\Rdbms\DBQueryError from line 1457 of C:\xampp\htdocs\wikiwiki\includes

6
Summary by Jdforrester (WMF)

Needed to run the SQL manipulation files manually

181.55.114.245 (talkcontribs)

Hello to everyone, I am testing a wiki and installing several extensions, but I have a problem with TimedMediaHandler. I've updated the installation as say Manual:Update.php but the table transcode doesn't create it... How do i resolve it? Thanks

[481534518f1aa907bf368137] /wikiwiki/index.php/Especial:TimedMediaHandler Wikimedia\Rdbms\DBQueryError from line 1457 of C:\xampp\htdocs\wikiwiki\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 count,transcode_key FROM `transcode` WHERE transcode_key IN ('160p.webm','240p.webm','360p.webm','480p.webm','720p.webm','1080p.webm','mp3','ogg') AND (transcode_time_startwork IS NOT NULL AND transcode_time_success IS NULL AND transcode_time_error IS NULL) GROUP BY transcode_key

Function: SpecialTimedMediaHandler::getStates

Error: 1146 Table 'wikiwiki.transcode' doesn't exist (localhost)

Backtrace:

#0 C:\xampp\htdocs\wikiwiki\includes\libs\rdbms\database\Database.php(1427): Wikimedia\Rdbms\Database->makeQueryException(string, integer, string, string)

#1 C:\xampp\htdocs\wikiwiki\includes\libs\rdbms\database\Database.php(1200): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)

#2 C:\xampp\htdocs\wikiwiki\includes\libs\rdbms\database\Database.php(1653): Wikimedia\Rdbms\Database->query(string, string)

#3 C:\xampp\htdocs\wikiwiki\extensions\TimedMediaHandler\SpecialTimedMediaHandler.php(212): Wikimedia\Rdbms\Database->select(string, array, array, string, array)

#4 C:\xampp\htdocs\wikiwiki\extensions\TimedMediaHandler\SpecialTimedMediaHandler.php(62): SpecialTimedMediaHandler->getStates()

#5 C:\xampp\htdocs\wikiwiki\includes\specialpage\SpecialPage.php(522): SpecialTimedMediaHandler->execute(NULL)

#6 C:\xampp\htdocs\wikiwiki\includes\specialpage\SpecialPageFactory.php(568): SpecialPage->run(NULL)

#7 C:\xampp\htdocs\wikiwiki\includes\MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext)

#8 C:\xampp\htdocs\wikiwiki\includes\MediaWiki.php(861): MediaWiki->performRequest()

#9 C:\xampp\htdocs\wikiwiki\includes\MediaWiki.php(524): MediaWiki->main()

#10 C:\xampp\htdocs\wikiwiki\index.php(42): MediaWiki->run()

#11 {main}

Jdforrester (WMF) (talkcontribs)

Are you running on a postgres DB? TMH has only ever supported mysql (though I think PG is probably supportable now we have the infrastructure for it). You could try running the database creation file directly and seeing if that works? Sorry!

186.116.10.62 (talkcontribs)

No, I'm running on MySQL. But I've created the table directly and It worked :D

Thank you :*

186.116.10.62 (talkcontribs)

Excuse me, do you have the sql from the tables of OAuth extension?, I have the same problem :(

Jdforrester (WMF) (talkcontribs)

Yup! In general, you can go from the repo to the extension registration file (in this case, as almost always, extension.json), find the LoadExtensionSchemaUpdates hook registration, determine the relevant hooks file (in this case, MWOAuthUpdater.hooks.php), and find there where the SQL files are stored and in what circumstances they are used.

For that extension's case, addExtensionTable is only called once, to create the oauth_registered_consumer table, using OAuth.sql; there's a version for MySQL/MariaDB and another for sqlite.

You can also see that the table has been updated three times over the years, to add the oarc_callback_is_prefix, oarc_developer_agreement, and oarc_owner_only columns, but they are all already part of the main SQL file so you shouldn't need to do anything extra.

Hope this helps!

181.55.114.245 (talkcontribs)

Thank you very much!