[SF] mapping template not working with input types tokens, combobox

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[SF] mapping template not working with input types tokens, combobox

planetenxin
Hi,

have you ever tried the mapping template= parameter for Semantic Forms?
AWESOME! This makes it easy to show a meaningful text when working with
autonumbered pages, e.g. "Enable Autonumbering (Issue0001)" instead of
"Issue0001".

It works fine for me when input type=dropdown but fails when input
type=tokens or input type=combobox. I'm on version SF 2.8.

Can someone confirm this?

/Alexander

--
________________________________________________
semantic::apps by gesinn.it
Business Applications with Semantic Mediawiki.
http://semantic-apps.com

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: [SF] mapping template not working with input types tokens, combobox

Tobias Oetterer
Hi

Yes, I can confirm. Saw this feature only recently and was very excited.
Unfortunately I had the exact same experience as you. I was trying to
combine "mapping template" with type "tokens" and it not only produced
"funny" entries in my suggested values. I also had an error message (dev
system, so debug output enabled). It looked something like this when trying
to use "tokens" or "combobox" ("dropdown" works fine):

Twice this:

Warning: strtr() expects parameter 1 to be string, array given in
/var/www/mediawiki-1.23.5/includes/Html.php on line 555

Call Stack:
    0.0004     240168   1. {main}() /var/www/mediawiki-1.23.5/index.php:0
    0.2028   14243128   2. MediaWiki->run()
/var/www/mediawiki-1.23.5/index.php:46
    0.2028   14243504   3. MediaWiki->main()
/var/www/mediawiki-1.23.5/includes/Wiki.php:447
    0.2556   17764936   4. MediaWiki->performRequest()
/var/www/mediawiki-1.23.5/includes/Wiki.php:588
    0.2648   18577720   5. MediaWiki->performAction()
/var/www/mediawiki-1.23.5/includes/Wiki.php:292
    0.2649   18578360   6. SFFormEditAction->show()
/var/www/mediawiki-1.23.5/includes/Wiki.php:428
    0.2649   18578408   7. SFFormEditAction::displayForm()
/var/www/_extensions/SemanticForms.2.8/includes/SF_FormEditAction.php:27
    0.2917   20434232   8. SFFormEdit::printForm()
/var/www/_extensions/SemanticForms.2.8/includes/SF_FormEditAction.php:173
    0.2998   21770448   9. SFAutoeditAPI->execute()
/var/www/_extensions/SemanticForms.2.8/specials/SF_FormEdit.php:92
    0.3348   25818200  10. SFAutoeditAPI->doAction()
/var/www/_extensions/SemanticForms.2.8/includes/SF_AutoeditAPI.php:116
    0.3420   26054928  11. SFFormPrinter->formHTML()
/var/www/_extensions/SemanticForms.2.8/includes/SF_AutoeditAPI.php:843
    0.4370   30565800  12. SFFormPrinter->formFieldHTML()
/var/www/_extensions/SemanticForms.2.8/includes/SF_FormPrinter.php:1313
    0.4481   30571792  13. call_user_func_array()
/var/www/_extensions/SemanticForms.2.8/includes/SF_FormPrinter.php:1832
    0.4481   30572504  14. SFComboBoxInput::getHTML()
/var/www/_extensions/SemanticForms.2.8/includes/SF_FormPrinter.php:1832
    0.4482   30574920  15. Html::rawElement()
/var/www/_extensions/SemanticForms.2.8/includes/forminputs/SF_ComboBoxInput.
php:109
    0.4482   30574968  16. Html::openElement()
/var/www/mediawiki-1.23.5/includes/Html.php:126
    0.4482   30581376  17. Html::expandAttributes()
/var/www/mediawiki-1.23.5/includes/Html.php:224
    0.4484   30584984  18. strtr()
/var/www/mediawiki-1.23.5/includes/Html.php:555

And thrice this:
Warning: Cannot modify header information - headers already sent by (output
started at /var/www/mediawiki-1.23.5/includes/Html.php:555) in
/var/www/mediawiki-1.23.5/includes/WebResponse.php on line 37

Call Stack:
    0.0004     240168   1. {main}() /var/www/mediawiki-1.23.5/index.php:0
    0.2028   14243128   2. MediaWiki->run()
/var/www/mediawiki-1.23.5/index.php:46
    0.2028   14243504   3. MediaWiki->main()
/var/www/mediawiki-1.23.5/includes/Wiki.php:447
    0.5393   30905848   4. OutputPage->output()
