$smwgSpecialAskFormSubmitMethod

From semantic-mediawiki.org


Configuration parameter details:
Name $smwgSpecialAskFormSubmitMethod
Description Sets the HTTP submit method used by Special page "Ask"
Default setting
post
Software Semantic MediaWiki
Since version
Until version still available
Configuration Special Ask
Keyword queries


$smwgSpecialAskFormSubmitMethod is a configuration parameter that sets the HTTP submit method used by the form on special page "Ask"Provides an interface that assists users with creating and executing semantic queries. The configuration parameter was introduced in Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x..1

Starting with Semantic MediaWiki 7.0.0Released on 4 June 2026 and compatible with MW 1.43.x - 1.46.x. this parameter is documented using plain string values ('post', 'get', 'get.redirect') instead of the SMW_SASK_SUBMIT_* constants. The constants resolve to these same values and continue to work without a deprecation notice.2

Default setting[edit]

$smwgSpecialAskFormSubmitMethod = 'post';

This means that the form on special page "Ask"Provides an interface that assists users with creating and executing semantic queries is submitted using the HTTP POST method.

Available options[edit]

The option enabled by default is highlighted in bold.
  • 'post' (constant: SMW_SASK_SUBMIT_POST) – Submit the form using POST; allows jumping directly to the search result but produces no copyable URL (use the result bookmark button instead)
  • 'get' (constant: SMW_SASK_SUBMIT_GET) – Submit the form using GET (the default until Semantic MediaWiki 2.5Released on 14 March 2017 and compatible with MW 1.23.0 - 1.29.x.); cannot jump directly to the search result after a submit
  • 'get.redirect' (constant: SMW_SASK_SUBMIT_GET_REDIRECT) – Submit the form using GET with a redirect; can jump directly to the search result but requires an extra HTTP request

Changing the default setting[edit]

To modify the setting to this configuration parameter, add one of the following lines to your "LocalSettings.php" file:

Use GET
$smwgSpecialAskFormSubmitMethod = 'get';
Use GET with a redirect
$smwgSpecialAskFormSubmitMethod = 'get.redirect';

See also[edit]

  • Help page on special page "Ask"Provides an interface that assists users with creating and executing semantic queries


References

  1. ^  Semantic MediaWiki: GitHub pull request gh:smw:3429
  2. ^  | | | |  Semantic MediaWiki: GitHub pull request gh:smw:6792