Jump to content

Topic on Project:Support desk

Missing articles after upgrading from 1.31.1 to 1.33?

12
HHawk79 (talkcontribs)

Hi all,


I have been using MediaWiki for several years and it has always been working great, until the latest upgrade.

We currently are running version 1.31.1 and I decided to upgrade to version 1.33 yesterday. At first everything seemed in order.


However today, I was looking for an article and I couldn't find it anymore with the search (which normally pops up by using a certain search term). At first I thought I made a typo. But this is not the case. I found the article title, but when I click on it, it says the article does not exists anymore at all?


After diving a bit more into it, I noticed several more articles completely disappeared. Only the title exists, but the article itself is completely gone? Luckily I had a full backup (files and database) so I restored it and everything was fine again.


I never had this problem in the past when upgrading to a newer version. It only happened after this upgrade (from 1.31.1 to 1.33). My guess is, that it affects older created articles. Newer or recent articles are not affected by it. So it's strange. Anyone else experienced this? Or maybe know a solution for this?


Currently we are back to version 1.31.1 thanks to the backup I took. We use MediaWiki multiple times a day as it contains tutorials and other information for our company. So it's important we maintain all the articles.


Thanks in advance.


Regards


Running PHP 7.2 with MariaDB 10.1.

Also using the following extensions:

- Cite

- CiteThisPage

- ConfirmEdit'

- PdfHandler

- WikiEditor

- CSS.php

- VideoPlayer.php

- Widgets.php


(don't know if it's important, but thought I would mention it)

MarkAHershberger (talkcontribs)

There were some changes made in how articles were stored. (See MCR for more info.) Perhaps these some db schema changes made caused the problem?

@CCicalese (WMF), have you seen anything like this? Do you think it would be a problem?

CCicalese (WMF) (talkcontribs)

We have not, to my knowledge, seen anything like this. Is there anything special about the missing pages? For example, are there special characters in the page titles? Are any errors or warnings written to the error log when you try to access those pages?

DKinzler (WMF) (talkcontribs)

What do you mean by "the title of the page exists"? Does that mean that links to the page where blue, but the content was gone? How about the page history? Was it empty?

With the new schema, there is a chain of references in the database that goes like this:

page.page_latest -> revision.rev_id <- slot.slot_revision_id, slot.slot_content_id -> content.content_id. Can you tell me what this chain looks like for any of the missing pages?

Also, were there any errors logged during update, or while trying to access the pages? Such errors may not be visible in the browser, see Manual:How_to_debug#PHP_errors.

CCicalese (WMF) (talkcontribs)

If this continues to be a problem, please create a ticket in Phabricator to track this.

HHawk79 (talkcontribs)

I have no clue what you all mean; I just updated our Mediawiki as I always do. Normally without any kind of issues. However this time some (older) articles only had the title and the rest inside the article was completely gone, no special characters, no nothing. All gone! No history, no nothing. G.O.N.E.!

Since we use this wiki multiple times a day, I didn't spend any time investigating. I only know what I saw. Therefor I installed the backup again, so everyone could use it once again.


I never heard of Phabricator, nor do I know how to use it. Anyways, we are running the backup now. I don't dare to update it again. LUCKILY I had a backup indeed... :S

And FYI version MediaWiki     1.31.1 has no issues whatsoever. But updating to 1.33 = OMG!

DKinzler (WMF) (talkcontribs)

Can you provide rows from the page, revision, and text table that correspond to the "vanished" articles? That would help with investigating this issue.


Phabricator is our bug tracker, you can fit it at https://phabricator.wikimedia.org/. You can use the account you have here on this wiki to log in.

HHawk79 (talkcontribs)

I will try to test it tomorrow on a subdomain. Is that easy to achieve? So we can use backed up version in the meantime.

And thank you for explaining.

HHawk79 (talkcontribs)

