Hi Bernhard,

You've uncovered a bug in SF (it's not related at all to SIO) - the
presence of "-Adressen.Bezirk" (specifically, the first "-") is messing up
the process of associating template fields with properties.

There's an easy fix, although unfortunately for some reason there's an
issue right now on my server that's preventing me from checking in code.
But you can fix it in your own code by adding the following lines to the
file /includes/SF_TemplateField.php, at the top of the
function setTypeAndPossibleValues():

                if ( strpos( $this->mSemanticProperty, '-' ) === 0 ) {
                        return;
                }

-Yaron


On Thu, Sep 12, 2013 at 6:16 AM, Krabina Bernhard <krab...@kdz.or.at> wrote:

> Hi,
>
> I think I have encoutered a bug using Query Forms of SF in combinatio with
> SIO:
>
> Here is a working query:
> http://standards.kdz.eu/index.php?title=Test:Abfrage_Bauwerk
>
> The same query throws an exception when used in a Query Form:
>
> http://standards.kdz.eu/index.php?title=Spezial:Abfrage_ausf%C3%BChren/Abfrage_Bauwerk
> try to select "Gebäude". If you also enter "9" in "Bezirk" the following
> exception is thrown:
>
> Illegal property key "-Adressen.Bezirk".
>
> Backtrace:
>
> #0
> /home/kdz/standards/extensions/SemanticMediaWiki/includes/dataitems/SMW_DI_Property.php(272):
> SMWDIProperty->__construct('-Adressen.Bezir...', false)
> #1
> /home/kdz/standards/extensions/SemanticForms/includes/SF_TemplateField.php(75):
> SMWDIProperty::newFromUserLabel('-Adressen.Bezir...')
> #2
> /home/kdz/standards/extensions/SemanticForms/includes/SF_TemplateField.php(105):
> SFTemplateField->setTypeAndPossibleValues()
> #3
> /home/kdz/standards/extensions/SemanticForms/includes/SF_TemplateField.php(28):
> SFTemplateField->setSemanticProperty('-Adressen.Bezir...')
> #4
> /home/kdz/standards/extensions/SemanticForms/includes/SF_TemplateInForm.php(22):
> SFTemplateField::create('Bezirk', 'Bezirk', '-Adressen.Bezir...', false)
> #5
> /home/kdz/standards/extensions/SemanticForms/includes/SF_TemplateInForm.php(74):
> SFTemplateInForm->handlePropertySettingInTemplate('Bezirk',
> '-Adressen.Bezir...', false, Array, '??{{#ask: {{#if...')
> #6
> /home/kdz/standards/extensions/SemanticForms/includes/SF_TemplateInForm.php(136):
> SFTemplateInForm->getAllFields()
> #7
> /home/kdz/standards/extensions/SemanticForms/includes/SF_FormPrinter.php(518):
> SFTemplateInForm::create('Abfrage Bauwerk')
> #8
> /home/kdz/standards/extensions/SemanticForms/specials/SF_RunQuery.php(79):
> SFFormPrinter->formHTML('<noinclude>??{{...', true, false, 346, NULL, NULL,
> NULL, true, false)
> #9
> /home/kdz/standards/extensions/SemanticForms/specials/SF_RunQuery.php(30):
> SFRunQuery->printPage('Abfrage_Bauwerk', false)
> #10 /home/kdz/standards/includes/SpecialPage.php(611):
> SFRunQuery->execute('Abfrage_Bauwerk')
> #11 /home/kdz/standards/includes/SpecialPageFactory.php(494):
> SpecialPage->run('Abfrage_Bauwerk')
> #12 /home/kdz/standards/includes/Wiki.php(290):
> SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
> #13 /home/kdz/standards/includes/Wiki.php(536): MediaWiki->performRequest()
> #14 /home/kdz/standards/includes/Wiki.php(446): MediaWiki->main()
> #15 /home/kdz/standards/index.php(59): MediaWiki->run()
> #16 {main}
>
>
> Here ist the template:
> http://standards.kdz.eu/index.php?title=Vorlage:Abfrage_Bauwerk
> and the form:
> http://standards.kdz.eu/index.php?title=Formular:Abfrage_Bauwer
>
> regards,
> Bernhard
>
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. Consolidate legacy IT systems to a single system of record for IT
> 2. Standardize and globalize service processes across IT
> 3. Implement zero-touch automation to replace manual, redundant tasks
> http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
> _______________________________________________
> Semediawiki-user mailing list
> semediawiki-u...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>



-- 
WikiWorks · MediaWiki Consulting · http://wikiworks.com
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to