Page MenuHomePhabricator

Tables not existing
Closed, ResolvedPublic

Description

Author: balbinder.flora

Description:
Hi,
I have followed all the instructions to install Semantic MediaWiki. When I try to enter anything in a page and click on Save Changes, then I get the following error:

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:

(SQL query hidden)

from within function "SMW::updateRedirects". MySQL returned error "1146: Table 'wikidb.bpsmw_redi2' doesn't exist (localhost)".

Please let me know what am I doing wrong, the bp before the smw_redi2 is the prefix for my mediawiki.

Thanks,
/Balbinder


Version: unspecified
Severity: enhancement

Details

Reference
bz19358

Event Timeline

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

This table is created during setup (the installation step where you either go to Special:SMWAdmin and press "Initialise or upgrade tables" or run the maintenance script "SMW_setup.php" on your server). Could you please execute one of those steps and post the output here?

balbinder.flora wrote:

(In reply to comment #0)

Hi,
I have followed all the instructions to install Semantic MediaWiki. When I try
to enter anything in a page and click on Save Changes, then I get the following
error:
A database query syntax error has occurred. This may indicate a bug in the
software. The last attempted database query was:

(SQL query hidden)

from within function "SMW::updateRedirects". MySQL returned error "1146: Table
'wikidb.bpsmw_redi2' doesn't exist (localhost)".
Please let me know what am I doing wrong, the bp before the smw_redi2 is the
prefix for my mediawiki.
Thanks,
/Balbinder

Hi Marcus,

I had already done that setup and tried one more time and this is the message I get.

Setting up standard database configuration for SMW ...

Selected storage engine is "SMWSQLStore2" (or an extension thereof)

Setting up table BPsmw_ids ...

... table exists already, checking structure ...
... column smw_id is fine
... column smw_namespace is fine
... column smw_title is fine
... column smw_iw is fine
... column smw_sortkey is fine
... table `BPsmw_ids` set up successfully.

Please let me know if you need more information on this.

Cheers,
/Balbinder

This is not the normal behaviour. The output starts correctly, but it should report about a number of further tables and finish with the message "The storage engine was set up successfully."

It might help if you could provide the version numbers of SMW and MediaWiki, and of any other extensions that you currently use.

balbinder.flora wrote:

(In reply to comment #3)

This is not the normal behaviour. The output starts correctly, but it should
report about a number of further tables and finish with the message "The
storage engine was set up successfully."

It might help if you could provide the version numbers of SMW and MediaWiki,
and of any other extensions that you currently use.

Hi Marcus,

I am currently on MediaWiki 1.14 & Semantic version 1.4.2 (as per the Release notes). I have one other extension installed (Tasks) and this was after I installed Semantic.

Thanks,
/Balbinder

Strange, nothing unusual here. I am not sure what the problem could be. Two more things might help:

(1) Can you also provide some details (versions) on your Web server, DBMS, and operating system?

(2) Can you try running the script "SMW_setup.php", found in the maintenance directory below the SemanticMediaWiki directory? For this you need command line access to your server, and the PHP command line client. Then simply type "php SMW_setup.php" from within the directory. Maybe the output of this is more helpful.

I still cannot reproduce this bug. Since there has not been any further activity since 4 months, I am closing it now as WORKSFORME.

shalev.ethan wrote:

I just tried installing Semantic Media Wiki, and am encountering the same exact issue.
MediaWiki 1.16.0
PHP 5.3.0 (apache2handler)
MySQL 5.1.36-community-log
Semantic MediaWiki (version 1.5.2)

Clicking the first button in Special:SMWAdmin gives this output:
Setting up standard database configuration for SMW ...

Selected storage engine is "SMWSQLStore2" (or an extension thereof)

Checking table smw_ids ...

Table already exists, checking structure ...
... field smw_id is fine.
... field smw_namespace is fine.
... field smw_title is fine.
... field smw_iw is fine.
... field smw_sortkey is fine.
... done.

When trying to save an entry, I get the following error:
ארעה שגיאת תחביר בשאילתה לבסיס הנתונים. שגיאה זו עלולה להעיד על באג בתוכנה. השאילתה האחרונה שבוצעה לבסיס הנתונים הייתה:

(שאילתת ה־SQL מוסתרת)

מתוך הפונקציה "SMW::updateRedirects". בסיס הנתונים החזיר את השגיאה "1146: Table 'wikidb.smw_redi2' doesn't exist (localhost)".

מקור: http://viki/wiki/index.php/%D7%A2%D7%9E%D7%95%D7%93_%D7%A8%D7%90%D7%A9%D7%99

(that's Hebrew for the same issue...)

shalev.ethan wrote:

Managed to overcome this issue:
For whatever reason, my mediawiki installation has three wikiuser users, under different hosts: %, localhost and localhost.localdomain.

After granting all three of them CREATE, ALTER, DROP privileges, the script ran to its end, and saving entries now works.