/var/www/mediawiki-1.23.5/includes/Wiki.php:598
    0.5397   30952968   5. WebResponse->header()
/var/www/mediawiki-1.23.5/includes/OutputPage.php:2068
    0.5397   30953144   6. header()
/var/www/mediawiki-1.23.5/includes/WebResponse.php:37

Regards,
Tobias Oetterer

--
If this email is rather brief, it is not meant to be impolite but to respect
your time.
http://five.sentenc.es
No trees were killed to send this message, but a large number of electrons
were terribly inconvenienced

University of Paderborn
Zentrum IMT
Warburger Stra├če 100
33098 Paderborn

Office: N5.341
Phone: 05251/60-2194
Internet: http://imt.uni-paderborn.de
-----Urspr├╝ngliche Nachricht-----
Von: planetenxin [mailto:[hidden email]]
Gesendet: Mittwoch, 19. November 2014 14:29
An: [hidden email]
Betreff: [Semediawiki-user] [SF] mapping template not working with input
types tokens, combobox

Hi,

have you ever tried the mapping template= parameter for Semantic Forms?
AWESOME! This makes it easy to show a meaningful text when working with
autonumbered pages, e.g. "Enable Autonumbering (Issue0001)" instead of
"Issue0001".

It works fine for me when input type=dropdown but fails when input
type=tokens or input type=combobox. I'm on version SF 2.8.

Can someone confirm this?

/Alexander

--
________________________________________________
semantic::apps by gesinn.it
Business Applications with Semantic Mediawiki.
http://semantic-apps.com

----------------------------------------------------------------------------
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from
Actuate! Instantly Supercharge Your Business Reports and Dashboards with
Interactivity, Sharing, Native Excel Exports, App Integration & more Get
technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: [SF] mapping template not working with input types tokens, combobox

cicalese.mitre
In reply to this post by planetenxin
Thank you for the feedback on mapping template. I am very glad that you find it valuable, as do I. This is functionality that Yaron Koren and I added at the Enterprise MediaWiki Hackathon in New York City earlier this year. It is still experimental. If I recall correctly, it was tested at that time with input type=dropdown,  radiobox, checkboxes, listbox, and combobox (existing values only). The tokens input type was merged after this and would take some additional handling to get it working with mapping template. I am also aware of a bug when using mapping template with multi instance templates that would involve a change to the way the data is held during processing. I have been intending to get back to stomp out the remaining bugs and hope to be able to do so soon.

Cindy
Reply | Threaded
Open this post in threaded view
|

Re: [SF] mapping template not working with input types tokens, combobox

planetenxin
Hi Cindy,

... it seems that it is only working for dropdown at the moment.
Combobox (and tokens) is not working in my case, which makes it
impossible to use for multi value fields (which can not be used with
dropdown).

I filed the following bug:
https://bugzilla.wikimedia.org/show_bug.cgi?id=73641

But anyway, thanks for making this feature available! It is really a
must have when working with auto-numbered UUID-like page names.

I did not try with multi instance templates, so I can not confirm a bug
here.

/Alexander


Am 21.11.2014 um 16:08 schrieb cindy.cicalese:

> Thank you for the feedback on mapping template. I am very glad that you find
> it valuable, as do I. This is functionality that Yaron Koren and I added at
> the Enterprise MediaWiki Hackathon in New York City earlier this year. It is
> still experimental. If I recall correctly, it was tested at that time with
> input type=dropdown,  radiobox, checkboxes, listbox, and combobox (existing
> values only). The tokens input type was merged after this and would take
> some additional handling to get it working with mapping template. I am also
> aware of a bug when using mapping template with multi instance templates
> that would involve a change to the way the data is held during processing. I
> have been intending to get back to stomp out the remaining bugs and hope to
> be able to do so soon.
>
> Cindy


--
________________________________________________
semantic::apps by gesinn.it
Business Applications with Semantic Mediawiki.
http://semantic-apps.com

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

RE: [SF] mapping template not working with input types tokens, combobox

cicalese.mitre

Hi, Alexander.

 

We need it to be working for multi value fields as well. I will try to turn my attention to fixing this very soon. Thanks for the reminder and the bug report!

 

Cindy

 

__________________________

Dr. Cindy Cicalese

Lead Software Systems Engineer

The MITRE Corporation

 

From: planetenxin [via Wikimedia] [mailto:ml-node+[hidden email]]
Sent: Friday, November 21, 2014 10:42 AM
To: Cicalese, Cindy
Subject: Re: [SF] mapping template not working with input types tokens, combobox

 

