Last modified: 2012-02-08 02:28:44 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T34883, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 32883 - [SF] Magic words like {{PAGENAME}} in form definition do not get displayed
[SF] Magic words like {{PAGENAME}} in form definition do not get displayed
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
SemanticForms (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: s7eph4n
:
: 33418 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-08 23:24 UTC by badon
Modified: 2012-02-08 02:28 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description badon 2011-12-08 23:24:17 UTC
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.
Comment 1 Yaron Koren 2011-12-08 23:42:35 UTC
I don't understand this bug report.
Comment 2 badon 2011-12-08 23:54:38 UTC
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.
Comment 3 Yaron Koren 2011-12-08 23:58:38 UTC
I still don't understand. Where are you putting {{FULLPAGENAME}}?
Comment 4 badon 2011-12-09 00:01:43 UTC
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
Comment 5 Yaron Koren 2011-12-09 00:02:24 UTC
Where on the form?
Comment 6 badon 2011-12-09 00:06:24 UTC
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
Comment 7 badon 2011-12-09 00:07:00 UTC
I use 2 space tabs, if you want to plop that into a text editor.
Comment 8 Yaron Koren 2011-12-09 00:11:48 UTC
Ah - I'm renaming this to "[SF] Magic words like {{PAGENAME}} in form definition do not get displayed", for clarity.
Comment 9 Yaron Koren 2011-12-09 00:13:04 UTC
Re-assigning to f.trott.
Comment 10 s7eph4n 2011-12-09 19:24:46 UTC
Fixed in r105698
Comment 11 badon 2011-12-12 01:21:34 UTC
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.
Comment 12 s7eph4n 2011-12-14 21:06:46 UTC
> 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.
Comment 13 badon 2011-12-15 01:48:20 UTC
Reopened again. I don't use caching.
Comment 14 badon 2012-01-19 03:49:14 UTC
*** Bug 33418 has been marked as a duplicate of this bug. ***
Comment 15 badon 2012-02-08 02:28:36 UTC
I tested Semantic Forms 2.4 and this appears to be fixed. I think that is r110780.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links