Ticket #423 (closed defect: fixed)
Missing event handler does not catch missing event
| Reported by: | nickel4242 | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | 3.2 |
| Version: | 3.2.750.403 | Severity: | major |
| Keywords: | missing event | Cc: |
Description
I have tested with the latest SVN version of Model-Glue 3.2 and the missing event handler does not catch missing events. I have tracked this down to Invocation.cfc. It checks a struct called "eventHandlers" from the modelglue object for the missing event handler name. The problem is, this handler does not exist in that struct due to lazy loading (my guess), so it passes it to the last portion of the invocation process which throws an Model-Glue: There is no known event handler for ""#initialEventHandlerName#"". error.
I have created a patch for this to fix it. Rather than check the struct, you can use the hasEventHandler and getEventHandler methods to load the event handler for the missing event handler.
Patch is attached. Trac won't let me choose the 3.2 from the version drop-down.
![(please configure the [header_logo] section in trac.ini)](/ModelGlue.com/trac.cgi/chrome/site/your_project_logo.png)