View Full Version : ExtDesigner + Codeigniter and session variables

23 Oct 2010, 4:35 AM
Not sure if this is an obvious limitation or if there is a planned update to ExtDesigner but I'd like to ask about the following scenario:

Let's say you're using Codeigniter and an authentication lib like IonAuth and you've got a combo binded to a JsonStore. The combo will populate based on some login info that has been set in a session variable (so running in a browser you have authenticated and a userId session var has been set). However, when doing your design in ExtDesigner, the store wont load as the 'internal browser' (or whatever the ExtDesigner is using to send the POST), doesn't have acess to that session var (it hasnt authenticated) so you end up with a PHP error (trying to access a var that isnt set) headers are sent and then you get the ExtDesigner 'Store load error' message.

I see Jared has said that there will be an update to the setting GET/POST issue at some point for JsonStores (I just use setBaseparams {PostWorkaround:1} to force a POST for now)

Apologies for the long winded question

27 Oct 2010, 4:00 AM
Jarred, any ideas?

27 Oct 2010, 6:06 AM
Hey DrZog,

The GET/POST setting issue is actually in relation to configuring your HttpProxy. Your baseParam workaround is good if you want to load the data within the Designer software. You could alternatively change your baseParams to pass the session ID, and have Codeigniter read the session ID from the request variables rather than from the cookies. I don't know the internals of Codeigniter or extensions like IonAuth, but that's a common workaround for Flash since it cannot pass cookie values.

I think what you're doing now is fine. Being able to configure your own HttpProxy is not going to remedy the situation. The fundamental issue is that the Designer has not authenticated and stored a cookie with your application. Your work around is sufficient.