Oh, wow - looking through the error trace you sent out, it seems like the culprit is actually my Semantic Forms extension: the code that checks whether to place an "edit with form" tab isn't supposed to be called for "Special" pages as well, but in this one rare case it is - somehow, I guess, before SMW gets fully initialized, "Special:SMWAdmin" doesn't realize that it's a "Special" page - and then SF goes to look up the page's semantic data, and fails.

This will be fixed in the next version of Semantic Forms, which I was planning to release soon; but if you want, you can fix it in your code by changing the "if" statement at the top of the function sffFormEditTab() in includes/SF_FormEditTab.php to read:

        if (isset($obj->mTitle) &&
                ($obj->mTitle->getNamespace() != NS_CATEGORY) &&
                ($obj->mTitle->getNamespace() != NS_SPECIAL)) {

If you try it out, please let me know if it works.

-Yaron


On Mon, Dec 22, 2008 at 10:52 AM, Jonathan D. Greene <jonathan.greene@harris.com> wrote:
Warning:
<newbie comment>
I saw a similar issue during my SMW installation, had to (temporarily) give highest mysql privs to SMW for it to create the tables.
(Thought that was just the way it was)
</newbie comment>

Yaron Koren wrote:
Ah, okay, it looks like you fixed the last problem.

This new problem, is thornier, and it's one I've recently seen before: you're supposed to be able to go to Special:SMWAdmin in order to create the SMW database tables, but going to that page gives an error because those tables haven't been created yet. It makes it, I think, impossible to set everything up from the web interface. I think this problem only showed up in SMW 1.4, and it's hard to debug because the call that requires the presence of the SMW tables only seems to happen before those tables get created; I don't know where it's coming from (it shouldn't be happening). Markus or any other developers, any idea what's causing it?

-Yaron


