Topic on Project:Support desk

Issue Upgrading from 1.33.4 to 1.34.0

18
Summary last edited by Ljkennedy2000 08:04, 25 May 2022 1 year ago

Removing the Dynamic Article List extension from the localsettings.php/main page resolved this issue.


Thanks for all your help.

Ljkennedy2000 (talkcontribs)

Error when upgrading from MediaWiki 1.33.4 to 1.34 on main page:


Hi all, I wonder if anyone can help?


When trying to upgrade from 1.33.4 to 1.34 I get the following error:


[YizDPmwd53OgEa32QAw-tQAAAAU] /index.php/Main_Page UnexpectedValueException from line 462 of /var/www/mediawiki-1.34.0/includes/libs/rdbms/loadbalancer/LoadBalancer.php: Invalid server index index #DB_SLAVE

Backtrace:

#0 /var/www/mediawiki-1.34.0/includes/libs/rdbms/loadbalancer/LoadBalancer.php(896): Wikimedia\Rdbms\LoadBalancer->getConnectionIndex(string, array, string)

#1 /var/www/mediawiki-1.34.0/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1043): Wikimedia\Rdbms\LoadBalancer->getConnection(string, array, string, integer)

#2 /var/www/mediawiki-1.34.0/includes/GlobalFunctions.php(2576): Wikimedia\Rdbms\LoadBalancer->getMaintenanceConnectionRef(string, array, string)

#3 /var/www/mediawiki-1.34.0/extensions/DynamicArticleList/DynamicArticleList_body.php(31): wfGetDB(string)

#4 /var/www/mediawiki-1.34.0/includes/parser/Parser.php(4293): DynamicArticleList::renderTag(string, array, Parser, PPFrame_Hash)

#5 /var/www/mediawiki-1.34.0/includes/parser/PPFrame_Hash.php(328): Parser->extensionSubstitution(array, PPFrame_Hash)

#6 /var/www/mediawiki-1.34.0/includes/parser/Parser.php(3330): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)

#7 /var/www/mediawiki-1.34.0/includes/parser/Parser.php(1489): Parser->replaceVariables(string)

#8 /var/www/mediawiki-1.34.0/includes/parser/Parser.php(593): Parser->internalParse(string)

#9 /var/www/mediawiki-1.34.0/includes/content/WikitextContent.php(368): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)

#10 /var/www/mediawiki-1.34.0/includes/content/AbstractContent.php(555): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)

#11 /var/www/mediawiki-1.34.0/includes/Revision/RenderedRevision.php(264): AbstractContent->getParserOutput(Title, integer, ParserOptions, boolean)

#12 /var/www/mediawiki-1.34.0/includes/Revision/RenderedRevision.php(236): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(WikitextContent, boolean)

#13 /var/www/mediawiki-1.34.0/includes/Revision/RevisionRenderer.php(215): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string)

#14 /var/www/mediawiki-1.34.0/includes/Revision/RevisionRenderer.php(152): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, array)

#15 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(MediaWiki\Revision\RenderedRevision, array)

#16 /var/www/mediawiki-1.34.0/includes/Revision/RenderedRevision.php(198): call_user_func(Closure, MediaWiki\Revision\RenderedRevision, array)

#17 /var/www/mediawiki-1.34.0/includes/poolcounter/PoolWorkArticleView.php(196): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()

#18 /var/www/mediawiki-1.34.0/includes/poolcounter/PoolCounterWork.php(125): PoolWorkArticleView->doWork()

#19 /var/www/mediawiki-1.34.0/includes/page/Article.php(791): PoolCounterWork->execute()

#20 /var/www/mediawiki-1.34.0/includes/actions/ViewAction.php(63): Article->view()

#21 /var/www/mediawiki-1.34.0/includes/MediaWiki.php(511): ViewAction->show()

#22 /var/www/mediawiki-1.34.0/includes/MediaWiki.php(302): MediaWiki->performAction(Article, Title)

#23 /var/www/mediawiki-1.34.0/includes/MediaWiki.php(900): MediaWiki->performRequest()

#24 /var/www/mediawiki-1.34.0/includes/MediaWiki.php(527): MediaWiki->main()

#25 /var/www/mediawiki-1.34.0/index.php(44): MediaWiki->run()

#26 {main}


I’ve tried adding new extensions for 1.34, upgrading to different versions ‘upto the latest 1.37.1’ and made sure that the LoadBalancer.php has the DB_REPLICA setting enabled. This only seems to appear on the main page from what I can see.


Thanks

Bawolff (talkcontribs)

