Page MenuHomePhabricator

[SF] Magic words like {{PAGENAME}} in form definition do not get displayed
Closed, ResolvedPublic

Description

See also:

https://bugzilla.wikimedia.org/show_bug.cgi?id=32423

The only way I know of to determine whether a form is being used to create or edit a page is using {{PAGENAME}} or {{FULLPAGENAME}} (for pages in the File: namespace).

SF 2.2.1 did not have this problem. In addition to functioning magic words for determining which page is being edited, the ability to determine whether the form is being used to edit or create a page is also important.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=32423

Details

Reference
bz32883
TitleReferenceAuthorSource BranchDest Branch
Release 1.15.14repos/sre/pybal!3vgutierrezrelease-bullseyebullseye-wikimedia
Release 1.15.14repos/sre/pybal!1vgutierrezrelease-1.14main
Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:06 AM
bzimport set Reference to bz32883.

I don't understand this bug report.

It's quite simple. In SF 2.2.1 {{FULLPAGENAME}} when creating a page would produce nothing, but when editing a page, it would produce the name of the page being edited.

I could use ParserFunctions to determine if the form was editing a file page, something like this:

But, in SF 2.3.1 {{FULLPAGENAME}} and {{PAGENAME}} produce no output. I have no idea why. If you want to hop on IRC with me, I can show you both versions in action on one of my forms by switching from version 2.2.1 and 2.3.1, so you can observe the results. If you want to see that, I'll make some quick tweaks to the form to show the output explicitly.

I still don't understand. Where are you putting {{FULLPAGENAME}}?

I'm putting it on the form.

I'm using it to replace the upload field with a thumbnail of the image when editing, partly as a workaround for the consequences of this bug, to prevent people from trying to upload another image when they're already editing one:

https://bugzilla.wikimedia.org/show_bug.cgi?id=32423

Here's some examples, login with Demo/test:

Uploading/Creating:
http://www.coincompendium.com/wiki/index.php/Special:FormEdit/Image

Editing:
http://www.coincompendium.com/wiki/index.php?title=File:1323316291-226.jpg&action=formedit

I'm running 2.2.1 right now, but I can quickly show you what happens when upgrading to 2.3.1, if you want.

{{FULLPAGENAME}} occurs on line 13 & 43, and {{PAGENAME}} occurs on line 36. The form code can be viewed here:

http://www.coincompendium.com/wiki/index.php?title=Form:Image&action=edit

I use 2 space tabs, if you want to plop that into a text editor.

Ah - I'm renaming this to "[SF] Magic words like {{PAGENAME}} in form definition do not get displayed", for clarity.

I just tested {{FULLPAGENAME}} and {{PAGENAME}} in Semantic Forms 2.3.2, and I still get no results from them when editing an image page in the "File:" namespace. I'm using MediaWiki 1.17 and SMW 1.6.

I just tested {{FULLPAGENAME}} and {{PAGENAME}} in Semantic Forms 2.3.2, and I still get no results from them when editing an image page in the "File:" namespace. I'm using MediaWiki 1.17 and SMW 1.6.

Turn off caching.

Reopened again. I don't use caching.

  • Bug 33418 has been marked as a duplicate of this bug. ***

I tested Semantic Forms 2.4 and this appears to be fixed. I think that is r110780.