[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
Badon created this task.Dec 8 2011, 11:24 PM

I don't understand this bug report.

Badon added a comment.Dec 8 2011, 11:54 PM

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:

<!-- will return "File" on any file page. Works on SF 2.2.1 but not 2.3.1 https://bugzilla.wikimedia.org/show_bug.cgi?id=32883 https://bugzilla.wikimedia.org/show_bug.cgi?id=32423 -->
{{#vardefine: isfilepage |
{{#explode: {{FULLPAGENAME}} | : | 0}}
}}

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}}?

Badon added a comment.Dec 9 2011, 12:01 AM

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

Where on the form?

Badon added a comment.Dec 9 2011, 12:06 AM

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

Badon added a comment.Dec 9 2011, 12:07 AM

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.

Re-assigning to f.trott.

Fixed in r105698

Badon added a comment.Dec 12 2011, 1:21 AM

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.

Badon added a comment.Dec 15 2011, 1:48 AM

Reopened again. I don't use caching.

Badon added a comment.Jan 19 2012, 3:49 AM
  • Bug 33418 has been marked as a duplicate of this bug. ***
Badon added a comment.Feb 8 2012, 2:28 AM

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

Add Comment