Topic on Project:Support desk

82.26.156.45 (talkcontribs)

Mediawiki version 1.41.0 PHP 8.1.2-1ubuntu2.14 (fpm-fcgi) ICU 70.1 PostgreSQL 12.11 (Ubuntu 12.11- Oubuntue. 20.04.1) When trying to add an account or utilising an extension which allows/aids account creation, I keep receiving the error: "A database query error has occurred. This may indicate a bug in the software." I then try to run the update script /mw-config and receive a more detailed error message of "Table externallinks contains el to field. Dropping... An error occurred: Error 42704: ERROR: index "el_to" does not exist Function: Wikimedia\Rdbms\Database:: sourceFile( /var/www/mediawiki/maintenance/postgres/archives /patch-externallinks-drop-el _to.sal) Query: DROP INDEX el_to". I can't find any information or help regarding this particular issue online. Can someone please shed some light on the error and advise me on fixing the issue?

TheDJ (talkcontribs)

Some database knowledge is definitely advisable when trying to recover from a situation like this, so if you are unsure, get someone with more experience.

el_to was removed in 1.41 and the el_to index were removed in 1.41. The script says that the el_to column still exists and thus wants to run maintenance/postgres/archives /patch-externallinks-drop-el _to.sql

The first command of that database migration is to drop the el_to index. But apparently that index is already gone. This is unexpected, as in 1.41 the index and the column were dropped at the same time, by this same file. Possibly this indicates that something went wrong previously when you updated the installation and you didn't notice that an error was thrown during updating.

The easiest workaround is to modify maintenance/postgres/archives /patch-externallinks-drop-el _to.sql and change the 4 lines with "DROP  INDEX" to be "DROP INDEX IF EXISTS" and rerun the update script.

82.26.156.45 (talkcontribs)

Thank you for your reply.

I updated from 1.35 and there were no errors- everything ran as expected.

Could you please elaborate on your suggested workaround, as this is all still quite new to me. I have command line access and my instance is hosted on my own server.

82.26.156.45 (talkcontribs)

TheDJ; thank you for solving my problem.

I found the file and amended it accordingly, re-ran the update and received no errors. Everything is now working as expected, and I'm able to add users.

Thanks again.