Re: cfinvoke newb question
thanks Ian. Choop told me to in my application.cfm, bypassing the call in the application.cfc now every thing seems to work thanks choop & Ian ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324665 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfinvoke newb question
> > > >sessionmanagement="yes" sessiontimeout="#CreateTimeSpan(0,1,0,0)#"> Uncomment the in the Application.cfc. You definitely need this so that the code under the applicaiton.cfm and the code under the application.cfc exist in the same application and thus can share the same application and session scope memory. Then post the new errors you get. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324661 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfinvoke newb question
application.cfc in folder: /rittalxpress/cart in application.cfm in / root folder and a bunch of other stuff only this. stuff is ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324651 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfinvoke newb question
Paul Ihrig wrote: > the application.cfm is at the site root. > and dosnt have any thing to do with the cart... Your problem has nothing to do with the cart itself or the component that created it. This problem is all about the session scope and its complex relationship to the application name and the cfid and cftoken cookies. You would be having the same problem with a simple integer in the session scope under the same conditions. It is just a matter of figuring out what those conditions are. What do you have defined in the 'this' scope in the application.cfc in the cart folder? How does that relate to an tag in the application.cfm site root? ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324611 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfinvoke newb question
the reson the id's are different is becasue the link i sent. it had the cfid in it.. any how the stuff that does the cart is all from chapter 22 of cfwack 8-1 the application.cfc in the folder cart is pretty simple just change the name or commented it out? the application.cfm is at the site root. and dosnt have any thing to do with the cart... basically the way i think it should go if you are on this page and click add item http://63.144.103.199/products/index.cfm?n1Id=11&n2Id=81&n3Id=295 it shuld fire off component rittalxpress.cart.ShoppingCart cfc. which is called by #SESSION.myshoppingcart# or some thing... the http://63.144.103.199/rittalxpress/cart/LX_right1.cfm is included on any of those xpress pages and just shows you a count and such of what you have http://63.144.103.199/rittalxpress/cart/StoreCart.cfm shows the actual results... here at home i see http://63.144.103.199/products/index.cfm?n1Id=11&n2Id=81&n3Id=295 throwing an error. but i can add items... see result count seperatly here: http://63.144.103.199/rittalxpress/cart/LX_right1.cfm which is same include throwing error.. and see items in cart here: http://63.144.103.199/rittalxpress/cart/StoreCart.cfm i am flustered and am gonna grab a beer and play prototype for a bit. maybe if you get a sec and can point me in the right direction i will hask it out in the mornning... ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324610 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfinvoke newb question
Paul Ihrig wrote: > yeah i dont get it.. > reading as fast as i can so i can get this straightend out.. > > http://63.144.103.199/products/index.cfm?n1Id=11&n2Id=81&n3Id=296&CFID=219745&CFTOKEN=60381247 > cfid219745 cftoken 60381247 > http://63.144.103.199/rittalxpress/cart/LX_right1.cfm > cfid219360 cftoken 42526293 The different number for the CFID and CFTOKEN mean that these are two completely different session states. They will not share data with each other. Somehow or the other the way your application is structured you are creating different sessions, possible because of different applications, in different parts of the application. To solve this we would need to see the directory structure of your application, where do you have Applicaiton.cfm and|or Applicaiton.cfc files, and what is in those files to define the application environments. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324601 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfinvoke newb question
yeah i dont get it.. reading as fast as i can so i can get this straightend out.. http://63.144.103.199/products/index.cfm?n1Id=11&n2Id=81&n3Id=296&CFID=219745&CFTOKEN=60381247 http://63.144.103.199/rittalxpress/cart/LX_right1.cfm http://63.144.103.199/rittalxpress/cart/StoreCart.cfm ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324600 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfinvoke newb question
Paul Ihrig wrote: > yeah, not sure. > just gonna re-read chapter 20... > 11+ years at this and still a newb! Ha! There is a change one has to make when one starts working with components and putting them into persistent memory. It is not something ColdFusion developers had to worry about in the days where every request resulted in the CFM code being interpreted. With that just-in-time interpretation, any change in the CFM source file would take immediate effect the very next time the file was requested. When one starts creating components and persisting them in memory, one has to think about the difference between the code that is in the source file and the code that is already in memory and that a new request for the object in memory is not going to require a call to the source file unless it does not exist in memory or something tells it to reinitialize the object from the source file. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324599 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfinvoke newb question
yeah, not sure. just gonna re-read chapter 20... 11+ years at this and still a newb! Ha! On Thu, Jul 16, 2009 at 11:44 AM, Ian Skinner wrote: > > Paul Ihrig wrote: >> ok to get it to work again this time i had to add this and then >> comment it out in application.cfm >> >> >> > component="rittalxpress.cart.ShoppingCart"> >> >> then after the delete it pick up the info that is in the cfc in folder >> cart... >> wtf... > > That code looks like something that would cause the reinitialization of > your component. When you put a component into a persistant memory > scope, like session. Changing the code in the CFC file will have NO > affect on the object that already exists in memory. One had to use > code, something like this, to delete the object in memory and have it > reinitialized from the CFC file. > > Is that what you may be having difficulty with here? > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324598 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfinvoke newb question
Paul Ihrig wrote: > ok to get it to work again this time i had to add this and then > comment it out in application.cfm > > > component="rittalxpress.cart.ShoppingCart"> > > then after the delete it pick up the info that is in the cfc in folder cart... > wtf... That code looks like something that would cause the reinitialization of your component. When you put a component into a persistant memory scope, like session. Changing the code in the CFC file will have NO affect on the object that already exists in memory. One had to use code, something like this, to delete the object in memory and have it reinitialized from the CFC file. Is that what you may be having difficulty with here? ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324594 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfinvoke newb question
ok to get it to work again this time i had to add this and then comment it out in application.cfm then after the delete it pick up the info that is in the cfc in folder cart... wtf... On Thu, Jul 16, 2009 at 11:10 AM, Paul Ihrig wrote: > i have application.cfm in root of site. > the application.cfc is just in the cart folder. > > not sure why it works, and then stops... > not sure how to get the code to work again.. > getting flusterd... > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324592 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfinvoke newb question
i have application.cfm in root of site. the application.cfc is just in the cart folder. not sure why it works, and then stops... not sure how to get the code to work again.. getting flusterd... ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324591 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfinvoke newb question
ok weirdness. so i go home last night after getting things to work a little. i pull up url and see "Element MYSHOPPINGCART is undefined in SESSION" i am like aw crap... so i go into work this morning.. nothing has changed.. or so i think.. mess with a bunch of files. no luck. so i open the app.cfc in my cart folder. i had to Change the name remove the this. and then undo those changes. save upload,m andf it works again??? now wth is that? i really need to understand whats going on. i am the very beginning of trying to work out a new app. just want to do it right ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324582 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfinvoke newb question
Ian thank you! it was the name scope i was using in the example c22 changed it, and it seems to work as expected, slow and all, but i am just trying to learn a little some thing. befor i move on.. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324546 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfinvoke newb question
Paul Ihrig wrote: > ok... > well we have a pretty intensive application.cfm > > i tried placing the > > from the application.cfc inside the application.cfm in root of site > but that threw a whole crapstorm of other errors. > Yeah that was a really strange idea! > > also tried > > > > > but that didnt work either. Another strange one. I think what is required here is that the directory that contains the file being called: D:\webserver\rittal-corp.com\www\rittalxpress\cart\ Make sure that this directory is covered by an Application.cfc or Application.cfm file that defines the same name as the rest of the application code. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324545 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfinvoke newb question
so could i just get rid of the this. stuff? ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324540 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfinvoke newb question
ok... well we have a pretty intensive application.cfm i tried placing the from the application.cfc inside the application.cfm in root of site but that threw a whole crapstorm of other errors. also tried but that didnt work either. http://63.144.103.199/products/product_details.cfm?n1Id=11&n2Id=81&n3Id=297&pn=8018114 click add to cart. just a rough... {i have till q1 to come up with a real cart?? wtf..} http://63.144.103.199/rittalxpress/cart/LX_right1.cfm was the page i was including on the right was just going to show empty cart or items in cart. crud like that... really kinda wondering why chapter 21-23 where left out of the printed book?? ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324539 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfinvoke newb question
Paul Ihrig wrote: > if i am cfincluding the page from another page out side the directory > with the app.cfc and other cfc > it craps out on me.. My first thought is that when you include it from outside the main directory with the Application.cfc, it causes the code to run outside of the define "Application' and thus has no access to the shared memory. This is a prime example of why accession data outside of a component with code like #session.myShoppingCart# is considered a bad OOP practice. The best practice advice to to always pass the required data into the component as arguments, don't require the component to be aware of the environment outside of itself. There is a complex relationship between the name of an Application as defined by the "name: property of the tag OR the 'this.applicationName" property of an Application.cfc file. Any code that does not run under the same name does not share the same Application or Session memory states. When one starts using components, it is common to put them outside the web root where the code does not run under the defined application name and thus does not share the memory. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324537 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
cfinvoke newb question
ok if i load the page in my browser with this in it it runs just fine. BUT if i am cfincluding the page from another page out side the directory with the app.cfc and other cfc it craps out on me.. "The component attribute in cfinvoke tag has invalid value. " so think agh! i will just point it directly to the cfc.. i get no recordset returned, even though i know i have 2 items in cart... yes its from chapter 22 of cfwak 8-1 ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324532 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4