How to migrate to SMWSQLStore3 without shell access?
Thanks for the suggestion kgh, but I think it doesn't work.
When I generate new tables it says:
Setting up standard database configuration for SMW ... Selected storage engine is "SMWSQLStore2" (or an extension thereof)
So this doesn't update the SQLStore format it seems.
Any other suggestions?
Probably you added $smwgDefaultStore = 'SMWSQLStore2';
to your LocalSettings.php before doing this.
This worked for me:
- Back up you installation and database
- Set
$wgReadOnly = 'site maintenance';
in your LocalSettings.php - Move the new files for SMW and Validator into the extensions directory
- Go to Special:SMW-Admin and hit "Initialise and upgrade tables"
- Return to Special:SWM-Admin and hit "Start updating data"
- Add
$smwgDefaultStore = 'SMWSQLStore2';
to your LocalSettings.php below the enableSemantics line - Comment out
$wgReadOnly = 'site maintenance';
- After the data refresh is done you do step 2) again
- Comment out
$smwgDefaultStore = 'SMWSQLStore2';
in your LocalSettings.php - Do step 5) again
- Do step 6) again
- Remove
$wgReadOnly = 'site maintenance';
from your LocalSettings.php - After the second data refresh is done you remove
$smwgDefaultStore = 'SMWSQLStore2';
from your LocalSettings.php - Voilà, your are on SMWSQLStore3. Paradise regained. :)
I also posted this to the mailing list.
Finally took the time to check your suggested procedure (thanks for it!).
On my test wiki the procedure worked.
On my "real" wiki it fails - as soon as I uncomment $smwgDefaultStore = 'SMWSQLStore2';
I get the following error message on all pages:
MediaWiki internal error. Original exception: exception 'DBQueryError' with message 'A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script Query: SELECT smw_id,smw_sortkey FROM `smw_object_ids` WHERE smw_title = 'Hauptseite' AND smw_namespace = '0' AND smw_iw = '' AND smw_subobject = '' LIMIT 1 Function: SMWSql3SmwIds::getDatabaseIdAndSort Error: 1146 Table 'usr_xy_9.smw_object_ids' doesn't exist (localhost) ' in /var/www/xy/html/secret_wiki/mediawiki/includes/db/Database.php:918 Stack trace: #0 /var/www/xy/html/secret_wiki/mediawiki/includes/db/Database.php(885): DatabaseBase->reportQueryError('Table 'usr_web1...', 1146, 'SELECT smw_id,...', 'SMWSql3SmwIds::...', false) #1 /var/www/xy/html/secret_wiki/me... ... ...
I tried to run the update script (via webinstaller) but it gives me a white screen after the first step.
On my test wiki there was also an error message (at least on the front page) when I uncommented $smwgDefaultStore = 'SMWSQLStore2';
(between steps 3 and 4 if you like).
But this error was only shown in the content area and said something like: "MySQL error - couldn't access table smw_objects_id..."
Any help? Thanks!
I guess the tables were not created. What happened when doing step 4 via Special:SMW-Admin?
I couldn't even get to step 4.
I transfered the new files (SMW 1.8) to my server and called the directory "SemanticMediaWiki_new". If I don't have the line $smwgDefaultStore = 'SMWSQLStore2'; and I rename the directory to "SemanticMediaWiki" (so that it becomes active) I immediately get the error message.
If I have the line $smwgDefaultStore = 'SMWSQLStore2'; it works and SMW 1.8 is shown in Special:Version (like it is now) - but as soon as I remove the line I get the error...
I am quite sure that you are not on Special:SMW-Admin when getting this error. What happens if you enter the URL to Special:SMW-Admin directly in the browser?
I'm pretty sure I tested this as well and received the same error message...
Is it maybe a problem if I have two directories with SMW in my extensions folder - one called "SemanticMediaWiki", the other one called "SemanticMediaWiki_old" ?
My fault - it seems I wasn't at Special:SMW-Admin when I received the errors in February.
Now I managed to update my database to SMWSQLStore3 :)
I ran the database update twice (as you suggested). Just for curiosity: Why does it need to run two times?
Ouch, I did not notice you post of Feb. 9, 2013 or forgot to answer O_o. Cool that it worked out for you. It would have been really really weird if you were on Special:SMW-Admin and receiving this error. I think that Markus posted to the mailing list on why the refresh has to be done twice. I cannot remember what it was, but it is definitely necessary since to my experience only about two thirds of the job is done in the first run.