Topic on Project:Support desk/Flow

Updating problems from 1.38.6 to 1.39.3

9
Fokebox (talkcontribs)

Hi,

My 1.38.6 wiki website has following settings:

MediaWiki 1.38.6
PHP 8.0.28 (cgi-fcgi)
MySQL 5.7.34
ICU 57.1
Pygments 2.2.0
Lua 5.1.5

I have tried to update from 1.38.6 to 1.39.3 and after launching update script I have following error:

[da4be340e3d9f5d22d8537fc] / Wikimedia\Rdbms\DBQueryError: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading or after adding a new extension?

Please see https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Upgrading and https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:How_to_debug for more information.

Error 1146: Table 'wikijournal_org.ru__revision_actor_temp' doesn't exist (127.0.0.1)

Function: MessageCache::loadFromDB(ru)-small

Query: SELECT /*! STRAIGHT_JOIN */ rev_id,rev_page,rev_timestamp,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,comment_rev_comment.comment_text AS `rev_comment_text`,comment_rev_comment.comment_data AS `rev_comment_data`,comment_rev_comment.comment_id AS `rev_comment_cid`,actor_rev_user.actor_user AS `rev_user`,actor_rev_user.actor_name AS `rev_user_text`,temp_rev_user.revactor_actor AS `rev_actor`,page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len FROM `ru__page` JOIN `ru__revision` ON ((page_id = rev_page)) JOIN `ru__revision_comment_temp` `temp_rev_comment` ON ((temp_rev_comment.revcomment_rev = rev_id)) JOIN `ru__comment` `comment_rev_comment` ON ((comment_rev_comment.comment_id = temp_rev_comment.revcomment_comment_id)) JOIN `ru__revision_actor_temp` `temp_rev_user` ON ((temp_rev_user.revactor_rev = rev_id)) JOIN `wikijournal_org`.`ru__actor` `actor_rev_user` ON ((actor_rev_user.actor_id = temp_rev_user.revactor_actor)) WHERE page_is_redirect = 0 AND page_namespace = 8 AND (page_title NOT LIKE '%/%' ESCAPE '`' ) AND (page_len <= 10000) AND (page_latest = rev_id)

Backtrace:

from /var/www/admin/www/mediawiki-1.38.6/includes/libs/rdbms/database/Database.php(1606)

#0 /var/www/admin/www/mediawiki-1.38.6/includes/libs/rdbms/database/Database.php(1590): Wikimedia\Rdbms\Database->getQueryException(string, integer, string, string)

#1 /var/www/admin/www/mediawiki-1.38.6/includes/libs/rdbms/database/Database.php(1564): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)

#2 /var/www/admin/www/mediawiki-1.38.6/includes/libs/rdbms/database/Database.php(1173): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)

#3 /var/www/admin/www/mediawiki-1.38.6/includes/libs/rdbms/database/Database.php(1813): Wikimedia\Rdbms\Database->query(string, string, integer)

#4 /var/www/admin/www/mediawiki-1.38.6/includes/libs/rdbms/database/DBConnRef.php(69): Wikimedia\Rdbms\Database->select(array, array, array, string, array, array)

#5 /var/www/admin/www/mediawiki-1.38.6/includes/libs/rdbms/database/DBConnRef.php(320): Wikimedia\Rdbms\DBConnRef->__call(string, array)

#6 /var/www/admin/www/mediawiki-1.38.6/includes/cache/MessageCache.php(569): Wikimedia\Rdbms\DBConnRef->select(array, array, array, string, array, array)

#7 /var/www/admin/www/mediawiki-1.38.6/includes/cache/MessageCache.php(447): MessageCache->loadFromDB(string, NULL)

#8 /var/www/admin/www/mediawiki-1.38.6/includes/cache/MessageCache.php(370): MessageCache->loadFromDBWithLock(string, array, NULL)

#9 /var/www/admin/www/mediawiki-1.38.6/includes/cache/MessageCache.php(1112): MessageCache->load(string)

#10 /var/www/admin/www/mediawiki-1.38.6/includes/cache/MessageCache.php(1040): MessageCache->getMsgFromNamespace(string, string)

#11 /var/www/admin/www/mediawiki-1.38.6/includes/cache/MessageCache.php(1011): MessageCache->getMessageForLang(Language, string, boolean, array)

