Page MenuHomePhabricator

"Invalid object cache type "none" requested. It is not present in $wgObjectCaches" after picking up defaults in the WebInstaller
Closed, ResolvedPublic

Description

How to reproduce; using git master:

`
+ git -C . log --oneline -1
5c63cce Merge "ApiQueryAllRevisions: Actually use 'start' and 'end'"
+ git -C vendor log --oneline -1
5efd7d7 Update OOjs UI to v0.12.12
+ git -C skins/Vector log --oneline -1
9f5f333 Localisation updates from https://translatewiki.net.
`

After configuring the database connection select advanced options ("Ask me more questions") and hit "Continue".

Pick up the defaults ("No caching (no functionality is removed, but speed may be impacted on larger wiki sites)" among others ) and hit "Continue"

An unstyled screen appears:

Install

By pressing "Continue →", you will begin the installation of MediaWiki. If you still want to make changes, press "← Back".

Hit "Continue ->"

An unstyled page is generated with an exception:

MediaWiki 1.27alpha installation

    Language
    Existing wiki
    Welcome to MediaWiki!
    Connect to database
    Upgrade existing installation
    Database settings
    Name
    Options
    Install
    Complete!


    Restart installation

Install

    Setting up database... done
    Creating tables...

    [22dd363a] /~saper/ybabel/mw-config/index.php?page=Install MWException from line 123 of /usr/home/saper/public_html/ybabel/includes/objectcache/ObjectCache.php: Invalid object cache type "none" requested. It is not present in $wgObjectCaches.

    Backtrace:

    #0 /usr/home/saper/public_html/ybabel/includes/objectcache/ObjectCache.php(91): ObjectCache::newFromId(string)
    #1 /usr/home/saper/public_html/ybabel/includes/objectcache/ObjectCache.php(307): ObjectCache::getInstance(string)
    #2 /usr/home/saper/public_html/ybabel/includes/GlobalFunctions.php(3589): ObjectCache::getLocalClusterInstance()
    #3 /usr/home/saper/public_html/ybabel/includes/db/DatabaseMysqlBase.php(690): wfGlobalCacheKey(string, string)
    #4 /usr/home/saper/public_html/ybabel/includes/db/Database.php(3485): DatabaseMysqlBase->getApproximateLagStatus()
    #5 /usr/home/saper/public_html/ybabel/includes/installer/DatabaseInstaller.php(192): DatabaseBase->begin(string)
    #6 /usr/home/saper/public_html/ybabel/includes/installer/DatabaseInstaller.php(218): DatabaseInstaller->stepApplySourceFile(string, string, boolean)
    #7 [internal function]: DatabaseInstaller->createTables(MysqlInstaller)
    #8 /usr/home/saper/public_html/ybabel/includes/installer/Installer.php(1596): call_user_func(array, MysqlInstaller)
    #9 /usr/home/saper/public_html/ybabel/includes/installer/WebInstallerPage.php(1407): Installer->performInstallation(array, array)
    #10 /usr/home/saper/public_html/ybabel/includes/installer/WebInstaller.php(280): WebInstallerInstall->execute()
    #11 /usr/home/saper/public_html/ybabel/mw-config/index.php(77): WebInstaller->execute(array)
    #12 /usr/home/saper/public_html/ybabel/mw-config/index.php(36): wfInstallerMain()
    #13 {main}

Event Timeline

saper created this task.Oct 23 2015, 12:34 PM
saper raised the priority of this task from to Needs Triage.
saper updated the task description. (Show Details)
saper added a project: MediaWiki-Installer.
saper added a subscriber: saper.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 23 2015, 12:34 PM
saper set Security to None.
saper added a subscriber: aaron.

The page Install page is unstyled because the stylesheet throws an exception:

`
[e24e195f] /~saper/ybabel/mw-config/index.php?css=1 MWException from line 123 of /usr/home/saper/public_html/ybabel/includes/objectcache/ObjectCache.php: Invalid object cache type "none" requested. It is not present in $wgObjectCaches.

Backtrace:

#0 /usr/home/saper/public_html/ybabel/includes/objectcache/ObjectCache.php(91): ObjectCache::newFromId(string)
#1 /usr/home/saper/public_html/ybabel/includes/objectcache/ObjectCache.php(307): ObjectCache::getInstance(string)
#2 /usr/home/saper/public_html/ybabel/includes/GlobalFunctions.php(3589): ObjectCache::getLocalClusterInstance()
#3 /usr/home/saper/public_html/ybabel/includes/utils/FileContentsHasher.php(65): wfGlobalCacheKey(string, string, integer, string)
#4 /usr/home/saper/public_html/ybabel/includes/utils/FileContentsHasher.php(109): FileContentsHasher->getFileContentsHashInternal(string, string)
#5 [internal function]: FileContentsHasher::{closure}(string)
#6 /usr/home/saper/public_html/ybabel/includes/utils/FileContentsHasher.php(110): array_map(Closure, array)
#7 /usr/home/saper/public_html/ybabel/includes/resourceloader/ResourceLoaderFileModule.php(995): FileContentsHasher::getFileContentsHash(array)
#8 /usr/home/saper/public_html/ybabel/includes/resourceloader/ResourceLoaderFileModule.php(907): ResourceLoaderFileModule->compileLessFile(string, ResourceLoaderContext)
#9 /usr/home/saper/public_html/ybabel/includes/resourceloader/ResourceLoaderFileModule.php(878): ResourceLoaderFileModule->readStyleFile(string, boolean, ResourceLoaderContext)
#10 /usr/home/saper/public_html/ybabel/includes/installer/WebInstallerOutput.php(175): ResourceLoaderFileModule->readStyleFiles(array, boolean, ResourceLoaderContext)
#11 /usr/home/saper/public_html/ybabel/includes/installer/WebInstaller.php(1214): WebInstallerOutput->getCSS()
#12 /usr/home/saper/public_html/ybabel/includes/installer/WebInstaller.php(185): WebInstaller->outputCss()
#13 /usr/home/saper/public_html/ybabel/mw-config/index.php(77): WebInstaller->execute(array)
#14 /usr/home/saper/public_html/ybabel/mw-config/index.php(36): wfInstallerMain()
#15 {main}
aaron added a comment.Oct 23 2015, 5:10 PM

Seems like the installer meant to set CACHE_NONE but used 'none' instead.

aaron added a comment.Oct 23 2015, 5:30 PM

Is the bogus 'none' value actually making it to LocalSettings?

saper added a comment.Oct 23 2015, 6:35 PM

Thanks. I wonder how a variable that is supposed only to influence generation of LocalSettings.php gets actually used for the installer itself.

Change 248485 had a related patch set uploaded (by saper):
Don't pollute global namespace with session variables

https://gerrit.wikimedia.org/r/248485

Change 248493 had a related patch set uploaded (by saper):
Installer: use _MainCacheType form variable

https://gerrit.wikimedia.org/r/248493

saper added a comment.Oct 23 2015, 9:43 PM

Those two changes https://gerrit.wikimedia.org/r/248493 and https://gerrit.wikimedia.org/r/248485 are orthogonal and just one of them suffices to fix the issue.

Change 248485 merged by jenkins-bot:
Web installer should not pollute global namespace with session variables

https://gerrit.wikimedia.org/r/248485

Change 248493 merged by jenkins-bot:
Installer: use _MainCacheType form variable

https://gerrit.wikimedia.org/r/248493

saper closed this task as Resolved.Oct 27 2015, 5:50 PM
saper claimed this task.