Last modified: 2008-02-05 11:10:53 UTC
Properties of type "Page", i.e. relations, that point to a page that does not have semantics enabled for it get their object_id set to NULL in the smw_relations table in the database, i.e. they become inoperable, when that page is re-saved. This is a problem for Semantic Forms, because form pages don't have semantics enabled, so relations pointing to form pages become broken. The problem happens in the storeData() function in /includes/SMW_Factbox.php, which looks like this: static function storeData($processSemantics) { // clear data even if semantics are not processed for this namespace // (this setting might have been changed, so that data still exists) $title = SMWFactbox::$semdata->getSubject(); if ($processSemantics) { smwfGetStore()->updateData(SMWFactbox::$semdata, SMWFactbox::$m_new); } elseif (!SMWFactbox::$m_new) { smwfGetStore()->deleteSubject($title); } } When the page is re-saved, storeData() is called on it; $processSemantics is false, and so is the $m_new variable, so deleteSubject() is called on this page; that, in turn, sets the object_id to NULL for all relations pointing to this page. One easy fix to this problem is to get rid of the "elseif" clause altogether; I don't know if that's the ideal solution, because I don't know what the aim of that deleteSubject() call is - the deleteSubject() function, despite its name, also invalidates relations that have that page as the object.
Should be fixed now. There was also a problem with creating new articles after they were already used as objects. This case also should yield proper IDs in the table now.