invalidEventHandler does not work when calling invalid action on valid handler

Description

An exception is thrown when requesting an invalid action on a valid handler. Requesting an invalid handler works as expected, the invalidEventHandler event is invoked.

The exception always references the handler for invalidEventHandler in the error message, even when the requested event is from a different handler.

box server start attached application for sample to reproduce.

Activity

Show:
Luis Majano
January 18, 2021, 5:23 PM

I WIll check this out.

Sean Daniels
January 19, 2021, 4:07 PM

Just in case anyone else stumbles upon this, adding this to the handler for the invalidEvent is a workaround:

Samuel W. Knowlton
February 18, 2021, 2:05 PM

We ran into this earlier this week (but didn’t find this ticket until just now) and solved it a little differently.

it looks like Controller.cfc:885-893 is meant to handle this if I read it right:

except that isMissingAction() isn't returning true even when the action doesn't exist, unless the handler has an explicit onMissingAction() - and the related HandlerService.cfc code did change between 6.1. and 6.2:

that second part is getting triggered.


this is almost certainly not 'the' solution, but it works if I add this line prior to the last return:

Eric Peterson
4 days ago

Thanks for the good reproduction, . Here’s a PR with a fix:

Eric Peterson
4 days ago

By the way, , your fix was correct. I just used a little nicer syntax in overrideEvent.

Fixed

Assignee

Luis Majano

Reporter

Sean Daniels

Labels

None

Components

Fix versions

Priority

Major