Page MenuHomePhabricator

PrefStatsHooks require a DB that doesnot exist.
Closed, InvalidPublic

Description

Author: alfred.maghi

Description:
When I had the following in localsettings:

$wgDBname = "wiki_gerard";
[...]
require_once("$IP/extensions/UsabilityInitiative/PrefStats/PrefStats.php");
$wgPrefStatsTrackPrefs = array( 'skin' => 'vector', 'usebetatoolbar' => 1 );
$wgGroupPermissions['sysop']['prefstats'] = true;
$wgPrefStatsTimeUnit = 60*60*24;

I had a mysql error:

« PrefStatsHooks::save ». MySQL send error « 1146 : Table 'wiki_gerard.gerardprefstats' doesn't exist (localhost) ».

and with commented the following:

require_once("$IP/extensions/UsabilityInitiative/PrefStats/PrefStats.php");
$wgPrefStatsTrackPrefs = array( 'skin' => 'vector', 'usebetatoolbar' => 1 );
$wgGroupPermissions['sysop']['prefstats'] = true;
$wgPrefStatsTimeUnit = 60*60*24;

it works well.

So README should be fixed, as it doesn't state anything on the following bug. http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/UsabilityInitiative/README


Version: unspecified
Severity: major

Details

Reference
bz19553

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:39 PM
bzimport set Reference to bz19553.

alfred.maghi wrote:

(In reply to comment #0)

I had a mysql error:

... on creation of user account.

Run the update.php script, it'll create the table.

cnit wrote:

I am trying to use MediaWiki js2-work r61085 and UsabilityInitiative r61086 together, installed "cleanly from scratch". In the file 'extensions/UsabilityInitiative/README' there's no instruction to run the update.php. I've installed js2-work r61085 via the web /config installer.
I confirm that after using update.php the table was succesfully created.
However, I think it's unusual approach to use update.php for such wikis, installed from scratch. Either a web installer or an extension itself should have created the table. I hope this will be fixed in the release.