Orange is my favorite color

If you’re using my actionpack for search-engine safe URLs for Model-Glue, you may have noticed that appending values with a <result> to a redirected event uses the normal ?var=value syntax.

This unfortunately can’t be fixed by an external modification like my actionpack however the needed modification to the core is extremely tiny so I have made it with plans to manage it going forward using Subversion.

To make this change, you will need to edit ModelGlue/unity/eventrequest/EventContext.cfc at line 227:

<cfset appendedState = appendedState & "&" & i & "=" & arguments.stateContainer.getValue(i) />

should be changed to:

<cfset appendedState = appendedState & "/" & i & "/" & arguments.stateContainer.getValue(i) />

If you’re not using rewrite rules with either Apache or IIS, you might have noticed that Model-Glue itself doesn’t understand the slash-separated values. For example, if you try to trigger a reload like:

index.cfm/event/foo/reload/true

It doesn’t work. Instead, you need to parameterize it with the question mark like so:

index.cfm/event/foo?reload=true

This is because MG looks for the reload key prior to the actionpack getting loaded into the stack. You can ignore this if you’re using rewrite rules.

Leave a Comment

XHTML: Line-breaks are automatic. Available tags are <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <img src="">