Page MenuHomePhabricator

Master version of Babel bundled in MLEB not REL1_27 compatible
Closed, ResolvedPublic

Description

Hi,
I have recently created a Template that (among other things) add a category to the page. Unfortunately, the list of pages in that category do not update. I tried running the refreshLinks.php maintenance script as suggested by some forum post, but this scripts fails with the following error:

[root@docs1 mediawiki]# /bin/php /var/www/html/mediawiki/maintenance/refreshLinks.php
Refreshing redirects table.
Starting from page_id 1 of 1364.
100
200
300
400
500
600
700
800
900
1000
1100
1200
1300
Refreshing links tables.
Starting from page_id 1 of 1364.
PHP Fatal error:  Call to undefined method MediaWiki\MediaWikiServices::getDBLoadBalancer() in /var/www/html/mediawiki/extensions/Babel/includes/Database.php on line 35

Event Timeline

Mboisson created this task.Nov 22 2016, 9:11 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 22 2016, 9:11 PM

Note that we run MediaWiki 1.27.1.

Reedy added a subscriber: Reedy.Nov 22 2016, 9:35 PM

Note that we run MediaWiki 1.27.1.

And you look to be using a version of Babel newer than the REL1_27 branch.. Seemingly master or REL1_28

https://github.com/wikimedia/mediawiki-extensions-Babel/blob/master/includes/Database.php#L34-L35

That file doesn't exist in the 1.27 branch -- https://github.com/wikimedia/mediawiki-extensions-Babel/tree/REL1_27

Reedy updated the task description. (Show Details)Nov 22 2016, 9:35 PM

We installed Babel using the latest Language Extension Bundle, which is listed to be compatible with 1.27. https://www.mediawiki.org/wiki/MediaWiki_Language_Extension_Bundle#Latest_release

Reedy added a comment.Nov 22 2016, 9:44 PM

So this is MediaWiki Language Extension Bundle packaging issue; master of Babel uses MediaWiki\MediaWikiServices::getDBLoadBalancer() which is only in MW >= REL1_28

Ok... I downgraded Babel to the REL1_27 branch now. Running the script gives me a different error this time:
A database query error has occurred.
Query: INSERT IGNORE INTO categorylinks (cl_from,cl_to,cl_sortkey,cl_timestamp,cl_sortkey_prefix,cl_collation,cl_type) VALUES ('141','CC-Cloud','SYSTEM STATUS','20161122214920','','uppercase','page')
Function: LinksUpdate::incrTableUpdate
Error: 1305 PROCEDURE ccwiki.do_insert_category_closure_catlinks does not exist (localhost)

Reedy added a comment.Nov 22 2016, 9:59 PM

Do you use the IntraACL extension? Seems that adds (or, at least, can add) these stored procedures; MW doesn't use them by default

https://github.com/mediawiki4intranet/IntraACL/search?utf8=%E2%9C%93&q=do_insert_category_closure_catlinks

See also https://www.mediawiki.org/wiki/Topic:T4pejoifg3blbfcd

Have you run update.php?

We do not have the IntraACL addon installed now, but I believe we have installed it in the past. Could it be that it left something behind ?

We did run update.php after we upgraded from 1.26.2 to 1.27.1. It gave no error.

Should we run it again ?

Reedy added a comment.Nov 23 2016, 2:59 PM

We do not have the IntraACL addon installed now, but I believe we have installed it in the past. Could it be that it left something behind ?
We did run update.php after we upgraded from 1.26.2 to 1.27.1. It gave no error.
Should we run it again ?

update.php won't remove them -- I was thinking you'd installed it, but not run it after doing so. Based on the linked post leaving the stored procedures behind, and you have to remove them manually along with any related triggers

Ok. We'll try this on our dev server and report back on whether it solves the problem or not.

Reedy triaged this task as Low priority.Nov 23 2016, 3:15 PM

I confirm that dropping the triggers does resolve this.

All that remains is therefore that MLEB includes a Babel version that is not compatible with mediawiki 1.27. This should be fixed in MLEB, though I have fixed it on our servers by manually downgrading the version of Babel.

Reedy renamed this task from refreshLinks.php fails to Master version of Babel bundled in MLEB not REL1_27 compatible.Nov 24 2016, 1:31 AM

Change 323671 had a related patch set uploaded (by Legoktm):
Fix 1.27 compatibility

https://gerrit.wikimedia.org/r/323671

Change 323671 merged by jenkins-bot:
Fix 1.27 compatibility

https://gerrit.wikimedia.org/r/323671

Arrbee closed this task as Resolved.Jan 30 2017, 7:06 AM