Closed OAuthority closed 1 month ago
This seems to happen when disabling extensions like CodeEditor too, so I don't think its being caused by that.
I managed to fix this with the addition of:
$wgLocalFileRepo = [
'class' => LocalRepo::class,
'name' => 'local',
'backend' => 'AmazonS3',
'url' => $wgUploadBaseUrl ? $wgUploadBaseUrl . $wgUploadPath : $wgUploadPath,
'scriptDirUrl' => $wgScriptPath,
'hashLevels' => 2,
'thumbScriptUrl' => $wgThumbnailScriptPath,
'transformVia404' => true,
'useJsonMetadata' => true,
'useSplitMetadata' => true,
'deletedHashLevels' => 3,
'abbrvThreshold' => 160,
'isPrivate' => $cwPrivate,
'zones' => $cwPrivate
? [
'thumb' => [ 'url' => "$wgScriptPath/thumb_handler.php" ] ]
: [],
];
This wasn't necessary in 1.39? Is it now necessary to define this in addition to the AWS extension config?
I managed to fix this with the addition of:
It shouldn't have had any effect.
If $wgAWSBucketName
is defined, then this extension completely overwrites $wgLocalFileRepo
.
I suspect that the way in which you are configuring the wiki results in $wgAWSBucketName
being set too late (after AmazonS3Hooks::setup()
has already been called). When this function doesn't find $wgAWSBucketName
, it skips auto-configuration of $wgLocalFileRepo
.
Interesting -- the way I have configured $wgAWSBucketName hasn't changed between 1.39 and 1.41, its defined in the exact same place at the top of $wgConf as it was in 1.39 which worked seamlessly.
Perhaps there was some other change in 1.41 core which has caused this; notwithstanding that, the workaround I posted above works fine so I'll use that.
If anyone else has this problem, please use the workaround above, it is the correct/intended way.
I considered changing the extension to call AmazonS3Hooks::setup()
later (when $wgConf
has already been applied), but it might cause other issues (e.g. if some extension uses FileBackend very early), so let's not do this for now.
There seems to be some kind of issue with MediaWiki 1.41 and this extension.
I'm using the same configuration that was being used for MediaWiki 1.39, which worked perfectly:
So nothing has changed there, and the extension is still loaded. I don't think this is anything I'm doing on my end? Running the master branch on 1.41.2.