Hi Cindy,

... it seems that it is only working for dropdown at the moment.
Combobox (and tokens) is not working in my case, which makes it
impossible to use for multi value fields (which can not be used with
dropdown).

I filed the following bug:
https://bugzilla.wikimedia.org/show_bug.cgi?id=73641

But anyway, thanks for making this feature available! It is really a
must have when working with auto-numbered UUID-like page names.

I did not try with multi instance templates, so I can not confirm a bug
here.

/Alexander


Am 21.11.2014 um 16:08 schrieb cindy.cicalese:


> Thank you for the feedback on mapping template. I am very glad that you find
> it valuable, as do I. This is functionality that Yaron Koren and I added at
> the Enterprise MediaWiki Hackathon in New York City earlier this year. It is
> still experimental. If I recall correctly, it was tested at that time with
> input type=dropdown,  radiobox, checkboxes, listbox, and combobox (existing
> values only). The tokens input type was merged after this and would take
> some additional handling to get it working with mapping template. I am also
> aware of a bug when using mapping template with multi instance templates
> that would involve a change to the way the data is held during processing. I
> have been intending to get back to stomp out the remaining bugs and hope to
> be able to do so soon.
>
> Cindy



--
________________________________________________
semantic::apps by gesinn.it
Business Applications with Semantic Mediawiki.
http://semantic-apps.com

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user


If you reply to this email, your message will be added to the discussion below:

http://wikimedia.7.x6.nabble.com/SF-mapping-template-not-working-with-input-types-tokens-combobox-tp5039422p5039533.html

To start a new topic under Semantic Mediawiki - User, email [hidden email]
To unsubscribe from [SF] mapping template not working with input types tokens, combobox, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

RE: [SF] mapping template not working with input types tokens, combobox

cicalese.mitre
Hi, Alexander.

I just had a chance to test the mapping template functionality. I tested with Semantic Forms version 2.8 (which has a small mapping template bug that shows up in certain cases but was fixed in the commit immediately after 2.8) and with master (as of yesterday). For me, mapping template works for the following input types:

* dropdown
* radiobutton
* listbox
* checkboxes

The latter two types accept multiple values. Perhaps listbox is appropriate for your needs?

I confirmed that mapping template does not currently work for combo box (existing values only) or tokens (existing values only). The implementation of combobox changed since we added the mapping template functionality, and the tokens implementation is new, so the code will need to be adapted for them. It also does not currently work for multi instance templates. I am looking into what it would take to make it work with those three cases now.

Cindy
Reply | Threaded
Open this post in threaded view
|

Re: [SF] mapping template not working with input types tokens, combobox

planetenxin
Hi Cindy,

thanks for having a look at this.

Checkboxes would not fit well in my case as I have a lot of values and
autocompletion would be nice.

Listbox seems to work somehow. Here I get some mapped values but the
display of the mapping template seems to be messed up. I use some other
ask queries in the mapping template. I need to have a closer look to
give a reproducible bug report and/or pull the latest code.

I'd be glad to help with testing. Just let me know when I shall pull
some fresh code from git ;-)

/Alexander

Am 26.11.2014 um 18:16 schrieb cindy.cicalese:

> Hi, Alexander.
>
> I just had a chance to test the mapping template functionality. I tested
> with Semantic Forms version 2.8 (which has a small mapping template bug that
> shows up in certain cases but was fixed in the commit immediately after 2.8)
> and with master (as of yesterday). For me, mapping template works for the
> following input types:
>
> * dropdown
> * radiobutton
> * listbox
> * checkboxes
>
> The latter two types accept multiple values. Perhaps listbox is appropriate
> for your needs?
>
> I confirmed that mapping template does not currently work for combo box
> (existing values only) or tokens (existing values only). The implementation
> of combobox changed since we added the mapping template functionality, and
> the tokens implementation is new, so the code will need to be adapted for
> them. It also does not currently work for multi instance templates. I am
> looking into what it would take to make it work with those three cases now.
>
> Cindy


--
________________________________________________
semantic::apps by gesinn.it
Business Applications with Semantic Mediawiki.
http://semantic-apps.com

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: [SF] mapping template not working with input types tokens, combobox

planetenxin
In reply to this post by cicalese.mitre
Hi Cindy, Yaron,

I just had a look at the latest version
(f48ac8a36b33604fe7d9c90db04959932f61c857). I did a quick check with the
tokens input type. Works as expected! Also the sorting is working now!

Great job! Many thanks to both of you!

/Alexander

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user