upgrade from 1.2 beta to 1.2RC3

2008-12-08 Thread JermWorm

In my continuing effort to upgrade an app that is working on a early
1.2 beta of Cake I've now encountered another issue with the $form
helper.

I have a file called detform.ctp which has a number of fields which is
included use php's require in a number of different 'parent' forms.

If I use inside detform.ctp:
echo $form-input('Table.field')
In an editing form rendered from the 'Tables' controller 'edit' action
now appears to generate.
The form is opened using $form-create('Table') although I also tried
$form-create(null)
input id=TableTableField type=text value=Myvalue name=data
[Table][Table][field]/

snippet of edit.ctp
?php $form-create('Table'); ?
div
?php require('detform.ctp'); ?
/div

I want to specify the table name because I also 'require' the sub-form
in a search facility that also accepts fields from other tables -
which by the way the id's and names are generated as I would expect -
I don't want to get wet i.e. not DRY by making a different copy of the
subform that caters to both requirments.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: upgrade from 1.2 beta to 1.2RC3

2008-12-08 Thread JermWorm

Just a followup

I moved the subform to an element and chaged require to a echo $this-
element('mysubform') results - exactly the same problem.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: upgrade from 1.2 beta to 1.2RC3

2008-12-08 Thread JermWorm

Can't see a spelling error but there is a field with the same name as
the model i.e. following the above example Table.Table in real life
Practice.Practice where the field 'Practice' is the name of the
Practice, considering the automagic with lists I'm guessing this might
be my problem, however it's a major refactoring job to fix that (it
came that way from a legacy system) there are mysql views and numerous
places where the field name is used, and why would it affect the other
fields on the form and why did it work fine in the 1.2 beta.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Ajax and Sessions

2008-12-08 Thread JermWorm

Hmm, no one else having/had this problem?

In the meantime I've added the following to force a session start in
my beforeFilter:

if (isset($_POST[CAKE_SESSION_COOKIE])) {
session_name(CAKE_SESSION_COOKIE);
session_id($_POST[CAKE_SESSION_COOKIE]);
}
session_start();

It seems to work for now - but I'd still like to know why the session
isn't being started before my before filter in ajax requests but it is
being started before the before filter in normal requests.

Regards
Jeremy
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Ajax and Sessions

2008-12-07 Thread JermWorm

I'm trying to upgrade and app from an older beta of cake to RC3.

In my app_controller, I have a before filter that checks whether the
user is logged in via a session variable, but in the course of
debugging I've noticed that the session variable isn't there(i.e.
session not started?) when ajax requests are being processed, it is
there when normal requests are being processed, I set security in
core.php to low (it was on medium) with no difference, $helpers/
$components definetly includes 'Session'.

Am I missing something in the update I need to do I have looked
through the latest api/manuals but can't see why the session start is
being bypassed.

Regards
Jeremy
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---