Page MenuHomePhabricator

Needless URL-encoding of brackets, and parsing of URL values, in #forminput
Closed, ResolvedPublic

Description

Hi,

I cannot preload form fields for multiple forms using the parameter "query string" in #forminput or #formlink. Using form: Company on http://scratchpad.referata.com the query string to preload a multiple form’s field is e.g. "query string=Activity[1][1]=2012/10/09". But defining it with #formlink or #forminput in this manner the resulting URL is cutted to "http://suburl-path-etc?Activity[1]=". More examples are given at http://scratchpad.referata.com/wiki/User_talk:Andreas_Plank#Test_formlink:_prefill_multiple_forms

The only solution that works is not to use #formlink or #forminput but set a standard Wiki link with URI encoded URL variables like http://scratchpad.referata.com/wiki/Special:FormEdit/Company/Hai?Company%5BWebsite%5D=http://www.example.com&Activity%5B1%5D%5B1%5D=2012/10/09

Could this be solved?

Thanks a lot.
Andreas Plank


Version: unspecified
Severity: normal

Details

Reference
bz40916

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:10 AM
bzimport set Reference to bz40916.

I correct it is only with #forminput when that bug occurs and the URL becomes cutted

This is actually two different bugs in one, so maybe it should be two bug reports, but in any case I'm renaming it for clarity.

Yaron_Koren claimed this task.
Yaron_Koren subscribed.

This is finally fixed! Sorry it took three years. In fairness, I only recently found about the function used to fix this bug, Parser::recursivePreprocess().

https://git.wikimedia.org/commitdiff/mediawiki%2Fextensions%2FSemanticForms.git/5cbee2ea2d9ee133b3da11a10f5ac1270f214e8c