Page MenuHomePhabricator

SMW does not work in a mediawiki (that has a table prefix),
Closed, DeclinedPublic

Description

Author: baris.malcioglu

Description:
I am using meidawiki installed on a godaddy deluxe linux hosting plan. Works as expected without SMW

I installed SMW using https://semantic-mediawiki.org/wiki/Help:Installation. No errors reported.

Now whenever I try to create a new page, following error is displayed:

A database query error has occurred. This may indicate a bug in the software.

Query:
SELECT smw_id,smw_sortkey FROM `tips-trickssmw_object_ids` WHERE smw_title = 'Deneme' AND smw_namespace = '0' AND smw_iw = '' AND smw_subobject = '' LIMIT 1
Function: SMWSql3SmwIds::getDatabaseIdAndSort
Error: 1146 Table 'kompitirsoyle.tips-trickssmw_object_ids' doesn't exist (<my db server>)

Version: REL1_22-branch
Severity: blocker

Details

Reference
bz60866

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:55 AM
bzimport set Reference to bz60866.
bzimport added a subscriber: Unknown Object (MLST).
Unknown Object (User) added a comment.Feb 5 2014, 10:12 AM

It might be helpful that you state your MW/SMW version otherwise it will be difficult for a volunteer to categorize your problem.

baris.malcioglu wrote:

Installed software:
Product Version
MediaWiki 1.22.1
PHP 5.3.24 (cgi-fcgi)
MySQL 5.5.33-log

