Topic on Project:Support desk

Upgrading from 1.18 to 1.22.1 stuck at Upgrade existing installation

13
101.174.85.254 (talkcontribs)

I have updated all the files via FTP and am now attempting to run the web updater (I've entered the upgrade key etc).

The upgrade seems to be stuck at the "Upgrade existing installation" stage and I can't get passed it. It throws no errors except "There are MediaWiki tables in this database. To upgrade them to MediaWiki 1.22.1, click Continue." It thinks for a bit when clicking "continue" but then...nothing.

Just above the "Backtrace" information in the window, it shows:

An error occurred: A database query error has occurred. Query: SELECT count(*) FROM `watchlist` WHERE wl_namespace & 1 LIMIT 1 Function: MysqlUpdater::doWatchlistUpdate Error: 1146 Table 'mytablename.watchlist' doesn't exist (localhost)

I've added the php error debug code to the top of the localsettings.php and the page reports:

Notice: Uncommitted DB writes (transaction from DatabaseUpdater::doUpdates). in /home/xxx/public_html/voywiki/includes/db/Database.php on line 3944

Help?

MarkAHershberger (talkcontribs)

Still having this problem?

Looks like you need to create the watchlist table. MW should do that automatically, but it isn't for some reason.

If you have access to the DB somehow, I can show you what you need to do.

88.130.83.1 (talkcontribs)

The watchlist table should actually be there when you are upgrading from 1.18. If it really is not there, I would check a backup and take the table from there.

37.120.3.10 (talkcontribs)

It seems that I have a similar issue but with. I'm trying to install Mediwik 1.29.1 locally. After the connection to the Database is established, I get an interface in a loading state and with the message "

Upgrade existing installation

There are MediaWiki tables in this database. To upgrade them to MediaWiki 1.29.1, click Continue."

I don't know if the window is frozen or it's processing something in the background that takes very long given the size of the DB (3.5 GB). Any idea what's happening?

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

Sorry I forget to specify my setup

Mediawiki 1.29.1

MySQL: 5.6.35

PHP: 7.1.8

And I'm using MAMM Pro 4.2.1

2003:CC:ABCD:9700:197C:8F6D:F073:97B8 (talkcontribs)

For big databases like yours it is always safer to run the update from shell.

See upgrading for detailed information!

37.120.68.243 (talkcontribs)

Actually I'm installing wikimedia for the first time and as far I understand, my DB containing the wiki dump has some tables that are not compatible with the version of wikimedia that I'm using. Therefore, an upgrade for the DB is required. Knowing that my goal is to generate "LocalSettings.php" for my big Database, I tried to run install.php from the command line. The command didn't return anything. I tried as well a workaround:

- Create my DB with empty Tables

- Generate "LocalSettings.php" from the browser (that was fast since the DB is small)

- Import the wiki sql dump to my DB

- Refresh the index.php page

I got then a blank page with this message "Exception caught inside exception handler.Set $wgShowExceptionDetails = true; and $wgShowDBErrorBacktrace = true; at the bottom of LocalSettings.php to show detailed debugging information"

All the examples and tutorials that I found onlines about this matter are assuminn/using a small or new created DB.

Did really someone tried to use a real wikimedia dump and run locally? Why is there no such an advanced example?

2003:CC:ABC5:7300:113C:BE92:A816:A8DE (talkcontribs)

I am not sure I understand what you are trying to do. Do you really want to use an old Wikipedia dump, e.g. a dump of the database of en.wikipedia.org)? In that case, you can just use a newer dump, I think... However, I assume that you instead want to upgrade an own wiki, where no newer dump is available.

The normal way of upgrading the database is this: Put the files of the new MediaWiki version in place and then, on the shell, run update.php. There is no need to generate a new LocalSettings.php file - you can continue using the LocalSettings.php file, which you have already used before.

After you imported the database, you still have to run update.php to update it.

2A02:2450:1021:A76:C93E:4712:42F9:E8E7 (talkcontribs)

Yes, I'm trying to run a whole existing mediwiki project locally (in my case en.wiktionary.org). I need to send millions of request and with the public online version I will get blocked after few hundred requests. That's why I need to run it locally. I have already downloaded the latest dump and tried what I described above.

I tried both ways on shell: install.php and update.php and both of them don't return anything.

