Open main menu

UESPWiki β

User:Daveh/Wiki Upgrade 1.30

< User:Daveh

Documentation on upgrading the wiki from 1.29.3 to 1.30.?.

NotesEdit

  • (Note that there are no templates that currently use <templatestyles>, so unless this changes before the upgrade, this whole thing can be ignored.) For 1.30 only, <templatestyles/> will break the templates it's used in, causing significant display disruption on pages the templates are transcluded to. Those templates should be edited after the upgrade to change:
    {{#tag:templatestyles|{{ {{PAGENAME0}}/styles.css}}}} into either:
    {{#tag:templatestyles||src="{{PAGENAME0}}/styles.css"}} or
    <templatestyles src="TemplateNameGoesHere/styles.css" />
(Note: this change can be done by any editor familiar with templates and is listed here only to warn that significant page disruption is to be expected, but easy to recover from once the upgrade is complete.)
  • Search
  • Currently running ElasticSearch 5.3 on search1.
  • Compatibility from CirrusSearch extension:
    MediaWiki 1.29.x - 1.30.x require Elasticsearch 5.3.x - 5.4.x.
    MediaWiki 1.31.x - 1.32.x require Elasticsearch 5.5.x - 5.6.x.
    MediaWiki 1.33.x - 1.38.x require Elasticsearch 6.5.x - 6.8.x. (6.8.23+ recommended)
    MediaWiki 1.39+ require Elasticsearch 7.10.2 (6.8.23+ is possible using a compatibility layer)
  • SFWiki is using ElasticSearch 6.8.
  • Benchmarking
  • Content3
  • Main Page: 95 req/sec
  • Recent Changes: 47 req/sec
  • Dev
  • Main Page: 85 req/sec
  • Recent Changes: 61 req/sec
  • Unzipping SQL dump (10GB to 39GB): 12 min
  • Restoring SQL Dump: 42 min

Release NotesEdit

UpgradeEdit

  • Copy new 1.30.2 install to /home/uesp/dev/www/w130/.
  • Set images link.
  • Run: php71 uesp-upgrademw 1_30 /home/uesp/dev/www/w/ /home/uesp/dev/www/w130/
  • Move w to w129 and w130 to w.
  • Run: composer update --no-dev in new wiki.
  • Wiki main page loads but Special:Version crashes.
  • Run: php71 ./update/maintenance/update.php --uespdev in new wiki.
  • Note that --server doesn't appear to work.
  • This takes 20 mins secs on dev (second time took 13 min, 6 min on live, 10sec to 4min on language wikis).
  • Run composer:
    composer install --no-dev
    cd extensions/Elastica
    composer install --no-dev
  • Fix issue with Elastic composer autoloads (see below).
  • Upload the MinervaNeue skin to /skins/.
  • Add to extensions below MobileFrontEnd:
    wfLoadSkin( 'MinervaNeue' );
    $wgMFDefaultSkinClass = 'SkinMinervaNeue';

Files To ModifyEdit

  • SiteSpecialSearch.php
  • Update with the 1.30 code of SpecialSearch::showResults().
  • extensions/Patroller/SpecialPatroller.php
  • Line 243 change 'LIMIT' => '0,1' to
      'LIMIT' => '1'
  • Line 229 change to:
       [ $page, $recentchanges, $patrollers ],
  • Change all 3 calls of wgMessage to wfMessage.
  • Change 2 instances of wfMessages/wgMessages to wfMessage.
  • includes/GlobalFunctions.php
  • Line 1459 in wfHostname(), replace the else block with:
    } elseif (isset($_SERVER['SERVER_NAME'])) {
           # This may be a virtual server.
           $host = $_SERVER['SERVER_NAME'];
    } else {
           global $wgServerName;
           $host = $wgServerName;
    }
  • /includes/specials/pagers/ImageListPager.php
  • Line 436 after case 'thumb': add:
    if (substr(strtolower($value), -5) === '.webp') {
          return htmlspecialchars( $value );
    }
  • extensions/Elastica/ElasticConnection.php
  • extensions/SyntaxHighlight_GeSHi/SyntaxHighlight.class.php
  • Add the following line to the top of the file as it doesn't automatically load resulting in a Class 'Elastica\Transport\Http' not found error:
    require_once(__DIR__ . "/vendor/autoload.php");
  • Might have to remove it once fixed or cache is refreshed.
  • This may be due to running the wiki before running composer and the wiki caching the lack of autoload file. It might be fixed in 1.31
  • includes/registration/ExtensionProcessor.php
  • includes/registration/ExtensionRegistry.php
  • Updated code from [1] to try and fix composer cache issue.
  • skins/UespVector/skin.json
  • Update config section from 1.30 Vector skin.
  • Search JS
  • Edit resources/src/mediawiki/mediawiki.searchSuggest.js line 12 to be:
     namespace: namespace || '0|102|104|106|108|110|112|114|116|118|120|122|124|126|128|130|132|134|136|138|140|142|144|146|148|150|152|154|156|158|160|162|164|166|168|170|172|174|176|178',
  • Edit extensions/MobileFrontEnd/resources/mobile.search.api/SearchGateway.js line 21 to be:
     searchNamespace: '0|102|104|106|108|110|112|114|116|118|120|122|124|126|128|130|132|134|136|138|140|142|144|146|148|150|152|154|156|158|160|162|164|166|168|170|172|174|176|178',

Post Upgrade IssuesEdit

  • Site Search Options -- Not using the custom checkboxes but the default layout of all namespaces.
Had to fix the SiteSearchForm.php in UespCustomCode to use the correct custom form. -- Daveh (talk) 21:38, 7 July 2023 (UTC)
  • Site Search Talk Page Option --- The "Talk Page" option is resetting after search search.
Had to set the value of "searchTalkPages" in the widget class from the SpecialSearch class after creating in showResults(). -- Daveh (talk) 13:07, 10 July 2023 (UTC)

MariaDB UpgradeEdit

  • Requirements:
  • Currently running MariaDB 5.5
  • MariaDB 10.1.0+ works for 1.30 to 1.38
  • MariaDB 10.3.0+ works for 1.39 to current
  • MariaDB 10.3.39 currently available from the MariaDB.repo (below):
  • Note that a slave can be higher version from a master.
  • Create/Edit: /etc/yum.repos.d/MariaDB.repo
    [mariadb]
    name = MariaDB
    baseurl = http://yum.mariadb.org/10.3/centos7-amd64
    gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
    gpgcheck=1
  • Note: Change the 10.3 to different versions as needed (run yum clean metadata to force a refresh of the repo data).
  • Stop slave and record position.
  • Stop MariaDB server.
  • Backup data/config as needed.
  • Uninstall old MariaDB.
  • Install common components:
    sudo yum install MariaDB-server galera MariaDB-client MariaDB-shared MariaDB-backup MariaDB-common
  • Start MariaDB.
  • Run mysql_upgrade.
  • Replication from a lower version to higher version should work fine (backup2 is running MariaDB 10.5).
  • If you get a replication error Relay log write failure: could not queue event from master add the following to the slave config:
    slave_sql_verify_checksum=0
  • Backup1 Upgrade Notes
  • Copying 540GB takes about 2 hours.
  • Remove: mariadb mariadb-server
  • Don't remove mariadb-libs (removes any linked packages, will be replaced automatically by new package)
  • yum install MariaDB-server MariaDB-backup
  • service mariadb start (seemed to stall, worked second time)
  • mysqld --verbose (works fine as mysql user)
  • mysql_upgrade (takes 5-10 min)
  • Had to reset slave and update slave parameters in order for replication to work.
  • Restart zabbix-server.
  • Change passwords for any accounts to prevent issue with old passwords.
    Server is running in --secure-auth mode, but X has a password in the old format
Or set in the config:
    [mysqld]
    old_passwords=1
    secure-auth=false
    skip-secure-auth
You can check for old passwords with:
    SELECT user, length(Password) from mysql.user;
Any with a length of 16 will need to be updated.
  • References