Skip to content

Upgrading an existing install

David edited this page Sep 1, 2020 · 8 revisions

Upgrading NAFLM to the Latest Version

Warning

Some of the steps below, if not completed correctly, could corrupt your OBBLM/NAFLM database and make it not only unusable, but render your existing history unusable, it is for this reason we ask you to back up.

Basic Steps

  1. Back up install directory
  2. Back up SQL database
  3. Determine existing version
  4. Determine game data compatibility
  5. Keep key files and settings
  6. Install package
  7. Remove install.php
  8. Change PHP version
  9. Edit new settings.php file
  10. Replace files/settings
  11. Run core panel tasks
  12. Play some Blood Bowl! Appendix (Known Issues)

1. Back up install directory

How you do this will depend on your hosting provider/manager software. Generally connect via FTP to your portal installation directory and copy to an offline source.

2. Back up SQL database

This also varies depending on hosting provider/manager software. Contact your hosting manager for more information.

3. Determine existing version

Home -> About OBBLM;

NAFLM 1.1 or higher -or- OBBLM version 0.97 SVN

Continue to step 4

Any older version

Before upgrading to the latest build of NAFLM, patch to NAFLM 1.0 and run \upgrade.php to update your database to the latest version before continuing.

4. Determine game data compatibility

Due to number of self patches available for NAFLM and OBBLM it's vital we check that all race `'race_id', players 'pos_id' and star player 'id' are the same. Generally checking the last star players is all that will be required, but ensure to check the 'pos_id' for new positions added post 2016 such as Doom Diver if in your game data file. If you have game_data_bb2016.php and are using that version you will only need to check that file. Game data files are;

  • game_data_bb2016.php (Newest)
  • game_data_bb16.php BB2016
  • game_data_lrb6x.php LRB6
  • game_data_lrb6.php LRB5/6
  • game_data.php LRB5 (Oldest)

5. Keep key files and settings

Identify and keep the following files aside from your existing install as you will need them in full, or to reference to them later on;

  • settings.php This file has your install specific settings, of special note is MySQL database settings, without these being copied over exactly the same, your install will not be able to access the database(see step #9 for more information).
  • settings_modules Module control, in most instances there is no need to keep this, but check you have no changes to the defaults here.
  • localsettings\settings_x.php (e.g. settings_3.php) This is your league specific settings including front page layout. Do not copy over the file you are using.
  • css\stylesheetX.css (e.g. stylesheet6.css or stylesheetredblack.css) Check which theme you are using. Rename to stylesheet{New Name}.css (e.g. stylesheetnaflm.css). Select in the Admin -> League Preferences Administration page for all leagues that us it.
  • images\Any modified files Check no images are custom to your league. Ensure you keep any that are.

6. Install package

Overwrite all existing files.

7. Remove install.php

Failure to remove will stop your portal from loading.

8. Change PHP version (NAFLM 2.0 and later only)

In your hosting manager locate your PHP Version Selector and set it to PHP 7.4, as all hosting providers are different you may need to talk to them about how to set this if you cannot locate the setting.

9. Edit new settings.php file

Open both your old and new settings.php file and copy all settings individually from the old to new file with the following exceptions;

  1. Some older installs have the line include 'config.php'; ignore this line and DO NOT copy it into the new file. Locate and open config.php and copy the $db_name, $db_user and $db_passwd into their relevant spots in settings.php.
  2. House ranking systems - it will best for most users to copy the entire section from the old file and replace the same section in the new file entirely.

10. Replace files/settings

Replace the sections identified in step 5 as needed, or the complete files if required.

11. Run core panel tasks

Log in to your portal. Access Admin -> OBBLM core panel and run all four tasks.

12. Play some Blood Bowl!

All praise Nuffle!

Appendix

Known upgrade issue

Some old installs of OBBLM may not have been updated in the above mentioned way, and this can cause issues with some some player and team table fields not updating the team race, yet other teams of the same race or player type may translate correctly.

This usually shows as TRANSLATION ERR ! race/OLDRACE e.g. TRANSLATION ERR ! race/elf in the teams list or in the roster view the player icon will be missing and instead it will have a broken image icon and the text player avatar (these players can also not accept a skill up when enough SPP is accrued).

If this issue can not be fixed by running the core admin tasks you may need to fix it manually with the following console commands in phpMyAdmin module of your hosting provider;

Once you have navigated to the correct database (it is the one named in your settings.php file) use the console option at the lower part of the page to paste in the following text and of the page and run by pressing Ctrl+Enter;

UPDATE `players` SET `f_rname` = 'Chaos Chosen' WHERE `f_rname` = 'Chaos';
UPDATE `players` SET `f_rname` = 'Chaos Renegades' WHERE `f_rname` = 'Chaos Pact';
UPDATE `players` SET `f_rname` = 'Necromantic Horror' WHERE `f_rname` = 'Necromantic';
UPDATE `players` SET `f_rname` = 'Shambling Undead' WHERE `f_rname` = 'Undead';
UPDATE `players` SET `f_rname` = 'Tomb Kings' WHERE `f_rname` = 'Khemri';
UPDATE `players` SET `f_rname` = 'Elven Union' WHERE `f_rname` = 'Elf';
UPDATE `players` SET `f_rname` = 'Underworld Denizens' WHERE `f_rname` = 'Underworld';
UPDATE `teams` SET `f_rname` = 'Chaos Chosen' WHERE `f_rname` = 'Chaos';
UPDATE `teams` SET `f_rname` = 'Chaos Renegades' WHERE `f_rname` = 'Chaos Pact';
UPDATE `teams` SET `f_rname` = 'Necromantic Horror' WHERE `f_rname` = 'Necromantic';
UPDATE `teams` SET `f_rname` = 'Shambling Undead' WHERE `f_rname` = 'Undead';
UPDATE `teams` SET `f_rname` = 'Tomb Kings' WHERE `f_rname` = 'Khemri';
UPDATE `teams` SET `f_rname` = 'Elven Union' WHERE `f_rname` = 'Elf';
UPDATE `teams` SET `f_rname` = 'Underworld Denizens' WHERE `f_rname` = 'Underworld';