Assist Upgrade Actions: Difference between revisions
(Updated) |
(Amended Upgrading XAMPP PHP) |
||
Line 84: | Line 84: | ||
* Enable Intl and openSSL packages for 1.39: | * Enable Intl and openSSL packages for 1.39: | ||
** On XAMPP (Windows) open the php.ini by opening the control panel, selecting config on apache section and selecting PHP | ** On XAMPP (Windows) open the php.ini by opening the control panel, selecting config on apache section and selecting PHP | ||
** Then add extension= | ** Then add extension=intl | ||
** Then add extension=openSSL | ** Then add extension=openSSL | ||
* Change memory limit | * Change memory limit | ||
** php.ini - memory_limit = 128M, all the way up to 512 depending on the size of PDF documents. For example, CTMS User Guide PDF size when produced is nearly 60Mb. | |||
* Click the Service button on the left to install as a service, for Apache and MySQL | * Click the Service button on the left to install as a service, for Apache and MySQL | ||
Line 117: | Line 117: | ||
** Rename xampp/php folder to keep it safe. | ** Rename xampp/php folder to keep it safe. | ||
** Extract php folder into xampp | ** Extract php folder into xampp | ||
** Compare php.ini and make necessary changes for Assist/Wiki | |||
** Stop and start Apache. | ** Stop and start Apache. | ||
** Note: 7.4.4 works fine with 1.34 - tested locally | ** Note: 7.4.4 works fine with 1.34 - tested locally |
Latest revision as of 12:01, 28 July 2025
Purpose
Reasons
- Assist server (online-help) will be sunsetted.
- Some Assist wikis are 16 years out of date and versions are not supported by MediaWiki for any further bug fixes.
- Version of XAMPP (including Apache and PHP) have security vulnerabilities that cannot be resolved without upgrading.
- QoL improvements.
What do we get:
- Technical
- Latest security patched Apache, MariaDB and PHP installations.
- Latest security patched MediaWiki installations.
- New server with supported Windows, hosted on new farm, security enhanced.
- Enhanced security of edits through CAPTCHA.
- Maintenance
- Easier upgrade path in the future to maintained LTS MediaWiki releases.
- Batch Editing/Replacement - through Extension:Nuke/Extension:ReplaceText
- Code syntax and error highlighting - through Extension:CodeEditor/Extension:SyntaxHighlight
- Email/2FA account registration
- Easier page/document creation - through Extension:InputBox
- Batch upload of images, easing creation of new pages - through Extension:SimpleBatchUpload.
- QoL
- Improved editor
- On-line preview - through Extension:WikiEditor
- Template inserting - through Extension:TemplateWizard and Extension:TemplateData
- Visual Editor - through Extension:VisualEditor and Extension:Gadgets
- Visual Differences in edits and history - through Extension:VisualEditor
- Easier category navigation - through Extension:CategoryTree
- Cleaner modern layout, compatible with Mobile - through Timeless/Vector skin
- Searching of tables - through bespoke code
- Better exporting to PDF in Aptean format- through Extension:PdfBook
- Online translation of pages to multiple languages - through Extension:GoogleTranslator
- "Peek" at linked pages by hovering over the link. Incudes an appropriate thumbnail picture if there is one - through Extension:Popups
- Improved editor
Local Upgrades
See existing system locally hosted
http://localhost:8080/EPOD/index.php/Main_Page
U/P: anw/Liverpool123
Database password is blank!
Fresh Server Installation
Preparation
- IIS
- If IIS is installed, change the default port from 80/443 so it doesn't interfere with Apache. Or change Apache to 8080/41443 - see later, but recommended that 443 remains the SSL port.
- Download the MSI installer - required for VC components. Download from Bitnami
- Download the Visual C++ 2000 SP1 redistributable
- Download Notepad++ - latest version
- Download MySQL WorkBench - latest version.
Installation
- Install Notepad++
- Install MySQL WorkBench
- Install VCredist.exe
- Install xampp
- Run setup_xampp.bat
- Update settings if asked.
Configuration
See X:\xampp\readme_en.txt for details
- Right-click xampp-control.exe and Run as Administrator.
- Change config
- Click topmost Config button
- Change editor to Notepad++
- Autostart Apache and MySQL
- Change default ports to 8080 and 41443
- Apply
- Click Config against Apache
- Replace 80 with 8080 in httpd.conf
- Replace 443 with 41443 in httpd-ssl.conf - should not do this on properly hosted systems
- On properly hosted systems, in the VirtualHost section in httpd-ssl.conf, add this line before the end of the definition
- Click topmost Config button
RedirectMatch ^/$ /calidus-assist/ </VirtualHost>
- Enable Intl and openSSL packages for 1.39:
- On XAMPP (Windows) open the php.ini by opening the control panel, selecting config on apache section and selecting PHP
- Then add extension=intl
- Then add extension=openSSL
- Change memory limit
- php.ini - memory_limit = 128M, all the way up to 512 depending on the size of PDF documents. For example, CTMS User Guide PDF size when produced is nearly 60Mb.
- Click the Service button on the left to install as a service, for Apache and MySQL
- Start (or Restart) Apache and MySql processes - if they were already started, configuration changes will not apply correctly.
HTMLDoc
Install HTMLDoc 1.9.8 into default directory on C drive.
Additional Configuration
If copying an Assist from another machine, where the Apache port number is different to the port number on the new server, you will likely have to change the port number in the LocalSettings.php file
On local servers:
$wgServer = "http://localhost:8080";
On properly hosted servers:
$wgServer = "//calidusassist.adcservices.apteancloud.com";
However, on most installations, the following will work for all types of URL (local or cloud):
$wgServer = $wgServer = WebRequest::detectServer();
Upgrading XAMPP PHP
Requires upgrade to PHP to 7.4.3 - current version of the XAMPP that I have is 7.4.2
- Start with a XAMPP version that is compatible (see below) or start with the requirements from 1.34 and upgrade PHP
- Upgrading PHP
- Download the version of XAMPP with the version you're after (in this case xampp-portable-windows-x64-7.4.4-2-VC15.7z) - use latest v7.X installer
- Rename xampp/php folder to keep it safe.
- Extract php folder into xampp
- Compare php.ini and make necessary changes for Assist/Wiki
- Stop and start Apache.
- Note: 7.4.4 works fine with 1.34 - tested locally
Creating a brand new MediaWiki installation
- Just extract the MW zip file into a new folder under calidus-assist, rename to what you want
- Run configuration (navigate to the site)
- database name
- table prefix (including underscore e.g. "oh_", "epod_")
- Enter your DB password
- Regenerate localSettings.php
- Enter owner u/p
- Enter the same username/password for the site for the admin user.
- Default skin: Timeless (mobile-friendly)
If you are setting up a shared interwiki (which is standard in a new wiki set up following the instructions and templates below), then you need to follow the instructions in Shared Interwiki below.
Then follow MediaWiki Configuration and following sections
In order for shared Interwiki to work (which is standard in a new wiki set up following the instructions and templates below), you must then update the user just created to have access to database obs_assist:
- Using MySQL Administrator:
- Open connection to database.
- Click on Administration tab
- Click on Users and Privileges
- Click on your user above.
- Click Schema Privileges
- Click Add Entry...
- Click Selected Schema.
- Select obs_assist from the DDL.
- Click OK
- Check all boxes in Object Rights section.
- Click Apply.
Upgrading existing MediaWiki
Copying
- Pull HTDOC for wiki systems into server from existing implementation.
- Also favicons and index.html (gateway).
- Update the favicon to Aptean - use the one in my MTS wiki - C:\xampp\htdocs\favicon.ico
- Copy all the images from the ROOT images folder (not the subfolders) e.g. C:\xampp\htdocs\MTS\images
- ApteanPageBk.png
- ApteanPageBk800.png
- ApteanPageBk1000.png
- Clear_Icon.png
- ApteanHF.png
- ApteanHF1.png
- ApteanHF2.png
- pdf.png
- Also images from $wgResourceBasePath/resources/assets/
- Aptean.png
- Pull databases into MariaDB.
Upgrade MediaWiki
- Upgrade MediaWiki
- Download the version your after (in this case mediawiki-1.39.8.zip from https://releases.wikimedia.org/mediawiki/1.39/)
- Backup the database with all procedures and users. Note your root password.
- Backup your XAMPP/htdocs folder that you are upgrading e.g. htdocs/MTS)
- Backup your localsettings.php to localsettings.v1.34.old (belt and braces - you can use the one in your backup instead if you like)
- Extract new MW version to a local folder (you'll need it again for all your wikis, and it's faster this way)
- Copy new MW version over existing MW folder e.g. htdocs/MTS
- Put the localsettings.php back in place.
- Go to your URL, plus mw-config e.g. http://localhost:8080/calidus-assist/MTS/mw-config/
- Follow the instructions as before - stages as below:
- Language - select language.
- Existing Wiki - copy the $wgUpgradeKey value from localsettings.php into the screen
- Welcome to MediaWiki! - does checks - resolve any issues, but should be OK to continue
- Connect to database - not required when upgrading an existing wiki
- Upgrade existing installation - click Continue - that should be it. Any error, you can probably just continue again
- Database settings
- Name
- Options
- Install
- Complete!
- Language - select language.
Notes from previous upgrades:
- (May need to recreate users, specifically the owner from the previous site, as well as all other users.)
- Create user, assign all privs for all databases to the admin user, other users don't need as much privilege - check an existing wiki for details
- Reset passwords (must now be 10 mixed characters). Use either of the following:
- Special:PasswordReset - enter username and email address.
- "C:\xampp\php\php.exe" changePassword.php --user=example --password=example
- Place wiki.png from skins/common/images into resources/common
MediaWiki Configuration
- Enable all extensions, but be aware that some may need to be upgraded/have been upgraded by the wiki.
- #wfLoadExtension( 'Variables' ); - doesn't work - not needed - comment out in the LocalSettings.php file
- #wfLoadExtension( 'PdfBook' ); - doesn't work - needed - you will have to manually upgrade the PDF extension - see notes below.
- Fix the logo and copyright icons again if required:
- LocalSettings.php
- $wgRightsIcon = "$wgResourceBasePath/resources/assets/Aptean.png";
- $wgLogo = "$wgResourceBasePath/resources/assets/Aptean.png";
- $wgRightsText = "Copyright ".html_entity_decode('©')." 2008-". date("Y")." Aptean ";
- localsettings.php to override mail, for using gmail, check settings in C:\xampp\htdocs\EPOD\LocalSettings.php. Also have to set up an apppassword against the gmail account.
- Add under $wgShowExceptionDetails: $wgDeprecationReleaseLimit = '1.0'; # Removes deprecation warnings from the system
- LocalSettings.php
- Create the Privacy Policy page if it doesn't exist.
- All content submitted to this documentation will be available to all customers of Aptean.
- Use new version of PdfBook (see my MTS folder - old compatible versions are in Old Versions folder)
- New PDF Book requires PHP8+ -
- Reset the requirement to 7.4 in extension.json
- New PDF Book requires PHP8+ -
- MediaWiki:Pagetitle-view-mainpage - change this text to define the title of the wiki e.g. Assist - Calidus HUB
- Update the main page - the MTS one in my PC is the one with all the best notes in.
- Update the Did You Know page with the common Assist-based help topics - the MTS one in my PC is the one with all the best notes in, including reference to searchable tables below.
- Create PageTemplate and DocTemplate pages - see local MTS assist for details
- MediaWiki:Common.js - add searchable tables code
/* Any JavaScript here will be loaded for all users on every page load. */ // Javascript/jQuery code for searching tables function search_table(tableID, value){ $('#'+tableID+' tr').each(function(){ var found = 'false'; if (!$(this).hasClass('non-searchable')) { $(this).each(function(){ if ($(this).find('td.non-searchable').length > 0) { found = 'true'; } else if (!$(this).find('th').length > 0) { if($(this).text().toLowerCase().indexOf(value.toLowerCase()) >= 0) { found = 'true'; } } else { // Always keep the header row found = 'true'; } }); if(found == 'true') { $(this).show(); } else { $(this).hide(); } } }); } $(document).ready(function(){ // Alternative method - makes all tables with 10 or more rows (including header) searchable automatically // $("table > tbody > tr:nth-child(10)").closest("table").each(function(index, element) { $("table.apt-searchable").each(function(index, element) { var tableID = this.id; if (tableID == '') { tableID = "aptSearchableTable_" + (index + 1); $(this).attr("id", tableID); } $('<input type="text" id="'+tableID+'_'+index+'" onkeyup="search_table(\''+tableID+'\',$(this).val())" placeholder="Search the table..."><input type="button" onclick="$(\'#'+tableID+'_'+index+'\').val(\'\');search_table(\''+tableID+'\',\'\');search_table(\''+tableID+'\',\'\');$(\'#'+tableID+'_'+index+'\').focus();" title="Clear Entry" class="apt-search-clear">').insertBefore($(this)); }); });
- MediaWiki:Group-user.css - add user-show stuff
.apt-user-show {display: block !important;} // code to hide creation of pages on main page if not logged in.
- MediaWiki:Common.css - add searchable tables code and DocLink styles
.apt-search-clear {background: url("images/Clear_Icon.png") no-repeat 5px center; padding:5px 5px 5px 30px; border:0; background-size: 1em;} .apt-doclink {box-sizing: border-box;font-family: "Google Sans", Roboto, Arial, sans-serif;line-height: normal;background: url(images/pdf.png) no-repeat 5px center;background-size: 1.5em;padding: 0.5em 0.5em 0.5em 2.0em;font-size: smaller;}
- Change Template:DocLink to use class rather than inline style - see version in my MTS.
- "Download as PDF" to "Print as PDF" - e.g. "Print as PDF tab in the tab bar, typically on the top of the screen".
- Change Templates:
- All templates - add TemplateData - see my wiki for annotated templates.
- Doc_Title - new format.
- Doc_TitleNew - change OBS logo so it has "|Logo|link=" at the end.
- Doc_Title - change OBS logo so it has "|Logo|link=" at the end.
- MediaWiki:Common.js - remove any editing toolbar js.
- MediaWiki:Vector.js - fix left panel - check the existing code in EPOD
- MediaWiki:Vector.css - h1, h2, h3, h4 {font-family: sans-serif !important;}.
- MediaWiki:Timeless.css - h1,h2,h3,h4, #p-logo-text a {font-family: 'Segoe UI','Segoe UI Emoji','Segoe UI Symbol','Lato','Liberation Sans','Noto Sans','Helvetica Neue','Helvetica',sans-serif !important;} #p-logo-text a { font-variant: normal !important;}.
- Site:About/General Disclaimer/Privacy Policy (from link in footer) - make sure links Aptean, including images. Copy from new MTS site.
- Batch upload the following images from "...\MW-add-files\Images to Upload":
- Geographylogo.png
- hint.png
- pdf.png
- Attention_niels_epting.png
- Bulbgraph.png
Extensions to enable in LocalSettings:
- wfLoadExtension( 'CategoryTree' );
- wfLoadExtension( 'CodeEditor' );
- wfLoadExtension( 'ConfirmEdit' );
- wfLoadExtension( 'InputBox' );
- wfLoadExtension( 'Nuke' );
- wfLoadExtension( 'PageImages' );
- wfLoadExtension( 'ParserFunctions' );
- wfLoadExtension( 'PdfHandler' );
- wfLoadExtension( 'Renameuser' );
- wfLoadExtension( 'TextExtracts' );
- wfLoadExtension( 'WikiEditor' );
The following will be enabled later
- wfLoadExtension( 'PdfBook' );
- wfLoadExtension( 'Variables' );
- require_once "$IP/extensions/NumberFormat/NumberFormat.php";
- require_once "$IP/extensions/GoogleTranslator/GoogleTranslator.php";
- wfLoadExtension( 'TemplateData' );
- wfLoadExtension( 'TemplateWizard' );
- wfLoadExtension( 'VisualEditor' );
- wfLoadExtension( 'Gadgets' );
- wfLoadExtension( 'ReplaceText' );
- wfLoadExtension( 'InterWiki' );
- wfLoadExtension( 'NativeSvgHandler' );
Including all necessary settings for each - see MTS LocalSettings for details
Extensions to remove if enabled and move to old subdirectory for safekeeping:
- HistoryOfPage - just doesn't work - affects OBSHUB.
- MakeArticle - replaced with InputBox
- CreateArticle - replaced with InputBox
- JSpoiler - partially replaced with Group-user.css
- PasswordReset - doesn't work, archived
- LocalisationUpdate - not used
- FCKEditor - not used
- NumberFormat - will be replaced with new version
- WikiForum
- DocumentApproval
- MetaKeywordsTag
Extensions to update if enabled:
- PdfBook
- Variables (will eventually be a problem as is deprecated, but not now)
- NumberFormat
Extensions to add if not present:
- GoogleTranslator
- TemplateWizard
- VisualEditor - should be present in 1.39+
- Gadgets - should be present in 1.39+
- SimpleBatchUpload
- NumberFormat
- Variables
- PdfBook
- PageImages
- When upgrading, it is necessary to run the following to generate the page images. It will take a while:
C:\xampp\php\php.exe C:\xampp\htdocs\calidus-assist\{wikiname}\extensions\PageImages\maintenance\phpinitImageData.php
- TextExtracts
- Popups
Consider the following new extensions:
- Extension:InlineComments - could use in OBS HUB
- Extension:SmartComments - could use in OBS HUB
- https://m.mediawiki.org/wiki/Extension:Restrict_access_by_category_and_group#:~:text=Even%20though%20MediaWiki%20is%20a,php%20file.
- Could use to create customer-specific pages or guides
- create customer pages, categorise them into the group and then make those groups private, then assign those groups to users so that they can see their own pages.
- E.g. create a group DHL. Add DHL to Groups php file. Restrict access to DHL group. Make private through LocalSettings. Create a page into category DHL. Only users given the group permission DHL will be able to see pages in that category.
- Or consider https://www.mediawiki.org/wiki/Extension:AccessControl instead.
- VECancelButton
- Extension:VersionCompare
- Extension:GuidedTour
- Extension:GroupManager
- Extension:GoogleCustomWikiSearch
- Extension:GoogleTranslate - can also save subpages
- (Not yet checked A-F extensions in https://www.mediawiki.org/w/index.php?title=Category:Stable_extensions - there may be others that are useful there.
Gadgets
See Assist Visual Editor Gadgets for details of how to do this.
Add the following gadgets:
- center
- autonumber
Hack Fixes
These are a number of things that may be required on some or all Assists, but commonly OBSHUB is the one that will require most hacks.
- SectionProfiler. Compare current local MW version to that on the install to see what this needs doing. SectionProfiler.php Location: includes/profiler/
- Actually resolved when moving to 1.34, so no issues there.
- OBS Hub:
- Massive issues - Extension: variables might not work now or in the future. Will require a change to all existing specs to replace - a work in progress and can be ignored for now.
- See https://www.mediawiki.org/wiki/Extension:Variables for notes on getting this to work
- bulk replace (excluding templates):
"[[Category:{{#var:Client}} FS]]" with "[[Category:{{#var:Client}} FS]]\r\n[[Category:{{#var:SystemCode}}]]"
"{{#vardefine:System|''CALIDUS'' ePOD}}" with "{{#vardefine:System|''CALIDUS'' ePOD}}\r\n{{#vardefine:SystemCode|EPOD}}]]"
"{{#vardefine:System|''CALIDUS'' ePOD}}" with "{{#vardefine:System|''CALIDUS'' ePOD}}\r\n{{#vardefine:SystemCode|EPOD}}]]"
- Force the bulk edits through from commandline. See extension Extension:Replace Text notes for how to do this (you can access this from Special:Version). Essentially, execute RunJobs.php (perhaps multiple times).
- Update all FS/SDD/REQ with new appendix, or will not produce properly. Note that this may only be required on OBS Hub - others don't use HistoryOfPage.
- Change Templates:
- Doc_Appendix - remove HOP.
- Doc_AppendixNew - remove HOP.
- EstmateCostDetails2020 - £ sign.
- Massive issues - Extension: variables might not work now or in the future. Will require a change to all existing specs to replace - a work in progress and can be ignored for now.
Additional Actions
The following are additional actions that are required, with some sample pages.
- MediaWiki:Pagetitle-view-mainpage - change this text to define the title of the wiki e.g. Assist - OBS Hub
- Update the main page - the MTS one is the one with all the best notes in.
- Update the Did You Know page with the common Assist-based help topics - there is an example in this Assist of a Did You Know page which can be copied or exported, imported and then edited.
- "Download as PDF" to "Print as PDF" - e.g. "Print as PDF tab in the tab bar, typically on the top of the screen".
- MediaWiki:Editundo might be in a different language - reset to "undo" if it is. This was an old upstream problem that seems to regress fairly regularly.
About
CALIDUS TMS System Copyright © 2000-2025 Aptean. All Rights Reserved.
CALIDUS Assist System Copyright © 2011-2025 Aptean. All Rights Reserved.
The information contained herein is the property of Aptean and is supplied without liability for errors or omissions. No part may be reproduced or used except as authorised by contract or other written permission. The copyright and foregoing restriction on reproduction and use extend to all media in which the information may be embodied.
Disclaimer
Copyright Aptean © 2011-2025
The information contained herein is the property of Aptean and is supplied without liability for errors or omissions.
It is also added to and maintained from various other sources outside of Aptean and may be from but not limited to customers of Aptean. No declaration is made that this documentation is up to date or valid for the version of the application being described here, as pertains to the version of the software installed for the customer.
No part may be reproduced or used except as authorised by contract or other written permission. The copyright and foregoing restriction on reproduction and use extend to all media in which the information may be embodied.
Privacy Policy
All content submitted to this documentation is the property of Aptean and will be made available to all customers of Aptean.