Page MenuHomePhabricator

Exception from line 1216 of ApiBase.php: Unrecognized value for parameter 'action': templatedata
Closed, ResolvedPublic

Description

In my wiki, when I click submit, in Step 1, I get:

[5a27ac7e] /wiki/Special:GWToolset Exception from line 1216 of ...w/includes/api/ApiBase.php: Unrecognized value for parameter 'action': templatedata

Backtrace:

#0 ...w/includes/api/ApiBase.php(1095): ApiBase->dieUsage(string, string)
#1 ...w/includes/api/ApiBase.php(948): ApiBase->parseMultiValue(string, string, boolean, array)
#2 ...w/includes/api/ApiBase.php(658): ApiBase->getParameterFromSettings(string, array, boolean)
#3 ...w/includes/api/ApiMain.php(689): ApiBase->extractRequestParams()
#4 ...w/includes/api/ApiMain.php(813): ApiMain->setupExecuteAction()
#5 ...w/includes/api/ApiMain.php(349): ApiMain->executeAction()
#6 ...w/extensions/GWToolset/includes/Adapters/Php/MediawikiTemplatePhpAdapter.php(116): ApiMain->execute()
#7 ...w/extensions/GWToolset/includes/Adapters/Php/MediawikiTemplatePhpAdapter.php(77): GWToolset\Adapters\Php\MediawikiTemplatePhpAdapter->retrieveTemplateData(Title)
#8 ...w/extensions/GWToolset/includes/Models/MediawikiTemplate.php(435): GWToolset\Adapters\Php\MediawikiTemplatePhpAdapter->retrieve(array)
#9 ...w/extensions/GWToolset/includes/Models/MediawikiTemplate.php(407): GWToolset\Models\MediawikiTemplate->retrieve()
#10 ...w/extensions/GWToolset/includes/Handlers/Forms/MetadataDetectHandler.php(230): GWToolset\Models\MediawikiTemplate->getMediaWikiTemplate(string)
#11 ...w/extensions/GWToolset/includes/Handlers/Forms/FormHandler.php(176): GWToolset\Handlers\Forms\MetadataDetectHandler->processRequest()
#12 ...w/extensions/GWToolset/includes/Specials/SpecialGWToolset.php(127): GWToolset\Handlers\Forms\FormHandler->execute()
#13 ...w/extensions/GWToolset/includes/Specials/SpecialGWToolset.php(72): GWToolset\SpecialGWToolset->processRequest()
#14 ...w/includes/SpecialPage.php(631): GWToolset\SpecialGWToolset->execute(NULL)
#15 ...w/includes/SpecialPageFactory.php(488): SpecialPage->run(NULL)
#16 ...w/includes/Wiki.php(298): SpecialPageFactory::executePath(Title, RequestContext)
#17 ...w/includes/Wiki.php(602): MediaWiki->performRequest()
#18 ...w/includes/Wiki.php(467): MediaWiki->main()
#19 ...w/index.php(49): MediaWiki->run()
#20 {main}


Version: REL1_22-branch
Severity: normal

Details

Reference
bz59085

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:34 AM
bzimport set Reference to bz59085.
bzimport added a subscriber: Unknown Object (MLST).

GWToolset 0.1.0(911f696)
MediaWiki 1.22.0 (6071399)
PHP 5.4.17 (cgi-fcgi)

Change 104319 had a related patch set uploaded by Dan-nl:
add templatedata api check

https://gerrit.wikimedia.org/r/104319

jaider,

thanks for the bug report. for now, you should be able to overcome this
exception by installing:

http://www.mediawiki.org/wiki/Extension:TemplateData
http://www.mediawiki.org/wiki/Extension:Scribunto

note, you should also have the following MediaWiki templates imported or
already installed from Commons:

you can read more in the attached patchset’s INSTALL instructions.

Change 104319 merged by jenkins-bot:
add templatedata api check

https://gerrit.wikimedia.org/r/104319

jaider,

the patch has been merged into the master branch, so you can now update your local repo and not worry about including the extensions TemplateData and Scribunto.

please close this ticket if you’re satisfied with this patch. if not, please indicate what else needs to be addressed.

Thank you, dan,

This extension is awesome.
One thing I want to suggest (but this is a feature request) is to add the possibility to filter (or to map) by xml attributes, too. Currently, you can only map by elements. This is bad to formats like MARCXML (a standard from the library community). See, for example:

http://www.loc.gov/standards/marcxml/Sandburg/sandburg.xml

(I will upload the print screen showing the problem).

But, thanks again and congratulations.
This extension is very promising for external projects, too (no only Wikimedia Commons).

Created attachment 14206
Another problem (attibutes selection)

Attached:

sandburg.xml.png (916×718 px, 99 KB)

jaider, your welcome.

i’m glad to hear that you like the extension and see its potential outside of Wikimedia Commons. it has a broad history and includes input by many people. here is some of the background information on the project: https://commons.wikimedia.org/wiki/Commons:GLAMToolset_project.

the feature request you made is definitely something we aim to provide in the future if and when possible; it’s similar to this feature request: https://bugzilla.wikimedia.org/show_bug.cgi?id=58490.

if you don’t mind, would you close this bug and open another as a feature request similar to bug 58490.

thanks!