Are you sure DynamicArticleList is compatible with your version of mediawiki?

Ljkennedy2000 (talkcontribs)

Hi Bawolff,

Thanks for the response.

Unfortunately my Experience is limited with Media Wiki and i've been tasked with updating our current system, is that an extension of some sort and how would I check compatibility?

Thanks again.

Ljkennedy2000 (talkcontribs)

Hi Bawolff,


I've found the DynamicArticleList.php file in extensions and noticed the following on line 24 -

// The callback function for converting the input text to HTML output

function DynamicArticleList( $input ) {

require_once ('CategoryUtil.php');

$dbr =& wfGetDB( DB_SLAVE );

// INVALIDATE CACHE

global $wgTitle;

$wgTitle->invalidateCache();

// Default Values

$listTitle = false;

$listType = 'new';

$listCount = 5;

$categoryRoot = false;


Should this be set to DB_REPLICA instead of DB_SLAVE  ?


Thanks

Ljkennedy2000 (talkcontribs)

Also it's * Dynamic Article List v2.0

Jonathan3 (talkcontribs)
Ljkennedy2000 (talkcontribs)

Hi Jonathan3,


Thanks for the response. To disable Dynamic Article List is this done in the Localsettings.php?


Thanks for you help.

Bawolff (talkcontribs)

Yes. There should be a line that starts with "require". Find the one for this extension and remove it. (Keep backups just in case)

Ljkennedy2000 (talkcontribs)

Hi,

I upgraded to 1.35.5 and disabled Dynamic Article List in the Localsettings.php which seems to let the main page work now apart from one of our side menus which shows the following error:

<dynamicarticlelist>

title=Recently Update Articles

type=update

count=5

</dynamicarticlelist>

<dynamicarticlelist>

title=Most Popular Articles

type=hot

count=5

</dynamicarticlelist>

Is there something else other than dynamic article lists that could be used to get this working or an update for it maybe?

I then tried upgrading to media wiki 1.36.0 to see if this would resolve it but it didn't work - the whole page seems to have lost images and styling it's showing text for everything 'although it lets me login etc'. The images were copied over and the permissions looked okay, I did have to install php-intl to get to 1.36.0 so i'm not sure if this caused it?

Thanks

Ljkennedy2000 (talkcontribs)

Hi Bawolff,


Thanks for your input I will give it a try :)

Ljkennedy2000 (talkcontribs)

Hi,


I upgraded to 1.35.5 and disabled Dynamic Article List in the Localsettings.php which seems to let the main page work now apart from one of our side menus which shows the following error:

<dynamicarticlelist>

title=Recently Update Articles

type=update

count=5

</dynamicarticlelist>

<dynamicarticlelist>

title=Most Popular Articles

type=hot

count=5

</dynamicarticlelist>

Is there something else other than dynamic article lists that could be used to get this working or an update for it maybe?

I then tried upgrading to media wiki 1.36.0 to see if this would resolve it but it didn't work - the whole page seems to have lost images and styling it's showing text for everything 'although it lets me login etc'. The images were copied over and the permissions looked okay, I did have to install php-intl to get to 1.36.0 so i'm not sure if this caused it?


Thanks

Bawolff (talkcontribs)

There are lots of similiar extensions, like DynamicPageList.

Ljkennedy2000 (talkcontribs)

Hi Bawolff,


I've managed to get to version 1.36 now :) but my next issue is all the main_page entries are in text format, I cannot see any of the images or headers etc.. The images files have been copied over into the correct folder. Could this be a php issue?


Thanks

Bawolff (talkcontribs)

What do you mean by headers?


For images, are their image description pages working?

Ljkennedy2000 (talkcontribs)

Hi Bawolff,


Thanks for the response. Apologies i've probably used the wrong terminology but basically the whole main page is in plain text and it doesn't render any images or sidebars etc when i upgrade from 1.35.0 to 1.36.0, if I move the wikimedia folder back to 1.35.0 it works fine. I've checked the skins folder and that looks the same, i've tried copying over the extensions folder and images but still no luck :(


Thanks

Bawolff (talkcontribs)

Is it just missing css (e.g. everything is text but for example headers and page title are still larger than other text?)

Ljkennedy2000 (talkcontribs)

Hi Bawolff,


Text is different sizes on the main page and links are still there so it looks like it could be missing CSS, is it possible that CSS is in a different location for 1.36.0 to what it was in 1.35.0?


Thanks

Ljkennedy2000 (talkcontribs)

Hi Bawolff,


Thanks for the reply I will try and give that a go.