To be specific:
Go to https://sandbox.semantic-mediawiki.net/w/index.php?title=TestDoc&action=formedit, you'll see the actual pagename there, instead of the displaytitle.
Description
Details
Related Objects
Event Timeline
Change 889950 had a related patch set uploaded (by Your1; author: Your1):
[mediawiki/extensions/PageForms@master] Fixes https://phabricator.wikimedia.org/T329928
Change 889950 abandoned by Your1:
[mediawiki/extensions/PageForms@master] Fixes https://phabricator.wikimedia.org/T329928
Reason:
Change 890002 had a related patch set uploaded (by Your1; author: Your1):
[mediawiki/extensions/PageForms@master] Fix for wrong values being displayed in the form field using tokens and display titles
So, after extensively testing with this fix I don't have this issue anymore on my branch. We did encounter a other issue, which is similar to T283161 and T132128.
Our scenario is that we have one category that has a lot of pages in it (around 10.000). Each page in that category has its own display title. Whenever we edit that for, the 'possible' values are limited to whatever $wgPageFormsMaxAutocompleteValues is set to. This is problematic, because whenever we search (through the autocomplete) on a value that's further away then the 1000 prefilled values in the form, it doesn't get resolved correctly.
I've already written a fix for this, but its written on the same change (https://gerrit.wikimedia.org/r/890002) above. Do you want me to submit another patch, or fix this issue in the same change?
Change 890002 had a related patch set uploaded (by Your1; author: Your1):
[mediawiki/extensions/PageForms@master] Fix for wrong values being displayed in form fields when using tokens and display titles. Also fixed a bug for larger autocomplete fields (higher than the allowed $wgPageFormsMaxAutocompleteValues var) which didn't save the value if it would be outside the maxautocompletevalues range. See more at T329928.
I've submitted this in the same patch, because things would be overcomplicated otherwise.
Change 890002 abandoned by Your1:
[mediawiki/extensions/PageForms@master] Fix for wrong values being displayed in form fields when using tokens and display titles. Also fixed a bug for larger autocomplete fields (higher than the allowed $wgPageFormsMaxAutocompleteValues var) which didn't save the value if it would be outside the maxautocompletevalues range. See more at T329928.
Reason:
Change 890002 restored by Your1:
[mediawiki/extensions/PageForms@master] Fix for wrong values being displayed in form fields when using tokens and display titles. Also fixed a bug for larger autocomplete fields (higher than the allowed $wgPageFormsMaxAutocompleteValues var) which didn't save the value if it would be outside the maxautocompletevalues range. See more at T329928.
The patch was functioning correctly in previous versions, but with the recent update to PageForms, it appears that similar code has been partially integrated. However, this integration seems incomplete, as certain components are missing. Consequently, the solution I originally implemented is no longer effective.
The original bug is reintroduced, and it seems my fixes are not working in any way I fixed them before. Thus to sum it up (its all about the tokens field):
- It should do remote autocompletion whenever the possible values exceeds the maximum allowed value;
- It should display values like "DisplayTitle (real page title)" - it just displays the real page title now. This was partly done in the 'ext.pf.select2.tokens.js' file
- And the 'reverse lookup' mechanism, where the actual post values would be translated to just save the 'real page titles'.
The patch I introduced seems to be splitten, but some parts are missing - or are not fully functional. I see Rand posted a reply on 4th of may (see last thread on https://gerrit.wikimedia.org/r/c/mediawiki/extensions/PageForms/+/890002/), mentioning he will keep me posted. But this never happened, and the case now is that the new PF code has all kind of new bugs, which is a shame, because the actual bug was solved by the code I written back then.
It's too bad that your original patch could not be added. To clarify on the first issue - are you saying that "tokens" is sometimes doing local autocompletion when it should be doing remote? I just tried it, and this seems to work fine - it's doing local autocompletion when there is a small number of values, and remote autocompletion with a large number.
Display title handling is still a problem, I agree, for "tokens" with remote autocompletion. This works better with "combobox", for some reason. Although for both tokens with local autocompletion, and combobox in both cases, it just uses the display title, rather than "display title (real title)".
Is there any way you could re-submit your fixes? Presumably the patch required would be smaller than before, given that some parts of it, like the getLabelsFromDisplayTitle() function, have already been added to the code.
Is there any way you could re-submit your fixes? Presumably the patch required would be smaller than before, given that some parts of it, like the getLabelsFromDisplayTitle() function, have already been added to the code.
Holidays are now over, so I'll try submit a new patch within two weeks.
Change #1019094 had a related patch set uploaded (by Your1; author: Your1):
[mediawiki/extensions/PageForms@master] Fixing display title issues on token fields (see T329928)
Change #1019094 merged by jenkins-bot:
[mediawiki/extensions/PageForms@master] Fixing display title issues on token fields (see T329928)
Change #890002 abandoned by Your1:
[mediawiki/extensions/PageForms@master] Fixed wrong values being set when using display titles and improved handling when having more pages than MaxAutocompleteValues allows.