Last modified: 2011-08-15 13:57:27 UTC
SQL error generated from includes/parser/LinkHolderArray.php: SELECT page_id, page_namespace, page_title, page_is_redirect, page_len, page_latest FROM `wiki_page` WHERE (page_namespace=SF_NS_FORM Obviously this is not right because there are no quotes round the namespace. See lines: 187, 190 of includes/parser/LinkHolderArray.php And similar in: includes/parser/Parser_OldPP.php I'm not sure how these files work and where they come into play or what they do, but all I know is that adding quotes round $ns stopped the SQL error on my install on MediaWiki 1.17.0 with SMW 1.5.6 and Semantic Forms 2.1.2 Andrew
(In reply to comment #0) > > Obviously this is not right because there are no quotes round the namespace. > Not really, it should've been a substituted constant by the look of this, which I'm presuming it's a SF bug
Hi Andrew - what page are you on when you see this error?
Hi Yaron, It varies - it doesn't seem consistent, but it does seem to be some pages on which there is a SMW query. I'm actually wondering whether it's happening because I've just upgraded and there's something funny going on with the cache. So, I've found a page: r5gordini.co.uk/mediawiki/Renault_5_Gordini_Turbo">http://www.r5gordini.co.uk/mediawiki/Renault_5_Gordini_Turbo It's got an SMW query on it. However, here's another page that has the same query that works fine: r5gordini.co.uk/mediawiki/Renault_Super_5_GT_Turbo_Phase_I">http://www.r5gordini.co.uk/mediawiki/Renault_Super_5_GT_Turbo_Phase_I Thanks, Andrew
I don't know - that's very strange. If possible, can you upgrade to the latest SF version, 2.2, and see if the problem persists?
Hi Yaron, I see that my links have been obfuscated above. 0 or 1 need to be substituted with r5, but I think you know that from our previous discussions! I have upgraded to 2.2. It doesn't fix the issue. If it helps, I am able to open a page with this error for edit but saved changes do not take effect. More info: The overarching category uses Has default form, but when I go to a page and Edit With Form, I get: Warning: This page already exists, but it does not use this form. This didn't happen previously! Any ideas where I could look for the variable substitution for the Namespace? I want to help fix this issue. Thanks, Andrew
Eeek! Something's not right with the Forms namespace elsewhere too... Going to Special:Forms shows an empty namespace. Of course, it doesn't help that one of my users has accidentally overwritten the Form with some text. The old text of the form doesn't show up in the history, so I may have to create it from scratch. The forms show as: :Car Record (for example). Andrew
Hi Yaron, Further to my comments above, I have done some more investigation. The example code: print "NS_FORM:" . SF_NS_FORM, shows NS_FORM:106 And: in specials/SF_Forms.php, function formatResult: $title = Title::makeTitle(SF_NS_FORM, $result->value ); $title becomes ":Form_Name" - no namespace. It's like the translation from 106 to "Forms" is not working. I will continue my investigations when I have time. Thanks, Andrew
Hi Yaron, OK! Well, I've fixed it. Turns out it was my mistake, as is usual with these things. I'd included SemanticForms before Semantic MediaWiki! All the Namespace stuff is set up in Semantic MediaWiki, not Semantic Forms. Obvious really, when I think about it, but I didn't find it that easy to troubleshoot as I was looking for the NS defines in Semantic Forms - didn't think to look for them in SMW. Well, I've learnt something today ;-) Might I suggest some error trapping in SF so that if the namespace isn't defined we know that the prerequisite of SMW isn't present yet? Thanks for your responses to this. I will let you do as you wish with the bug report - could it feed into an enhancement to display an error if SMW not present before SF? Andrew
Hi Andrew - good detective work! Evidently, the check within SF, to see if SMW has already been included, no longer works with newer versions of MW and/or SMW. I'm keeping the bug active, but renaming it to "Semantic Forms needs to exit gracefully if SMW is not included first".
I checked in a fix for this in SVN.