Yaron Koren wrote: > First of all, I don't know whether I should send bug reports to this > list, or put them on Bugzilla, or both... is there a recommended protocol?
This is fine. The gold standard would be: * Create a page on http://ontoworld.org in Category:Testpage showing the bug and using [[Template:Bugged]] * Enter a bug in http://bugzilla.wikimedia.org whose URL field references back to the page on ontoworld.org * Attach a patch to the bug (I use Eclipse with PHPEclipse, it has a Team > Create patch... command) * Send an e-mail here. but "half a loaf is better than nothing" (and nothing is better than RDF, ergo half a loaf is better than RDF ?-) I reproduced your bug at http://ontoworld.org/wiki/Test_allows_value_wikipage and filed bug 11820. Your analysis below looks right to me. I wonder whether, in that loop, $value->setUserValue(); should also/instead reset member variables in subclasses, such as m_title in SMWWikiPageValue. I think error paths can leave other member variables like m_id and m_textform set to old values, and it's unclear to me which functions are responsible for resetting. Anyway, I checked in your fix, hoping I don't trash Subversion! Thanks, -- =S Page > Anyway, there's a bug in the handling of properties of type "Page" that > are enumerations - fields that have this property get a "not on the list > of possible values" error on the screen if they have a value other than > the very first one on the list. I traced this problem, and found the > issue: a variable is created, in "SMW_DataValue.php", to loop through > the list of allowed values, checking each one against the current value. > In the case of a wiki page, however, that variable keeps a cached > version of its title, that is set the very first time and then is never > reset. There are are various ways to solve this problem, but the easiest > might be to change the function parseUserValue() in the file > "/includes/SMW_DV_WikiPage.php". You can add a new line after line 26, > so inste ad of > > $this->m_value = $value; > > ...it now reads > > $this->m_value = $value; > $this->m_title = null; > > This will prevent the old value of "m_title" from getting read and used > in place of the actual value. > > -Yaron ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Semediawiki-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