On Mon, Dec 22, 2008 at 9:12 AM, Stephen B. Duff <duffsb@comcast.net <mailto:duffsb@comcast.net>> wrote:

   Hello Yaron,

   Thank you for the quick reply! I checked my LocalSettings.php file and
   unfortunately, my line was already written as you suggested in
   your reply:

   ## If you have the appropriate support software installed
   ## you can enable inline LaTeX equations:
   $wgUseTeX           = false;

   $wgLocalInterwiki   = $wgSitename;

   $wgLanguageCode = "en";

   The only other thing I can think of is position in the
   LocalSettings.php
   file where the code for Semantic Mediawiki should be located. I
   moved the
   configuration entries for Semantic Mediawiki below the line for
   language and
   get the following output on loading the site (these appear to be
   related to
   my inability to run the setup file. Is this correct? Or is this
   some other
   problem with my installation?

   Is it possible to run the setup file from the web passing
   arguments to the
   setup program:

   http://www.jefferson-wiki.com/wiki/extensions/SemanticMediaWiki/maintenance/
   SMW_setup.php
   <http://www.jefferson-wiki.com/wiki/extensions/SemanticMediaWiki/maintenance/SMW_setup.php>

   The other option would be to run a PHP program that makes
   modifications to
   the database to make it compatible with Semantic Mediawiki. Can I
   modify the
   database by hand or using MySQL tools? Any suggestions?

   Thanks,

   Steve
   -------------------

   This is the output when I load:
   http://www.jefferson-wiki.com/wiki/index.php?title=Main_Page


   MediaWiki internal error.

   Original exception: exception 'DBQueryError' with message 'A
   database error
   has occurred
   Query: SELECT smw_id,smw_iw,smw_sortkey FROM `smw_ids` WHERE
   smw_title='Main' AND smw_namespace='4' AND (smw_iw='' OR
   smw_iw=':smw-redi')
   LIMIT 1
   Function: SMW::getSMWPageID
   Error: 1146 Table 'jeffers4_wiki1.smw_ids' doesn't exist (localhost)
   ' in /home/jeffers4/public_html/wiki/includes/db/Database.php:606
   Stack trace:
   #0 /home/jeffers4/public_html/wiki/includes/db/Database.php(561):
   Database->reportQueryError('Table 'jeffers4...', 1146, 'SELECT
   smw_id,...',
   'SMW::getSMWPage...', false)
   #1 /home/jeffers4/public_html/wiki/includes/db/Database.php(969):
   Database->query('SELECT smw_id,...', 'SMW::getSMWPage...')
   #2
   /home/jeffers4/public_html/wiki/extensions/SemanticMediaWiki/includes/storag
   e/SMW_SQLStore2.php(1665): Database->select('smw_ids', Array,
   'smw_title='Main...', 'SMW::getSMWPage...', Array)
   #3
   /home/jeffers4/public_html/wiki/extensions/SemanticMediaWiki/includes/storag
   e/SMW_SQLStore2.php(1635):
   SMWSQLStore2->getSMWPageIDandSort('Main', 4, '',
   '', true)
   #4
   /home/jeffers4/public_html/wiki/extensions/SemanticMediaWiki/includes/storag
   e/SMW_SQLStore2.php(340): SMWSQLStore2->getSMWPageID('Main', 4, '')
   #5
   /home/jeffers4/public_html/wiki/extensions/SemanticForms/includes/SF_GlobalF
   unctions.php(332): SMWSQLStore2->getPropertyValues(Object(Title),
   Object(SMWPropertyValue))
   #6
   /home/jeffers4/public_html/wiki/extensions/SemanticForms/includes/SF_GlobalF
   unctions.php(586): sffGetDefaultForm()
   #7
   /home/jeffers4/public_html/wiki/extensions/SemanticForms/includes/SF_FormEdi
   tTab.php(13): sffGetFormForArticle()
   #8 /home/jeffers4/public_html/wiki/includes/Hooks.php(117):
   sffFormEditTab('Main', 4)
   #9 /home/jeffers4/public_html/wiki/includes/SkinTemplate.php(794):
   wfRunHooks()
   #10 /home/jeffers4/public_html/wiki/includes/SkinTemplate.php(435):
   SkinTemplate->buildContentActionUrls(Object(SkinMonoBook))
   #11 /home/jeffers4/public_html/wiki/includes/OutputPage.php(821):
   SkinTemplate->outputPage(Object(SkinMonoBook), Array)
   #12 /home/jeffers4/public_html/wiki/includes/Wiki.php(337):
   OutputPage->output('sffFormEditTab', Array)
   #13 /home/jeffers4/public_html/wiki/index.php(94):
   MediaWiki->finalCleanup('SkinTemplateTab...', Array)
   #14 {main}

   Exception caught inside exception handler: exception
   'DBUnexpectedError'
   with message 'Error in fetchObject(): Table
   'jeffers4_wiki1.smw_ids' doesn't
   exist (localhost)' in
   /home/jeffers4/public_html/wiki/includes/db/Database.php:735
   Stack trace:
   #0
   /home/jeffers4/public_html/wiki/extensions/SemanticMediaWiki/includes/storag
   e/SMW_SQLStore2.php(1666): Database->fetchObject(false)
   #1
   /home/jeffers4/public_html/wiki/extensions/SemanticMediaWiki/includes/storag
   e/SMW_SQLStore2.php(1635):
   SMWSQLStore2->getSMWPageIDandSort('Main', 4, '',
   '', true)
   #2
   /home/jeffers4/public_html/wiki/extensions/SemanticMediaWiki/includes/storag
   e/SMW_SQLStore2.php(340): SMWSQLStore2->getSMWPageID('Main', 4, '')
   #3
   /home/jeffers4/public_html/wiki/extensions/SemanticForms/includes/SF_GlobalF
   unctions.php(332): SMWSQLStore2->getPropertyValues(Object(Title),
   Object(SMWPropertyValue))
   #4
   /home/jeffers4/public_html/wiki/extensions/SemanticForms/includes/SF_GlobalF
   unctions.php(586): sffGetDefaultForm()
   #5
   /home/jeffers4/public_html/wiki/extensions/SemanticForms/includes/SF_FormEdi
   tTab.php(13): sffGetFormForArticle()
   #6 /home/jeffers4/public_html/wiki/includes/Hooks.php(117):
   sffFormEditTab('Main', 4)
   #7 /home/jeffers4/public_html/wiki/includes/SkinTemplate.php(794):
   wfRunHooks()
   #8 /home/jeffers4/public_html/wiki/includes/SkinTemplate.php(435):
   SkinTemplate->buildContentActionUrls(Object(SkinMonoBook))
   #9 /home/jeffers4/public_html/wiki/includes/OutputPage.php(821):
   SkinTemplate->outputPage(Object(SkinMonoBook), Array)
   #10 /home/jeffers4/public_html/wiki/includes/Exception.php(150):
   OutputPage->output('sffFormEditTab', Array)
   #11 /home/jeffers4/public_html/wiki/includes/Exception.php(174):
   MWException->reportHTML('SkinTemplateTab...', Array)
   #12 /home/jeffers4/public_html/wiki/includes/Exception.php(260):
   MWException->report()
   #13 /home/jeffers4/public_html/wiki/includes/Exception.php(294):
   wfReportException()
   #14 [internal function]: wfExceptionHandler(Object(OutputPage))
   #15 {main}


   -----Original Message-----
   From: Yaron Koren [mailto:yaron57@gmail.com
   <mailto:yaron57@gmail.com>]
   Sent: Monday, December 22, 2008 12:02 AM
   <mailto:semediawiki-user@lists.sourceforge.net>
   Subject: Re: [Semediawiki-user] New to List

   I'm guessing that somewhere in your LocalSettings.php file, you
   have the
   line:

   $wgLanguageCode = "";

   If so, you should change that to:

   $wgLanguageCode = "en";

   ...or whatever language you want the wiki to be in.

   -Yaron


------------------------------------------------------------------------

------------------------------------------------------------------------------
 ------------------------------------------------------------------------

_______________________________________________
Semediawiki-user mailing list
Semediawiki-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-user