event handler redirect

22 views
Skip to first unread message

Bern e Bern

unread,
Sep 9, 2015, 1:52:02 PM9/9/15
to model-glue
We have inherited an old model glue application we are tasked with upgrading. Within the modelglue.xml file is a reference to a relative url. This works fine in the production environment (windows 2003 ,CF 8, sql server 2005) but it throws an error in our dev environment (windows 2008 r2, CF 10, sqlserver 2012). It complains there is no event handler defined for "/tobaccorecovery/LMS/setuserlogin.cfm". We have very little experience with modelglue so are at a lose as to how to fix this. It's supposed to create an account then forward to the secure area of the application. The account is created fine but the redirect fails as mentioned. Any help is appreciated, thanks.


<event-handler name="do.emailUser">
   <broadcasts>
    <message name="emailRegisterAction" />
   </broadcasts>
   <results>
    <result do="/tobaccorecovery/LMS/setuserlogin.cfm" redirect="true" />
   </results>
   <views />
  </event-handler>

Dan Wilson

unread,
Sep 9, 2015, 1:53:14 PM9/9/15
to model...@googlegroups.com
Check and see if you have URL rewriting at the Web Server layer.
--
--
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog
 
You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to model...@googlegroups.com
To unsubscribe from this group, send email to
model-glue+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en
---
You received this message because you are subscribed to the Google Groups "model-glue" group.
To unsubscribe from this group and stop receiving emails from it, send an email to model-glue+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tom McNeer

unread,
Sep 9, 2015, 4:33:53 PM9/9/15
to model...@googlegroups.com
Shouldn't the "do" attribute in a result be set to the name of another event, not to a URL?
--
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560

Bern e Bern

unread,
Sep 14, 2015, 12:03:57 PM9/14/15
to model-glue
I solved this by moving the redirect into a view file. Sort of built a bridge…

 

<event-handler name="do.emailUser">

                <broadcasts>

                                <message name="emailRegisterAction" />

                </broadcasts>

                <results>

                <result do="page.setuserlogin" redirect="true" />

                </results>

                <views />

</event-handler>

 

<event-handler name="page.setuserlogin">

                <broadcasts>

                </broadcasts>

                <results>

                </results>

                <views>

                <include name="body" template="dspGoToLMS.cfm">

                                                                                                                                               

                </include>

                </views>

</event-handler>

 

dspGoToLMS.cfm

<cflocation url="/tobaccorecovery/LMS/setuserlogin.cfm">

Dan Wilson

unread,
Sep 14, 2015, 12:05:15 PM9/14/15
to model...@googlegroups.com
I would love to know why the redirect functioned in production as it was originally coded.


DW

Jared Rypka-Hauer

unread,
Sep 14, 2015, 6:28:35 PM9/14/15
to model...@googlegroups.com
My guess: It was discovered to be broken in production and rather than figure out how to make it work correctly (as Bern did below), they hacked the framework to “make it work correctly”…

Do a compare (BeyondCompare is awesome) and I’ll bet you’ll find edits in the production version of the framework.

Just a guess, but that’s about the only way this could POSSIBLY have been working in the first place.

/j

...
Reply all
Reply to author
Forward
0 new messages