Open fol9000 opened 3 months ago
Solved. Try this:
Create the composer.local.json file with the following content:
{
"minimum-stability" : "dev",
"require": {
"mediawiki/chameleon-skin": "dev-master"
}
}
Then run:
composer update --no-dev
https://www.area31.net.br/wiki/Especial:Vers%C3%A3o
my system: Gentoo Linux 2.15 MediaWiki | 1.42.1 PHP | 8.2.20 (apache2handler) ICU | 74.2 MariaDB | 10.6.17-MariaDB Pygments | 2.17.2 Chameleon | 5.0.0-dev
Yes, the MW 1.42 fixes are on the master branch (on the unreleased version 5.0.0).
That exception looks like it is coming from a 4.x version.
So I have a Dockerfile that builds MW:stable. This MW instance has the Chameleon skin and was working perfectly, until I ran the pipeline recently to make a few minor changes. I get this error: "Fatal error: Trait "Wikimedia\NormalizedException\NormalizedExceptionTrait" not found in /var/www/html/includes/Settings/Config/PhpIniSink.php on line 12"
There is a solution described here: https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues/5519#issuecomment-2137684545
I tried that, but only added the NormalizedException package. I then got the AtEase package error, so I thought I was on the right track, and added in the AtEase package as well. The error I got after that was just plain weird and I can't find a solution online for it:
I even tried the solution above but it throws the same error....
I thought it could've been some extension that's deprecated in my LocalSettings.php, so I created a new project with a fresh install of MW:Stable, which ran fine without Chameleon. As soon as I added chameleon in, I got all these errors all over again.
This is my LocalSettings.php:
<?php
error_reporting( E_ALL );
ini_set( 'display_errors', 1 );
if ( !defined( 'MEDIAWIKI' ) ) {
exit;
}
$wgSitename = '${SITE_NAME}';
$wgScriptPath = '';
$wgServer = '${PROTOCOL}://${APP_HOSTNAME}';
$wgResourceBasePath = $wgScriptPath;
$wgLogos = [
'1x' => "$wgResourceBasePath/resources/assets/change-your-logo.svg",
'icon' => "$wgResourceBasePath/resources/assets/change-your-logo.svg",
];
$wgEnableEmail = true;
$wgEnableUserEmail = true; # UPO
$wgEmergencyContact = '<redacted>';
$wgPasswordSender = '<redacted>';
$wgEnotifUserTalk = true; # UPO
$wgEnotifWatchlist = true; # UPO
$wgEmailAuthentication = true;
# Database Settings
require_once "/opt/www-scripts/secure.php";
$wgDBprefix = "mw_";
$wgDBssl = false;
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
$wgSharedTables[] = "actor";
$wgMainCacheType = CACHE_ACCEL;
$wgMemCachedServers = [];
$wgEnableUploads = true;
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = '/usr/bin/convert';
$wgUseInstantCommons = true;
$wgPingback = true;
$wgLanguageCode = 'en-gb';
# Increase Memory Limit
$wgMemoryLimit = "128M";
# Time zone
$wgLocaltimezone = "Europe/London";
date_default_timezone_set( $wgLocaltimezone );
$wgAuthenticationTokenVersion = '1';
$wgRightsPage = "";
$wgRightsUrl = '';
$wgRightsText = '';
$wgRightsIcon = "";
$wgDiff3 = '/usr/bin/diff3';
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['edit'] = false;
## Default skin: you can change the default skin. Use the internal symbolic
## names, e.g. 'vector' or 'monobook':
$wgDefaultSkin = 'chameleon';
# Enabled skins.
# The following skins were automatically enabled:
wfLoadSkin( 'MinervaNeue' );
wfLoadSkin( 'MonoBook' );
wfLoadSkin( 'Timeless' );
wfLoadSkin( 'Vector' );
wfLoadSkin( 'chameleon' );
# Enabled extensions. Most of the extensions are enabled by adding
# wfLoadExtension( 'ExtensionName' );
# to LocalSettings.php. Check specific extension documentation for more details.
# The following extensions were automatically enabled:
wfLoadExtension( 'AbuseFilter' );
wfLoadExtension( 'CategoryTree' );
wfLoadExtension( 'Cite' );
wfLoadExtension( 'CiteThisPage' );
wfLoadExtension( 'CodeEditor' );
wfLoadExtension( 'ConfirmEdit' );
wfLoadExtension( 'Echo' );
wfLoadExtension( 'Gadgets' );
wfLoadExtension( 'ImageMap' );
wfLoadExtension( 'InputBox' );
wfLoadExtension( 'Interwiki' );
wfLoadExtension( 'Linter' );
wfLoadExtension( 'Math' );
wfLoadExtension( 'MultimediaViewer' );
wfLoadExtension( 'Nuke' );
wfLoadExtension( 'OATHAuth' );
wfLoadExtension( 'PageImages' );
wfLoadExtension( 'ParserFunctions' );
wfLoadExtension( 'PdfHandler' );
wfLoadExtension( 'Poem' );
wfLoadExtension( 'ReplaceText' );
wfLoadExtension( 'Scribunto' );
wfLoadExtension( 'SecureLinkFixer' );
wfLoadExtension( 'SpamBlacklist' );
wfLoadExtension( 'SyntaxHighlight_GeSHi' );
wfLoadExtension( 'TemplateData' );
wfLoadExtension( 'TextExtracts' );
wfLoadExtension( 'TitleBlacklist' );
wfLoadExtension( 'WikiEditor' );
wfLoadExtension( 'Bootstrap' );
$wgDebugLogFile = "/var/log/mediawiki/debug.log";
$wgShowExceptionDetails = true;
$wgShowDBErrorBacktrace = true;
$wgShowSQLErrors = true;
Could someone please help? I'm at my wit's end because I've been trying everything for the past 2 weeks but to no avail...
@tjos-bgs your question would be answered more efficiently if you provided the version of MediaWiki, the version of PHP, and the version of the Chameleon theme. :D
Whoops, my bad...
my system: MediaWiki | 1.42.1 PHP | 8.2.20 (apache2handler) MySQL | MySQL Server 9.0.1-1.el9 Chameleon | 5.0.0-dev
Let me know if you require anything else.
Is there any update on this?
@tjos-bgs The original issue here was already fixed on the master branch, which is definitely running correctly on MediaWiki 1.42.1:
Those other missing classes you showed suggest there's an issue in your environment.
What is MW:Stable
? Are you referring to this repo: https://github.com/wikimedia/mediawiki-docker
And how are you installing Chameleon?
Yes, Mediawiki:Stable is the latest stable Docker image. Currently, the latest stable version is either 1.42 or 1.42.1.
I install chameleon via Composer and run via a shell script in the Dockerfile. It's been done like this for the last 2 years and it works (Every other skin works via this method, apart from the most recent Chameleon skin) The Work Directory is /var/www/html, so all commands in the shell script run in this directory
# Composer Install
wget -cO - https://getcomposer.org/composer-2.phar > /tmp/composer.phar
mv /tmp/composer.phar /usr/local/bin/composer
chmod +x /usr/local/bin/composer
rm -rf /tmp/composer.phar
# Composer Commands for Composer 2
export COMPOSER_NO_INTERACTION=1
COMPOSER=/var/www/html/composer.local.json composer update --no-dev -o
FYI, Composer 2 doesn't get downloaded. It still reverts to version 1. With a self-update, composer does get bumped up to version 2, but the errors are still the same.
This is my composer.local.json file:
{
"require": {
"mediawiki/validator": "2.2.*",
"mediawiki/chameleon-skin": "~4.0",
"wikimedia/normalized-exception": "^1.0",
"wikimedia/at-ease": "^2.1"
},
"config": {
"allow-plugins": {
"composer/installers": true,
"wikimedia/composer-merge-plugin": false
}
},
"extra": {
"merge-plugin": {
"include": [
"extensions/*/composer.json",
"skins/*/composer.json"
]
}
}
}
You can try the change the line in composer.local.json to "mediawiki/chameleon-skin": "dev-master",
You can try the change the line in composer.local.json to "mediawiki/chameleon-skin": "dev-master",
Did that as well, as per the suggestion right at the top. Had the same error.
The Solution provided by the @coffnix Worked !,thanks alot man you saved alot of time , i have been struggling to fix this since many weeks !
@coffnix , i have coloured boxes(styles on my current site which was running
Chameleon | 1.3 | GPLv3+ | The Chameleon skin | Stephan Gambke Vector | – | GPL-2.0+ | Kattouw and others
Bootstrap | 1.1.5 | GPLv3+
Below is the screenshot of my current page which has above configuration
I have updated mine to the latest verssion
Chameleon 5.0.0 - Dev Boostrap 5.0.0
i dont see these styles , check below Screenshot PLEASE HELP ME FIX THIS
@vamshinilagiri2 your colour issue is unrelated to this issue, please log a different issue if you feel there is a bug or if something is still unclear. Your old version of Chameleon uses Bootstrap 3, whereas Chameleon 2 and later use Bootstrap 4. Most likely the issue you see is due to different classes for colours/borders/panels. I have not touched Bootstrap 3 in many years, so the best I can suggest right now is to look at the Bootstrap 4 docs to find the new classes: https://getbootstrap.com/docs/4.6
I updated Mediawiki from 1.41.0 to 1.42.1 and I get this Exception. Did I make a mistake or is it a compatibility issue? The updated 1.42.1 runs perfectly with the Vector theme.
Thanks Frank