# tracker issue : CF-3148745

select a category, or use search below
(searches all categories and all time range)
Title:

| View in Tracker

Status/Resolution/Reason: Closed/Deferred/EnhancementRequired

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)

Created: 03/25/2012

Components: Scheduler

Versions: 10.0

Failure Type: Enhancement Request

Found In Build/Fixed In Build: Public Beta /

Priority/Frequency: Trivial / Few users will encounter

Locale/System: English / Win All

Vote Count: 0

When <cfschedule action="update" eventhandler="path.to.MyCFC" is ran, then apparently CF does this:

1) Stores original path.to.MyCFC value
2) Stores the expanded version (ex: c:\path\to\MyCFC.cfc)

4) Upon submit, it passes only "path.to.MyCFC" to the action page (does not pass c:\path\to\MyCFC.cfc to the action page)
5) The action page gets "path.to.MyCFC" and looks around the system in C:\inetpub\wwwroot and C:\ColdFusion10\cfusion\wwwroot for this file/path.
6) Throws error "Eventhandler MyCFC does not implement required interface" b/c it cannot find the handler MyCFC.cfc

Thus, the Add/Edit Task page probably needs two event handler input fields (absolute and dot).  And the absolute path input field should probably have a file picker.  Sound good?

Watson Bug ID:	3148745

External Customer Info:
External Company:
External Customer Name: itisdesign
External Customer Email:

Attachments:

Comment by External U.
19935 | March 25, 2012 05:03:15 AM GMT
Admin will pick up the IIS site through which you have accessed the admin. And that made me think. How are you accessing the admin and how did you create the task. Is it by using the same site? If you are accessing the admin using one IIS site and trying to configure an eventhandler that exists in another IIS site, it would fail. Note: I am shooting in the dark here.
Comment by Himavanth R.
19936 | March 26, 2012 05:47:24 AM GMT
I always access CF Admin via the Default Site via localhost. *Never* thru any of the publicly-accessible sites. Yes, the task was ran under one of the other sites. But, again, I never access CF Admin thru any of these. Only thru Default Site/localhost. I think restricting access to CF Admin, in this manner, is common.
Comment by External U.
19937 | March 26, 2012 07:16:33 AM GMT
If admin can only search w/in the IIS site used to access it, then can admin just not search for the handler CFC at all? Currently it causes a problem b/c it prevents task edits (b/c it can't find the CFC, to verify the "implements").
Comment by External U.
19938 | March 26, 2012 07:16:56 AM GMT
OR, how about this.. An _optional_ checkbox below the event handler field: "[x] Ensure CFC properly implements cfide.scheduler.ITaskEventHandler". That way, if someone really wants to verify it, they still can. I dunno.. just thinking :)
Comment by External U.
19939 | March 26, 2012 07:17:22 AM GMT
Can you confirm that it works if you access the admin through the same site with which you have created the task? As for the new checkbox, we can consider it as an enhancement.
Comment by Himavanth R.
19940 | March 26, 2012 07:21:23 AM GMT
Yes, just verified it works fine if I access the admin through the same site with which I created the task. Since verification failure prevents updating a task via admin, can the verification check be removed until that checkbox is added? Do I need to file an ER for the checkbox, or can it be a part of this ticket? Thanks, -Aaron
Comment by External U.
19941 | March 26, 2012 07:30:19 AM GMT
And I think the error is misleading: "Eventhandler path.to.MyCFC does not implement required interface" The issue is that it cannot "find" the handler. So maybe the error message should be changed as well? Suggestion: "Eventhandler path.to.MyCFC does not exist" That would've been more helpful in troubleshooting this, if the error matched the issue.
Comment by External U.
19942 | March 26, 2012 07:41:52 AM GMT
The error message has been fixed in the latest build. Now the error message clearly says that the event handler is not found. When there are multiple IIS sites, accessing the CF Admin from one site and providing an eventhandler CFC (in scheduled tasks page) that is under another site throws an error that the eventhandler is not found. To avoid this, the customer wants a checkbox under the eventhandler input box to disable the check on eventhandler.
Comment by Himavanth R.
19943 | March 26, 2012 07:50:22 AM GMT
Hi Himavanth, Regarding: "Now the error message clearly says that the event handler is not found." Yes, the new message is clearer (thanks!). Maybe it could be even clearer? How about: "Error: Event handler path.to.mycfc could not be found in the current site." (Note the addition of "in the current site", b/c users may not understand why that error is thrown. So adding those 4 words would really clarify it.) Thanks again! Also, the new message contains some typos. Here is the current message: ----------- An error occured scheduling the task. Invalid eventhandler. Error: Eventhandler asdf could not be found. ----------- On line 1: "occured" should be "occurred" On line 2: "eventhandler" should be "event handler" On line 3: "Eventhandler" should be "Event handler" B/c "occurred" has 2 r's. And "event handler" is 2 words: http://en.wikipedia.org/wiki/Event_%28computing%29#Event_handler Thanks!, -Aaron
Comment by External U.
19944 | May 13, 2012 03:17:30 PM GMT