Page MenuHomePhabricator

Extension:InputBox preloadparams include %5B0%5D (additional 0) instead of %5B%5D
Closed, ResolvedPublic

Description

There seems to be an issue with the preloadparams[] = parameter of Extension:InputBox, where instead of including %5B%5D the text %5B0%5D is included, where the extra "0" prevevnts it from functioning.

see example: wikiversity.org/wiki/WikiJournal_Preprints

Any ideas for fixing this?

(also posted here)

Event Timeline

Aklapper renamed this task from Extension:InputBox preloadparams to Extension:InputBox preloadparams include %5B0%5D (additional 0) instead of %5B%5D.Jan 2 2019, 11:34 AM

Confirming. (For future reference, a list of steps to reproduce is highly welcome to avoid misunderstandings)

  1. See that source of https://en.wikiversity.org/w/index.php?title=WikiJournal_Preprints&action=edit states preloadparams[] = {{ROOTPAGENAME}}.
  2. Under "Step 1", enter "test" in the inputbox, click "Create pre-print"
  3. See that the resulting URL includes &preloadparams%5B0%5D=WikiJournal+Preprints.

Apparently either of the formats can be used:

...&preloadparams[]=a&preloadparams[]=b
...&preloadparams[0]=a&preloadparams[1]=b

Why is this a problem?

(The second format actually didn't work in VE, but I just wrote a patch to fix that: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/VisualEditor/+/532424)

TheDJ claimed this task.
TheDJ subscribed.

Seems to work just fine now