Page MenuHomePhabricator

PageForms tokens input ignores existing values only option
Closed, ResolvedPublicBUG REPORT

Description

Steps to Reproduce:
https://sandbox.semantic-mediawiki.org/wiki/Sp%C3%A9cial:AjouterDonn%C3%A9es/Article/yyyyyy

The field "Fieldworker" has the option "existing values only" set. But still, you can enter an arbitrary value and click on enter. This should not be possible

Actual Results:
Clicking in the form should only allow the autocomplete values, no manual entry of new valus should be possible:

in MW 1.31 and PF 3.8 and 3.9.3 observed as well as MW 1.34 and PF 3.9.3 (SMW sandbox)

Expected Results:

Event Timeline

Krabina created this task.Jun 8 2020, 2:31 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 8 2020, 2:31 PM

I believe this is due to opts.tags = true; (line #156) - it should be false if existingvaluesonly is set.

I think this will also make lines 73-91 unnecessary.

Change 606705 had a related patch set uploaded (by Priyanshu varshney; owner: priyanshu-3390):
[mediawiki/extensions/PageForms@master] Fix PageForms tokens input ignores existing values only option

https://gerrit.wikimedia.org/r/606705

Change 606705 merged by jenkins-bot:
[mediawiki/extensions/PageForms@master] Get "existing values only" to work again for "tokens" and "combobox" input types

https://gerrit.wikimedia.org/r/606705

Yaron_Koren closed this task as Resolved.Jun 22 2020, 1:10 AM
Yaron_Koren claimed this task.
Yaron_Koren added a subscriber: Yaron_Koren.

Sorry about that. And @FreedomFighterSparrow - thanks for your help with this. I'm marking this as "Resolved" - feel free to re-open if it's still a problem.

great, thank you! I can confirm that this is working now!