Sorry for reviving an old forum thread. But I gave up in the end and I was in the hospital for several weeks (and finally also completely forgot about this).


Anyways. I decided to update the current installation from 1.31.1 to the latest stable version 1.34.

At first everything seemed okay. However I noticed again some articles are missing. No real special characters or such.


I looked at the upgrade log and I noticed the following:


Completed migration, updated 2341 row(s) with 33 new actor(s), 1370 error(s)

Beginning migration of archive.ar_user and archive.ar_user_text to archive.ar_actor

User name "Mr coko" is usable, cannot create an anonymous actor for it. Run maintenance/cleanupUsersWithNoId.php to fix this situation.

User name "Michel" is usable, cannot create an anonymous actor for it. Run maintenance/cleanupUsersWithNoId.php to fix this situation.


Okay, so I did some searching on this. Apparantly I need to run:

php cleanupUsersWithNoId.php  --dbuser=DBUSER--dbpass=DBPASSWORD --force --prefix=* --conf=../LocalSettings.php


Well again errors:

Beginning cleanup of revision

... rev_timestamp=20150617134238 rev_id=381

... rev_timestamp=20150722094638 rev_id=518

... rev_timestamp=20151127085305 rev_id=642

... rev_timestamp=20160426071624 rev_id=747

... rev_timestamp=20170427053837 rev_id=1354

... rev_timestamp=20171025135944 rev_id=1863

... rev_timestamp=20180626112633 rev_id=2994

... rev_timestamp=20191210182547 rev_id=3718

Completed cleanup, assigned 0 and prefixed 0 row(s)

Beginning cleanup of archive

Wikimedia\Rdbms\DBQueryError from line 1603 of /var/www/vhosts/sub.domain.com/httpdocs/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  ar_id,ar_user,ar_user_text,ar_id  FROM `archive`    WHERE (1=1)  ORDER BY ar_id LIMIT 100

Function: CleanupUsersWithNoId::cleanup

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

#0 /var/www/vhosts/sub.domain.com/httpdocs/includes/libs/rdbms/database/Database.php(1574): Wikimedia\Rdbms\Database->getQueryExceptionAndLog('Unknown column ...', 1054, 'SELECT  ar_id,a...', 'CleanupUsersWit...')

#1 /var/www/vhosts/sub.domain.com/httpdocs/includes/libs/rdbms/database/Database.php(1152): Wikimedia\Rdbms\Database->reportQueryError('Unknown column ...', 1054, 'SELECT  ar_id,a...', 'CleanupUsersWit...', false)

#2 /var/www/vhosts/sub.domain.com/httpdocs/includes/libs/rdbms/database/Database.php(1807): Wikimedia\Rdbms\Database->query('SELECT  ar_id,a...', 'CleanupUsersWit...')

#3 /var/www/vhosts/sub.domain.com/httpdocs/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->select('archive', Array, Array, 'CleanupUsersWit...', Array)

#4 /var/www/vhosts/sub.domain.com/httpdocs/includes/libs/rdbms/database/DBConnRef.php(315): Wikimedia\Rdbms\DBConnRef->__call('select', Array)

#5 /var/www/vhosts/sub.domain.com/httpdocs/maintenance/cleanupUsersWithNoId.php(153): Wikimedia\Rdbms\DBConnRef->select('archive', Array, Array, 'CleanupUsersWit...', Array)

#6 /var/www/vhosts/sub.domain.com/httpdocs/maintenance/cleanupUsersWithNoId.php(63): CleanupUsersWithNoId->cleanup('archive', Array, 'ar_user', 'ar_user_text', Array, Array)

#7 /var/www/vhosts/sub.domain.com/httpdocs/maintenance/Maintenance.php(1746): CleanupUsersWithNoId->doDBUpdates()

#8 /var/www/vhosts/sub.domain.com/httpdocs/maintenance/doMaintenance.php(99): LoggedUpdateMaintenance->execute()

