Last modified: 2012-02-22 03:27:18 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 T35425, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 33425 - #formlink should be able to link to Special:RunQuery
#formlink should be able to link to Special:RunQuery
Status: RESOLVED DUPLICATE of bug 34309
Product: MediaWiki extensions
Classification: Unclassified
SemanticForms (Other open bugs)
unspecified
All All
: Unprioritized enhancement (vote)
: ---
Assigned To: Yaron Koren
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-29 23:32 UTC by badon
Modified: 2012-02-22 03:27 UTC (History)
2 users (show)

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


Attachments

Description badon 2011-12-29 23:32:15 UTC
Special:RunQuery forms do not work with #formlink. Links to Special:RunQuery forms need to be created as full URLs (protocol relative in MW 1.18+) with external wiki link syntax:

http://www.mediawiki.org/wiki/Help:Links#External_links_to_internal_pages

or with the fullurl magic word:

http://www.mediawiki.org/wiki/Help:Magic_words#URL_data

Both of those methods require the use of the plainlinks class to suppress the external link icon, like this:

<span class="plainlinks">[//path/to//index.php/Special:RunQuery/form|template%5Bfield%5D=preload_data link text]</span>

or this:

<span class="plainlinks">[{{fullurl:Special:RunQuery/form|template%5Bfield%5D=preload_data}} link text]</span>

The Semantic Forms #formlink parser function seems to simplify the above two native MediaWiki constructs, and add some features specific to Semantic Forms:

http://www.mediawiki.org/wiki/Extension:Semantic_Forms/Linking_to_forms#Using_.23formlink

The documentation does not say anything about Special:RunQuery forms not being compatible with #formlink, so I assume that is either a bug or an oversight. I assume it was an oversight.
Comment 1 Yaron Koren 2011-12-30 01:33:15 UTC
What would you suggest as a syntax for such a call?
Comment 2 badon 2011-12-30 06:26:43 UTC
My intuitive guess when I first tried it was to specify the form as:

Special:RunQuery/form-name

Where the "Special:RunQuery/" prefix can be used to detect how to handle the form link, like this:

{{#formlink: form = Special:RunQuery/form-name
| link text = Click this to go to a query form
| query string = form-name[field1]=value1&form-name[field2]=value2
}}
Comment 3 Yaron Koren 2011-12-30 13:52:00 UTC
I don't like it; I think a separate parameter would be better.

Though I should note that you can already link to Special:RunQuery, with query string values, using {{fullurl}}:

http://www.mediawiki.org/wiki/Help:Magic_words#URL_data
Comment 4 badon 2011-12-30 19:53:20 UTC
(In reply to comment #3)
> I don't like it; I think a separate parameter would be better.

How about this:

{{#formlink: form = form-name
| form type = runquery
| link text = Click this to go to a query form
| query string = form-name[field1]=value1&form-name[field2]=value2
}}

I supposed with a "form type" parameter syntax, it could make it possible to add other form types in the future, although I haven't thought of any specific possibilities for that yet.

> Though I should note that you can already link to Special:RunQuery, with query
> string values, using {{fullurl}}:
> 
> http://www.mediawiki.org/wiki/Help:Magic_words#URL_data

Yes, I mentioned that in my original report. I wonder if a "form type=runquery" parameter in #formlink could be used to solve this also:

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

Like this:

{{#formlink: form = form-name
| form type = runquery, embedded
| query string = form-name[field1]=value1&form-name[field2]=value2
}}

The link text parameter would have to be ignored, if present along with a form type=runquery, embedded.

I think that's better than just transcluding embedded forms the way it's currently done, since the #formlink parser function could preload the form data on embedded forms.
Comment 5 Yaron Koren 2012-01-04 13:24:00 UTC
Renamed to "#formlink should be able to link to Special:RunQuery" for clarity.
Comment 6 badon 2012-02-10 00:40:35 UTC
*** Bug 34309 has been marked as a duplicate of this bug. ***
Comment 7 badon 2012-02-10 00:41:16 UTC
MWJames posted a patch in attachment 9977 [details].
Comment 8 Yaron Koren 2012-02-22 03:27:18 UTC
Marking as duplicate of the #queryformlink bug report.

*** This bug has been marked as a duplicate of bug 34309 ***

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


Navigation
Links