I am trying to build an SES link to an action within a handler within a package within a module. When I access the event “candidate:remote.applicationProcess.nearbyLocations” as a URL variable, it works fine. But when I build an SES link it does not work. Here’s the code:
The event syntax is different from how SES works. With SES, you are accessing a slash-delimited route defined by the entry point of the module. BuildLink() doesn’t do any translation on the “linkto” variable you pass in, it just replaces . with / (assuming “translate” is true) tacks it on to the end of the SESBaseURL. So you basically need to pass in exactly what you expect to end up in the URL
What happens if you do this? #event.buildLink(“candidate/remote/applicationProcess/nearbyLocations”)#
I am guessing that without the package path it will work? There seems to be an issue with packages and ColdBox as others have found out along the way, it seems that this is not on the top of Luis’s list of things to fix.
I bumped into this issue as well. In the end I resolved it by setting translate=“false”… not sure if this is the right approach, but it seems to work fine… even with translate set to false, it is still prepending the baseURL, and (in my case, as i don’t have urlrewrite setup on server yet) it is prepending index.cfm/
gives me “127.0.0.1/index.cfm/admin/settings.profileevents/edit”. With default of translate=true, it was replacing the settings.profielevents with settings/profileevents, which threw the unregistered event error.