Installed extensions
Semantic extensions
Semantic MediaWiki (Version 1.9.0.2) Making your wiki more accessible - for machines and humans (online documentation) Markus Krötzsch, Jeroen De Dauw, James Hong Kong and others
Special pages
Nuke (Version 1.1.7) Gives administrators the ability to mass delete pages Brion Vibber and Jeroen De Dauw
Renameuser Adds a special page to rename a user (need renameuser right) Ævar Arnfjörð Bjarmason and Aaron Schulz
Parser hooks
Cite Adds <ref[ name=id]> and <references/> tags, for citations Ævar Arnfjörð Bjarmason and Marius Hoch
ImageMap Allows client-side clickable image maps using <imagemap> tag Tim Starling
InputBox (Version 0.1.4) Allow inclusion of predefined HTML forms Erik Moeller, Leonardo Pimenta, Rob Church, Trevor Parscal and DaSch
ParserFunctions (Version 1.5.1) Enhance parser with logical functions Tim Starling, Robert Rohde, Ross McClure and Juraj Simlovic
Poem Adds <poem> tag for poem formatting Nikola Smolenski, Brion Vibber and Steve Sanbeg
SyntaxHighlight (Version 1.0.8.11) Provides syntax highlighting <syntaxhighlight> using GeSHi - Generic Syntax Highlighter Brion Vibber, Tim Starling, Rob Church and Niklas Laxström
DataValues
DataValues (Version 0.1.1) Collection of objects representing various kinds of values Jeroen De Dauw
DataValues Geo (Version 0.1.2) Geographical value objects, parsers and formatters Jeroen De Dauw and The Wikidata team
DataValues Time (Version 0.1) Time value objects, parsers and formatters The Wikidata team
DataValues Validators (Version 0.1) Contains common ValueValidator implementations Jeroen De Dauw and The Wikidata team
DataValuesCommon (Version 0.2) Contains common implementations of the interfaces defined by DataValuesInterfaces Jeroen De Dauw
DataValuesInterfaces (Version 0.1.2) Defines interfaces for ValueParsers, ValueFormatters and ValueValidators Jeroen De Dauw
Other
Gadgets Lets users select custom CSS and JavaScript gadgets in their preferences Daniel Kinzler and Max Semenik
LocalisationUpdate (Version 1.0) Keeps the localised messages as up to date as possible Tom Maaswinkel, Niklas Laxström and Roan Kattouw
MathJax (Version 0.7) Enables MathJax (http://www.mathjax.org/) for typesetting TeX and LaTeX formulae in MediaWiki inside $, \( and <math> (for inline) and $$, \[ and :<math> (for display) math environments. This gives nice and scalable mathematics. The extension also enables the usage of \label{} and \eqref{} tags with automatic formula numbering. If needed you can still hand label by using \tag{}. Dirk Nuyens
Validator (Version 1.0.0.1) Declarative parameter processing library Jeroen De Dauw
WikiEditor (Version 0.3.1) Provides an extendable wikitext editing interface and many feature-providing modules Trevor Parscal, Roan Kattouw, Nimish Gautam and Adam Mille

Unknown Object (User) added a comment.Feb 5 2014, 10:30 AM

A database query error has occurred. This may indicate a bug in the software.

Query:
SELECT smw_id,smw_sortkey FROM `tips-trickssmw_object_ids` WHERE

smw_title

'Deneme' AND smw_namespace = '0' AND smw_iw = '' AND smw_subobject = ''

LIMIT
1

Function: SMWSql3SmwIds::getDatabaseIdAndSort
Error: 1146 Table 'kompitirsoyle.tips-trickssmw_object_ids' doesn't exist

(<my db server>)

It might be helpful to have the full stacktrace [1].

I'm guessing $wgDBprefix = tips-tricks (is the prefix) but what is kompitirsoyle?

[1] http://www.semantic-mediawiki.org/wiki/Help:Identifying_bugs

baris.malcioglu wrote:

I have done the suggested debugging modifications. The full output follows:

A database query error has occurred. This may indicate a bug in the software.

Query:
SELECT smw_id,smw_sortkey FROM `tips-trickssmw_object_ids` WHERE smw_title = 'Deneme' AND smw_namespace = '0' AND smw_iw = '' AND smw_subobject = '' LIMIT 1
Function: SMWSql3SmwIds::getDatabaseIdAndSort
Error: 1146 Table 'kompitirsoyle.tips-trickssmw_object_ids' doesn't exist (<database server>)

Notice: Uncommitted DB writes (transaction from DatabaseBase::query (WikiPage::pageData)). in ...html/tips-tricks/includes/db/Database.php on line 3944

Additionally:
$wgDBprefix = tips-tricks
$wgDBname = "kompitirsoyle"

baris.malcioglu wrote:

I think I've already done it (check: the bash history says so) , but if I try to run the update again I receive the following error:

[c216a583] [no req] Exception from line 133 of .../html/tips-tricks/includes/objectcache/ObjectCache.php: CACHE_ACCEL requested but no suitable object cache is present. You may want to install APC.
Backtrace:
#0 [internal function]: ObjectCache::newAccelerator(array)
#1 .../html/tips-tricks/includes/objectcache/ObjectCache.php(85): call_user_func(string, array)
#2 .../html/tips-tricks/includes/objectcache/ObjectCache.php(72): ObjectCache::newFromParams(array)
#3 .../html/tips-tricks/includes/objectcache/ObjectCache.php(44): ObjectCache::newFromId(integer)
#4 .../html/tips-tricks/includes/GlobalFunctions.php(3836): ObjectCache::getInstance(integer)
#5 .../html/tips-tricks/includes/Setup.php(504): wfGetMainCache()
#6 .../html/tips-tricks/maintenance/doMaintenance.php(106): require_once(string)
#7 .../html/tips-tricks/maintenance/update.php(187): require_once(string)
#8 {main}

Unknown Object (User) added a comment.Feb 5 2014, 1:00 PM

[c216a583] [no req] Exception from line 133 of
.../html/tips-tricks/includes/objectcache/ObjectCache.php: CACHE_ACCEL
requested but no suitable object cache is present. You may want to install
APC.
Backtrace:
#0 [internal function]: ObjectCache::newAccelerator(array)
#1 .../html/tips-tricks/includes/objectcache/ObjectCache.php(85):
call_user_func(string, array)
#2 .../html/tips-tricks/includes/objectcache/ObjectCache.php(72):
ObjectCache::newFromParams(array)
#3 .../html/tips-tricks/includes/objectcache/ObjectCache.php(44):
ObjectCache::newFromId(integer)
#4 .../html/tips-tricks/includes/GlobalFunctions.php(3836):
ObjectCache::getInstance(integer)
#5 .../html/tips-tricks/includes/Setup.php(504): wfGetMainCache()
#6 .../html/tips-tricks/maintenance/doMaintenance.php(106):
require_once(string)
#7 .../html/tips-tricks/maintenance/update.php(187): require_once(string)
#8 {main}

update.php is essential and needs to run successfully otherwise SMW isn't setup correctly. Above message is unrelated to SMW, and should be solved first before continuing with the SMW setup.

PS: The error message above CACHE_ACCEL requested but no suitable object cache is present. You may want to install APC. hints that APC needs to available in order to allow a CACHE_ACCEL configuration to go forward.

baris.malcioglu wrote:

update.php is essential and needs to run successfully otherwise SMW isn't
setup
correctly. Above message is unrelated to SMW, and should be solved first
before
continuing with the SMW setup.

PS: The error message above `CACHE_ACCEL requested but no suitable object
cache
is present. You may want to install APC.` hints that APC needs to available
in
order to allow a CACHE_ACCEL configuration to go forward.

I am not willing to (and probably can't anyway) install a CACHE_ACCEL mechanism.

This is optional in Mediawiki, and Mediawiki without SMW used to work perfectly.

Is there a way to uninstall SMW?

Unknown Object (User) added a comment.Feb 5 2014, 1:14 PM

I am not willing to (and probably can't anyway) install a CACHE_ACCEL
mechanism.

I'm not sure what your LocalSettings are but in that case you should use CACHE_ANYTHING instead of CACHE_ACCEL.

This is optional in Mediawiki, and Mediawiki without SMW used to work
perfectly.

Is there a way to uninstall SMW?

Just delete the database and follow [1].

[1] https://semantic-mediawiki.org/wiki/Composer#Remove_packages

baris.malcioglu wrote:

There is a
$wgParserCacheType = CACHE_NONE;
in my LocalSettings

inspired by your suggestion, I have also commented out
$wgMemCachedServers = array();

Now the update is working.

Thanks