I ran into the same issue once.

It turned out Firebug, or the YSlow plug in was running the request again
to time it.

I nearly pulled out my hair, before I figured it out.

On Dec 6, 2012 5:13 PM, "JR" <[email protected]> wrote:
>
> Is the version of Model-Glue out of date? I ran into an issue a while
back where listeners were duplicated depending on how the application was
initialized.
>
> http://docs.model-glue.com/ticket/404
>
>
> On Thu, Dec 6, 2012 at 4:57 PM, olivierb <[email protected]>
wrote:
>>
>> Hi,
>>
>> I have a model-glue app running that's been fine but on our development
environment, I've recently noticed a problem where it seems that events are
being triggered two times. I just noticed this because when I call an event
thats adds an item to SESSION scope, it gets added 2 times.
>>
>> I'm running the following code on a test page:
>>
>> <cfif StructKeyExists(URL, "clearSession") AND URL.clearSession EQ 1>
>> <cfset structDelete(SESSION, "myCounter")>
>> </cfif>
>>
>> <cfif StructKeyExists(SESSION, "myCounter")>
>> <cfset SESSION.myCounter += 1>
>> <cfelse>
>> <cfset SESSION.myCounter = 1>
>> </cfif>
>>
>> <cfdump var="#SESSION#" label="SESSION">
>>
>> <cfdump var="#SESSION.myCounter#" format="text"
output="#getDirectoryFromPath(getBaseTemplatePath())#\devlog.txt" />
>>
>>
>> When I call the the page as:
>> test?clearSession=1
>>
>> I see on the screen that:
>> myCounter is 1
>>
>> The devlog.txt file contains:
>>
>> 1
>>
************************************************************************************
>>
>> 1
>>
************************************************************************************
>>
>>
>> When I call the page a second time as just: test
>> (without the clearSession URL parameter)
>>
>> I see on the screen that:
>> myCounter is 1
>>
>> The devlog.txt file contains:
>>
>> 1
>>
************************************************************************************
>>
>> 1
>>
************************************************************************************
>>
>> 2
>>
************************************************************************************
>>
>> 3
>>
************************************************************************************
>>
>>
>> When I call the page a third time as just: test
>> (without the clearSession URL parameter)
>>
>> I see on the screen that:
>>
>> myCounter is 4
>>
>> The devlog.txt file contains:
>>
>> 1
>>
************************************************************************************
>>
>> 1
>>
************************************************************************************
>>
>> 2
>>
************************************************************************************
>>
>> 3
>>
************************************************************************************
>>
>> 4
>>
************************************************************************************
>>
>> 5
>>
************************************************************************************
>>
>>
>>
>> So it seems that the action is repeated after it is displayed on my
browser, because the text log counter is 1 ahead of the screen.
>>
>> I created a page called test.cfm in my root folder with the same code to
see if this was related to MG and in that test page, the myCounter goes up
by 1 on every refresh.
>>
>> Does anyone have insight onto where to look or how to debug this?
>>
>> --
>> Olivier Bridgeman
>>
>> --
>> 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 [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/model-glue?hl=en
>
>
> --
> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/model-glue?hl=en

-- 
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en

Reply via email to