[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

bzimport set Reference to bz32883.
Badon created this task.Via LegacyDec 8 2011, 11:24 PM
Yaron_Koren added a comment.Via ConduitDec 8 2011, 11:42 PM

I don't understand this bug report.

Badon added a comment.Via ConduitDec 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.

Yaron_Koren added a comment.Via ConduitDec 8 2011, 11:58 PM

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

Badon added a comment.Via ConduitDec 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

Yaron_Koren added a comment.Via ConduitDec 9 2011, 12:02 AM

Where on the form?

Badon added a comment.Via ConduitDec 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.Via ConduitDec 9 2011, 12:07 AM

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

Yaron_Koren added a comment.Via ConduitDec 9 2011, 12:11 AM

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

Yaron_Koren added a comment.Via ConduitDec 9 2011, 12:13 AM

Re-assigning to f.trott.

Foxtrott added a comment.Via ConduitDec 9 2011, 7:24 PM

Fixed in r105698

Badon added a comment.Via ConduitDec 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.

Foxtrott added a comment.Via ConduitDec 14 2011, 9:06 PM

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.Via ConduitDec 15 2011, 1:48 AM

Reopened again. I don't use caching.

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

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

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.