#12 /var/www/admin/www/mediawiki-1.38.6/includes/cache/MessageCache.php(953): MessageCache->getMessageFromFallbackChain(Language, string, boolean)

#13 /var/www/admin/www/mediawiki-1.38.6/includes/language/Message.php(1491): MessageCache->get(string, boolean, Language)

#14 /var/www/admin/www/mediawiki-1.38.6/includes/language/Message.php(968): Message->fetchMessage()

#15 /var/www/admin/www/mediawiki-1.38.6/includes/language/Message.php(1071): Message->format(string)

#16 /var/www/admin/www/mediawiki-1.38.6/includes/Title.php(715): Message->text()

#17 /var/www/admin/www/mediawiki-1.38.6/includes/MediaWiki.php(142): Title::newMainPage()

#18 /var/www/admin/www/mediawiki-1.38.6/includes/MediaWiki.php(162): MediaWiki->parseTitle()

#19 /var/www/admin/www/mediawiki-1.38.6/includes/MediaWiki.php(870): MediaWiki->getTitle()

#20 /var/www/admin/www/mediawiki-1.38.6/includes/MediaWiki.php(563): MediaWiki->main()

#21 /var/www/admin/www/mediawiki-1.38.6/index.php(53): MediaWiki->run()

#22 /var/www/admin/www/mediawiki-1.38.6/index.php(46): wfIndexMain()

#23 {main}

Could you please help me with this, what shall I do to fix the problem?

Tinss (talkcontribs)

Can you try upgrading to lesser version (say 1.39.1) and then upgrading to 1.39.3 from there ?

Fokebox (talkcontribs)

This way seems to be working, except couple of things.

1) I have several localizations using shared Database and files of the website. (en.mywikiste.org, ru.mywikisite, en.mywikiste ect.), so first of all when launching update.php. I have a warning:

Some of your configuration settings caused a warning:

* SharedDB is deprecated: since 1.21 In new code, use the $wiki parameter to
  LBFactory::getMainLB() to access remote databases. Using
  LBFactory::getMainLB() allows the shared database to reside on separate
  servers to the wiki's own database, with suitable configuration of
  $wgLBFactoryConf

Please correct the issue before running update.php again.
If you know what you are doing, you can bypass this check
using --skip-config-validation.

So I have run the script php update.php --skip-config-validation. And all databases where updated fine, except english version of the website, so when I go to my en.mywikisite.org I have the same error:

[71d8c5828b85d0578d561e3a] / Wikimedia\Rdbms\DBQueryError: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading or after adding a new extension?

Please see https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Upgrading and https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:How_to_debug for more information.

Error 1146: Table 'wikijournal_org.en__revision_actor_temp' doesn't exist (127.0.0.1)
Function: MessageCache::loadFromDB(en)-small
Query: SELECT /*! STRAIGHT_JOIN */ rev_id,rev_page,rev_timestamp,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,comment_rev_comment.comment_text AS `rev_comment_text`,comment_rev_comment.comment_data AS `rev_comment_data`,comment_rev_comment.comment_id AS `rev_comment_cid`,actor_rev_user.actor_user AS `rev_user`,actor_rev_user.actor_name AS `rev_user_text`,temp_rev_user.revactor_actor AS `rev_actor`,page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len FROM `en__page` JOIN `en__revision` ON ((page_id = rev_page)) JOIN `en__revision_comment_temp` `temp_rev_comment` ON ((temp_rev_comment.revcomment_rev = rev_id)) JOIN `en__comment` `comment_rev_comment` ON ((comment_rev_comment.comment_id = temp_rev_comment.revcomment_comment_id)) JOIN `en__revision_actor_temp` `temp_rev_user` ON ((temp_rev_user.revactor_rev = rev_id)) JOIN `wikijournal_org`.`ru__actor` `actor_rev_user` ON ((actor_rev_user.actor_id = temp_rev_user.revactor_actor)) WHERE page_is_redirect = 0 AND page_namespace = 8 AND (page_title NOT LIKE '%/%' ESCAPE '`' ) AND (page_len <= 10000) AND (page_latest = rev_id)
Backtrace:

