SemanticMediaWiki / SemanticMetaTags

Allows to generate HTML <meta> elements from semantic annotations
https://www.semantic-mediawiki.org/wiki/Extension:Semantic_Meta_Tags
Other
12 stars 6 forks source link

SMT interferes with rebuldData.php und setupStore.php #78

Closed krabina closed 11 months ago

krabina commented 11 months ago

Setup and configuration

Issue

rebuildData.php runs without any special errors (it runs somewhat faster), but the wiki seems not to store any data. Effects I encountered:

Then I realized that if I comment out SMT, rebuildData is working again.

It seems that there is a general, mayor problem with SMW probably not being compatible with SMW 4.1.2 and/or MW 1.39.

On another, working wiki, enabling SMT and running update.php resulted in the following error:

Checking table smw_object_ids ...
   Table already exists, checking structure ...
   ... changing type of field smw_id from 'INT UNSIGNED NOT NULL AUTO_INCREMENT' to 'INT(11) UNSIGNED NOT NULL KEY AUTO_INCREMENT' ... Wikimedia\Rdbms\DBQueryError from line 1618 of includes/libs/rdbms/database/Database.php: Error 1091: Can't DROP 'PRIMARY'; check that column/key exists
Function: SMW\SQLStore\TableBuilder\MySQLTableBuilder::doUpdateFieldType
Query: ALTER TABLE `smw_object_ids` DROP PRIMARY KEY

#0 includes/libs/rdbms/database/Database.php(1602): Wikimedia\Rdbms\Database->getQueryException()
#1 includes/libs/rdbms/database/Database.php(1576): Wikimedia\Rdbms\Database->getQueryExceptionAndLog()
#2 includes/libs/rdbms/database/Database.php(952): Wikimedia\Rdbms\Database->reportQueryError()
#3 includes/libs/rdbms/database/DBConnRef.php(103): Wikimedia\Rdbms\Database->query()
#4 includes/libs/rdbms/database/DBConnRef.php(293): Wikimedia\Rdbms\DBConnRef->__call()
#5 extensions/SemanticMediaWiki/src/SQLStore/TableBuilder/MySQLTableBuilder.php(231): Wikimedia\Rdbms\DBConnRef->query()
#6 extensions/SemanticMediaWiki/src/SQLStore/TableBuilder/MySQLTableBuilder.php(201): SMW\SQLStore\TableBuilder\MySQLTableBuilder->doUpdateFieldType()
#7 extensions/SemanticMediaWiki/src/SQLStore/TableBuilder/MySQLTableBuilder.php(131): SMW\SQLStore\TableBuilder\MySQLTableBuilder->doUpdateField()
#8 extensions/SemanticMediaWiki/src/SQLStore/TableBuilder/TableBuilder.php(159): SMW\SQLStore\TableBuilder\MySQLTableBuilder->doUpdateTable()
#9 extensions/SemanticMediaWiki/src/SQLStore/Installer.php(229): SMW\SQLStore\TableBuilder\TableBuilder->create()
#10 extensions/SemanticMediaWiki/src/SQLStore/SQLStore.php(456): SMW\SQLStore\Installer->install()
#11 extensions/SemanticMediaWiki/src/Store.php(490): SMW\SQLStore\SQLStore->setup()
#12 includes/installer/DatabaseUpdater.php(547): SMW\Store::setupStore()
#13 includes/installer/DatabaseUpdater.php(515): DatabaseUpdater->runUpdates()
#14 maintenance/update.php(209): DatabaseUpdater->doUpdates()
#15 maintenance/includes/MaintenanceRunner.php(309): UpdateMediaWiki->execute()
#16 maintenance/doMaintenance.php(85): MediaWiki\Maintenance\MaintenanceRunner->run()
#17 maintenance/update.php(319): require_once('/srv/ma01/wiki/...')
#18 {main}

This error remains, even if you disable SMT and run it again. The only thing that helps is to delete the SMW store and start over again!

krabina commented 11 months ago

for documentation purposes: it seems that this issue is completely unrelated to SMT. Could be related to a SMW bug, though. What seemed to help (as far as I can tell now) is to completely copy over the MW sources, do a composer update, update.php. After that rebuildData seems to work again.