AT_alphanum keep rejecting my argument
Posted: 06 December 2020, 00:33
I have the following code snippet in action.php:
And this is the client side code:
This keeps fataling my request:
In fact any sort of string keeps fataling, even just "hello":
So either I have a really silly bug here somewhere, or something is broken with the framework's arg parasing.
Any idea what might be going on?
Code: Select all
self::setAjaxMode();
$actions = self::getArg('declaredActions', 'AT_alphanum', true);
self::dump('actions', $actions);
$this->game->declareActions($actions);
self::ajaxResponse();Code: Select all
this.ajaxcall(
'/alchemistsjokr/alchemistsjokr/declareActions.html', { lock: true, declaredActions: this.chosenActionSpaces.join(' ') },
this,
function() {},
function() {}
);Code: Select all
06/12 00:24:42 [error] [T216294] [2341045/jokr3] Unexpected exception: Bad argument type: declaredActions should be a AT_alphanum (forage forage transmute) (BGA service error 1607210682)#
#0 /var/tournoi/release/games/alchemistsjokr/999999-9999/alchemistsjokr.action.php(35): APP_Action->getArg('declaredActions', 'AT_alphanum', true)#
#1 /var/tournoi/release/tournoi-201204-0905-gs/www/include/webActionCore.inc.php(189): action_alchemistsjokr->declareActions()#
#2 /var/tournoi/release/tournoi-201204-0905-gs/www/index.php(242): launchWebAction('alchemistsjokr', 'action_alchemis...', 'declareActions', false, false, NULL, true, false)#
#3 {main}h
http://1.studio.boardgamearena.com/1/alchemistsjokr/alchemistsjokr/declareActions.html?lock=28986f6f-e6f1-4706-8601-29adfad8edc2&declaredActions=forage%20forage%20transmute&table=216294&testuser=2341045&dojo.preventCache=1607210684547Code: Select all
06/12 00:32:40 [error] [T216294] [2341045/jokr3] Unexpected exception: Bad argument type: declaredActions should be a AT_alphanum (hello) (BGA service error 1607211160)#
#0 /var/tournoi/release/games/alchemistsjokr/999999-9999/alchemistsjokr.action.php(35): APP_Action->getArg('declaredActions', 'AT_alphanum', true)#
#1 /var/tournoi/release/tournoi-201204-0905-gs/www/include/webActionCore.inc.php(189): action_alchemistsjokr->declareActions()#
#2 /var/tournoi/release/tournoi-201204-0905-gs/www/index.php(242): launchWebAction('alchemistsjokr', 'action_alchemis...', 'declareActions', false, false, NULL, true, false)#
#3 {main}h
http://1.studio.boardgamearena.com/1/alchemistsjokr/alchemistsjokr/declareActions.html?lock=bfe7b9d1-e1d5-488a-8ade-765c5d4be6fa&declaredActions=hello&table=216294&testuser=2341045&dojo.preventCache=16072111629620
06/12 00:32:40 [notice] [T216294] [2341045/jokr3] ER-300 430 d10 c0 e317 m0 I423 A0 V0 T0 /1/alchemistsjokr/alchemistsjokr/declareActions.html?lock=bfe7b9d1-e1d5-488a-8ade-765c5d4be6fa&declaredActions=hello&table=216294&testuser=2341045&dojo.preventCache=1607211162962Any idea what might be going on?