When I tried the workaround that I described, where Import the DB after generating "LocalSettings.php", here are the detailed logs:

MediaWiki internal error.

Original exception: [3d0cd8dc5f56783f8cc335eb] /mediawiki/index.php DBQueryError from line 934 of /Applications/MAMP/htdocs/mediawiki/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 page_id,page_namespace,page_title,page_restrictions,page_is_redirect,page_is_new,page_random,page_touched,page_links_updated,page_latest,page_len,page_content_model FROM `page` WHERE page_namespace = '4' AND page_title = 'Main_Page' LIMIT 1  

Function: WikiPage::pageData

Error: 1054 Unknown column 'page_links_updated' in 'field list' (localhost)

Ciencia Al Poder (talkcontribs)

If update.php doesn't return anything, it must be erroring out and you have your php.ini configured to no display any errors. See Manual:How to debug to see how to display errors.

141.20.156.105 (talkcontribs)

Thx Ciencia for the tip. Here is the end of the logs:

SQL ERROR: Unknown column 'page_links_updated' in 'field list' (localhost)

[Bug56269] Exception thrown with an uncommited database transaction: [d16603c55a86c86fa232084c] /mediawiki/index.php   DBQueryError from line 934 of /Applications/MAMP/htdocs/mediawiki/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  page_id,page_namespace,page_title,page_restrictions,page_is_redirect,page_is_new,page_random,page_touched,page_links_updated,page_latest,page_len,page_content_model  FROM `page`   WHERE page_namespace = '4' AND page_title = 'Main_Page'  LIMIT 1  

Function: WikiPage::pageData

Error: 1054 Unknown column 'page_links_updated' in 'field list' (localhost)

#0 /Applications/MAMP/htdocs/mediawiki/includes/db/Database.php(901): DatabaseBase->reportQueryError(string, integer, string, string, boolean)

#1 /Applications/MAMP/htdocs/mediawiki/includes/db/Database.php(1234): DatabaseBase->query(string, string)

#2 /Applications/MAMP/htdocs/mediawiki/includes/db/Database.php(1293): DatabaseBase->select(string, array, array, string, array, array)

#3 /Applications/MAMP/htdocs/mediawiki/includes/page/WikiPage.php(306): DatabaseBase->selectRow(string, array, array, string, array)

#4 /Applications/MAMP/htdocs/mediawiki/includes/page/WikiPage.php(325): WikiPage->pageData(DatabaseMysqli, array, array)

#5 /Applications/MAMP/htdocs/mediawiki/includes/page/WikiPage.php(361): WikiPage->pageDataFromTitle(DatabaseMysqli, Title, array)

#6 /Applications/MAMP/htdocs/mediawiki/includes/page/WikiPage.php(444): WikiPage->loadPageData()

#7 /Applications/MAMP/htdocs/mediawiki/includes/page/WikiPage.php(485): WikiPage->exists()

#8 /Applications/MAMP/htdocs/mediawiki/includes/page/WikiPage.php(210): WikiPage->getContentModel()

#9 /Applications/MAMP/htdocs/mediawiki/includes/page/WikiPage.php(196): WikiPage->getContentHandler()

#10 /Applications/MAMP/htdocs/mediawiki/includes/actions/Action.php(96): WikiPage->getActionOverrides()

#11 /Applications/MAMP/htdocs/mediawiki/includes/actions/Action.php(154): Action::factory(string, WikiPage, RequestContext)

#12 /Applications/MAMP/htdocs/mediawiki/includes/MediaWiki.php(150): Action::getActionName(RequestContext)

#13 /Applications/MAMP/htdocs/mediawiki/includes/MediaWiki.php(652): MediaWiki->getAction()

#14 /Applications/MAMP/htdocs/mediawiki/includes/MediaWiki.php(509): MediaWiki->main()

#15 /Applications/MAMP/htdocs/mediawiki/index.php(43): MediaWiki->run()

#16 {main}

[queries] wiktionary: ROLLBACK /* MWExceptionHandler::rollbackMasterChangesAndLog 0:0:0:0:0:0:0:1 */

