Last modified: 2012-11-08 14:24:40 UTC
When trying to use the SwiftCloudFiles extension with MediaWiki 1.20+ the upload page reports "SwiftCloudFiles extension not installed." This issue occurred with the 1.20.0beta0 build as well as 1.21alpha downloaded on October 10th. According to the "Special:Version page" the extension is installed: "SwiftCloudFiles (Version 1.7.10-wmf)" The following is the error and debug info: Internal error Jump to: navigation, search SwiftCloudFiles extension not installed. Backtrace: #0 /var/www/html/includes/filebackend/FileBackendGroup.php(154): SwiftFileBackend->__construct(Array) #1 /var/www/html/includes/filerepo/FileRepo.php(83): FileBackendGroup->get('localSwift') #2 /var/www/html/includes/filerepo/RepoGroup.php(380): FileRepo->__construct(Array) #3 /var/www/html/includes/filerepo/RepoGroup.php(368): RepoGroup->newRepo(Array) #4 /var/www/html/includes/filerepo/RepoGroup.php(295): RepoGroup->initialiseRepos() #5 /var/www/html/includes/filerepo/RepoGroup.php(330): RepoGroup->getRepo('local') #6 /var/www/html/includes/GlobalFunctions.php(3481): RepoGroup->getLocalRepo() #7 /var/www/html/includes/specials/SpecialUpload.php(512): wfLocalFile('') #8 /var/www/html/includes/specials/SpecialUpload.php(220): SpecialUpload->getWatchCheck() #9 /var/www/html/includes/specials/SpecialUpload.php(181): SpecialUpload->getUploadForm() #10 /var/www/html/includes/SpecialPage.php(599): SpecialUpload->execute(NULL) #11 /var/www/html/includes/SpecialPageFactory.php(497): SpecialPage->run(NULL) #12 /var/www/html/includes/Wiki.php(291): SpecialPageFactory::executePath(Object(Title), Object(RequestContext)) #13 /var/www/html/includes/Wiki.php(554): MediaWiki->performRequest() #14 /var/www/html/includes/Wiki.php(447): MediaWiki->main() #15 /var/www/html/index.php(59): MediaWiki->run() #16 {main} The error is apparently being thrown by the following code blurb in 88- public function __construct( array $config ) { 89- parent::__construct( $config ); 90- if ( !MWInit::classExists( 'CF_Constants' ) ) { 91: throw new MWException( 'SwiftCloudFiles extension not installed.' ); 92- } 93- // Required settings 94- $this->auth = new CF_Authentication( Sanitized swift config block from LocalSettings.php attached.
Created attachment 11177 [details] Sanitized Swift config block from LocalSettings.php
Forgot to include the file I grepped. The code was from includes/filebackend/SwiftFileBackend.php. [root@wiki-node2 html]# grep "SwiftCloudFiles extension not installed" includes/filebackend/SwiftFileBackend.php -C 3 -n 88- public function __construct( array $config ) { 89- parent::__construct( $config ); 90- if ( !MWInit::classExists( 'CF_Constants' ) ) { 91: throw new MWException( 'SwiftCloudFiles extension not installed.' ); 92- } 93- // Required settings 94- $this->auth = new CF_Authentication( And the extension files do exist: [root@wiki-node2 html]# ls extensions/ README SwiftCloudFiles [root@wiki-node2 html]# ls extensions/SwiftCloudFiles/ php-cloudfiles-1.7.10 SwiftCloudFiles.i18n.php SwiftCloudFiles.php [root@wiki-node2 html]#
What version (git commit #) of CloudFiles are you using? Does it actually have CF_Constants?
Okay, user error. I had the 1.19 version and hadn't downloaded the new extension version when I downloaded mediawiki 1.20. When I use the "git master" snapshot from http://www.mediawiki.org/wiki/Extension:SwiftCloudFiles this error goes away. Closing this bug as invalid. However, some better "idiot lights" would be nice to check for versioning. (Hopefully this bug will provide some hints to others, as I just got the code.)