#9 /var/www/vhosts/sub.domain.com/httpdocs/maintenance/cleanupUsersWithNoId.php(212): require_once('/var/www/vhosts...')


Apparently you have to do that before running php update?

Anyways, reverted to the previous database and ran it again. This time no errors, but also not much happening:


Beginning cleanup of revision

... rev_timestamp=20150617134238 rev_id=381

... rev_timestamp=20150722094638 rev_id=518

... rev_timestamp=20151127085305 rev_id=642

... rev_timestamp=20160426071624 rev_id=747

... rev_timestamp=20170427053837 rev_id=1354

... rev_timestamp=20171025135944 rev_id=1863

... rev_timestamp=20180626112633 rev_id=2994

... rev_timestamp=20191210182547 rev_id=3718

Completed cleanup, assigned 0 and prefixed 0 row(s)

Beginning cleanup of archive

... ar_id=72

Completed cleanup, assigned 0 and prefixed 0 row(s)

Beginning cleanup of logging

Completed cleanup, assigned 0 and prefixed 0 row(s)

Beginning cleanup of image

Completed cleanup, assigned 0 and prefixed 0 row(s)

Beginning cleanup of oldimage

... oi_name=Da_bfm_settings.png oi_timestamp=20170116082129

Completed cleanup, assigned 0 and prefixed 0 row(s)

Beginning cleanup of filearchive

... fa_id=4

Completed cleanup, assigned 0 and prefixed 0 row(s)

Beginning cleanup of ipblocks

Completed cleanup, assigned 0 and prefixed 0 row(s)

Beginning cleanup of recentchanges

... rc_id=3706

... rc_id=3779

Completed cleanup, assigned 0 and prefixed 0 row(s)


Running the update (once again) resulted in the exact same errors. Catch-22?


Why is it so difficult to update Mediawiki 1.31.1 to 1.34? I really do not understand. I haven't had these issues with prior (pre 1.31.x) updates.


Anyways, I will restore everything back and redo everything again. And update from 1.31 to 1.32...... 1.34.

Maybe that will work. I will also run that cleanupUsersWithNoId.php command on my restored 1.31.1 installation.


No clue. Maybe it helps.

HHawk79 (talkcontribs)

Okay I reverted back to my backup, which was version 1.31.1

I also ran update.php on it and got the same "errors" in regards to: User name "Michel" is usable, cannot create an anonymous actor for it. Run maintenance/cleanupUsersWithNoId.php to fix this situation.


Partial result of this user:


User name "Michel" is usable, cannot create an anonymous actor for it. Run maintenance/cleanupUsersWithNoId.php to fix this situation.

... rev_id=849

... rev_id=968

... rev_id=1075

... rev_id=1179

... rev_id=1279

... rev_id=1414

... rev_id=1514

... rev_id=1622

... rev_id=1724

... rev_id=1926

... rev_id=1998

Completed migration, updated 0 row(s) with 0 new actor(s), 1370 error(s)


I am guessing the above causes the issues with missing articles when I update to 1.34 (or previously, as in my original post to 1.33).


No clue on how to solve this.

HHawk79 (talkcontribs)
HHawk79 (talkcontribs)

Well dunno what did it; I experimented with several things from different sources:

https://zetawiki.com/wiki/User_name_%22John%22_is_usable,_cannot_create_an_anonymous_actor_for_it._Run_maintenance/cleanupUsersWithNoId.php_to_fix_this_situation

and:

https://phabricator.wikimedia.org/T206859

Followed by running various commands from bash.


Dunno what helped, but now running version 1.34 with all my articles still available.


Still no clue why this happend.


Still getting several messages like this: User name "XXX" is usable, cannot create an anonymous actor for it

But apparently no errors. Is there a way to solve those messages for future updates? Or can they safely be ignored (I rather not, as those gave apparently issues in the past).


Regards

Reply to "Missing articles after upgrading from 1.31.1 to 1.33?"