from /var/www/admin/www/mediawiki-1.38.6/includes/libs/rdbms/database/Database.php(1606)
#0 /var/www/admin/www/mediawiki-1.38.6/includes/libs/rdbms/database/Database.php(1590): Wikimedia\Rdbms\Database->getQueryException(string, integer, string, string)
#1 /var/www/admin/www/mediawiki-1.38.6/includes/libs/rdbms/database/Database.php(1564): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)
#2 /var/www/admin/www/mediawiki-1.38.6/includes/libs/rdbms/database/Database.php(1173): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#3 /var/www/admin/www/mediawiki-1.38.6/includes/libs/rdbms/database/Database.php(1813): Wikimedia\Rdbms\Database->query(string, string, integer)
#4 /var/www/admin/www/mediawiki-1.38.6/includes/libs/rdbms/database/DBConnRef.php(69): Wikimedia\Rdbms\Database->select(array, array, array, string, array, array)
#5 /var/www/admin/www/mediawiki-1.38.6/includes/libs/rdbms/database/DBConnRef.php(320): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#6 /var/www/admin/www/mediawiki-1.38.6/includes/cache/MessageCache.php(569): Wikimedia\Rdbms\DBConnRef->select(array, array, array, string, array, array)
#7 /var/www/admin/www/mediawiki-1.38.6/includes/cache/MessageCache.php(447): MessageCache->loadFromDB(string, NULL)
#8 /var/www/admin/www/mediawiki-1.38.6/includes/cache/MessageCache.php(370): MessageCache->loadFromDBWithLock(string, array, NULL)
#9 /var/www/admin/www/mediawiki-1.38.6/includes/cache/MessageCache.php(1112): MessageCache->load(string)

Other wikis work fine meanwhile.

2) All interwiki links disappeared, they showb basically on the top-right corner of the page.

Your help will be appriciated!

Fokebox (talkcontribs)

So the main issue on the english version of my wiki remains the same:

[623a7c71a787e1640a0512b6] / Wikimedia\Rdbms\DBQueryError: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading or after adding a new extension?

Please see https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Upgrading and https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:How_to_debug for more information.

Error 1146: Table 'wikijournal_org.en__revision_actor_temp' doesn't exist (127.0.0.1)

Fokebox (talkcontribs)

And what is interesting while updating I see this in the logs:

...revision_actor_temp doesn't exist.

Running maintenance/updateRestrictions.php...

Migration is not needed.

done.

So I guess somehow the table is not being created. May that's the reason of the issue?

Tinss (talkcontribs)

Since you have many DBs, could it be that your config fails to point to the right DB in console mode and ends up upgrading only the russian version and not the english version ?

And in the dumps you're giving me, it seems the update script is running from a 1.38.6 codebase ... shouldn't it be 1.39.x ?

Fokebox (talkcontribs)

I have made finally successful upgrade. The problem I believe was in cache as I kept both folders on server. As I have deleted the previous version folder all errors are gone!

Now I have only final concers - missing interwiki links. Don't know what to do to make them on a page as usual.

Fokebox (talkcontribs)

Yes, I have also noticed that the error refers to the previous version. Anyway I have made a back up and later will retry to upgrade MW again and let you know what I have.

Fokebox (talkcontribs)

And one more thing. As I have special settings for my wiki farm. When I launch the update.php I have following warning:

root@mail:/var/www/admin/tools# ./update_wikis_2023.sh
Run update script for all wikis...
Warning: Undefined array key "SERVER_NAME" in /var/www/admin/www/mediawiki-1.39.0/LocalSettings.php on line 383
Some of your configuration settings caused a warning:

* SharedDB is deprecated: since 1.21 In new code, use the $wiki parameter to
  LBFactory::getMainLB() to access remote databases. Using
  LBFactory::getMainLB() allows the shared database to reside on separate
  servers to the wiki's own database, with suitable configuration of
  $wgLBFactoryConf

Please correct the issue before running update.php again.
If you know what you are doing, you can bypass this check
using --skip-config-validation.

Two things here are unclear.

  • "SERVER_NAME" i on line 383 I have as follows:

$uri = strtolower( $_SERVER['SERVER_NAME'] ); // Get the calling URI

Previously this line was okay for upgrading.

  • As I have shared tables for my wiki farm as follows:

$wgSharedDB = "wikijournal_org";

$wgSharedPrefix = "ru__";

So I don't know why while upgrading I have a notification: SharedDB is deprecated: since 1.21

Reply to "Updating problems from 1.38.6 to 1.39.3"