[exception] [d16603c55a86c86fa232084c] /mediawiki/index.php   DBQueryError from line 934 of /Applications/MAMP/htdocs/mediawiki/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  page_id,page_namespace,page_title,page_restrictions,page_is_redirect,page_is_new,page_random,page_touched,page_links_updated,page_latest,page_len,page_content_model  FROM `page`   WHERE page_namespace = '4' AND page_title = 'Main_Page'  LIMIT 1  

Function: WikiPage::pageData

Error: 1054 Unknown column 'page_links_updated' in 'field list' (localhost)

#0 /Applications/MAMP/htdocs/mediawiki/includes/db/Database.php(901): DatabaseBase->reportQueryError(string, integer, string, string, boolean)

#1 /Applications/MAMP/htdocs/mediawiki/includes/db/Database.php(1234): DatabaseBase->query(string, string)

#2 /Applications/MAMP/htdocs/mediawiki/includes/db/Database.php(1293): DatabaseBase->select(string, array, array, string, array, array)

#3 /Applications/MAMP/htdocs/mediawiki/includes/page/WikiPage.php(306): DatabaseBase->selectRow(string, array, array, string, array)

#4 /Applications/MAMP/htdocs/mediawiki/includes/page/WikiPage.php(325): WikiPage->pageData(DatabaseMysqli, array, array)

#5 /Applications/MAMP/htdocs/mediawiki/includes/page/WikiPage.php(361): WikiPage->pageDataFromTitle(DatabaseMysqli, Title, array)

#6 /Applications/MAMP/htdocs/mediawiki/includes/page/WikiPage.php(444): WikiPage->loadPageData()

#7 /Applications/MAMP/htdocs/mediawiki/includes/page/WikiPage.php(485): WikiPage->exists()

#8 /Applications/MAMP/htdocs/mediawiki/includes/page/WikiPage.php(210): WikiPage->getContentModel()

#9 /Applications/MAMP/htdocs/mediawiki/includes/page/WikiPage.php(196): WikiPage->getContentHandler()

#10 /Applications/MAMP/htdocs/mediawiki/includes/actions/Action.php(96): WikiPage->getActionOverrides()

#11 /Applications/MAMP/htdocs/mediawiki/includes/actions/Action.php(154): Action::factory(string, WikiPage, RequestContext)

#12 /Applications/MAMP/htdocs/mediawiki/includes/MediaWiki.php(150): Action::getActionName(RequestContext)

#13 /Applications/MAMP/htdocs/mediawiki/includes/MediaWiki.php(652): MediaWiki->getAction()

#14 /Applications/MAMP/htdocs/mediawiki/includes/MediaWiki.php(509): MediaWiki->main()

#15 /Applications/MAMP/htdocs/mediawiki/index.php(43): MediaWiki->run()

#16 {main}

[queries] wiktionary: BEGIN /* DatabaseBase::query (LinkBatch::doQuery (for Skin::preloadExistence)) 0:0:0:0:0:0:0:1 */

[queries] wiktionary: SELECT /* LinkBatch::doQuery (for Skin::preloadExistence) 0:0:0:0:0:0:0:1 */  page_id,page_namespace,page_title,page_len,page_is_redirect,page_latest,page_content_model  FROM `page`   WHERE (page_namespace = '5' AND page_title = 'Main_Page')

SQL ERROR: Unknown column 'page_content_model' in 'field list' (localhost)

[session] Saving all sessions on shutdown

wfClientAcceptsGzip: client accepts gzip.

wfGzipHandler() is compressing output

2003:CC:ABC6:200:E93E:7DF:9BEC:44AD (talkcontribs)

The relevant lines are

> Unknown column 'page_links_updated' in 'field list'

> Unknown column 'page_content_model' in 'field list'

This means that in your table page the columns page_links_updated and page_content_model are missing. They are missing, because they got added in newer versions of MediaWiki. You can add them manually so that they look as described on Manual:page table. However, there most likely are also other columns, which are missing. Note that these errors do not occur, when you are running update.php. They obviously are from regular page views using a webbrowser.

Actually, running update.php from the shell should add the missing columns. See How to debug for how to configure PHP to display errors, which are happening while you are running update.php!

When you write

> update.php doesn't return anything.

what do you mean exactly? Are a few lines of text being printed out? Or does it really not return one single sign? I think I have never seen that...

Reply to "Upgrading from 1.18 to 1.22.1 stuck at Upgrade existing installation"