Re: Searchable behavior on two models

2010-03-11 Thread Delberto
Sorry, here is the link -->
http://code.google.com/p/searchable-behaviour-for-cakephp/issues/detail?id=19


On Mar 10, 4:16 pm, Foroct  wrote:
> Well it looks like this behaviour can't successfully index two
> different models. Moving back to an old fashioned 'find'.
>
> Thanks all.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Searchable behavior on two models

2010-03-11 Thread Delberto
If you are talking about saving to more than one model with a saveAll
there is a patch here. I haven't tried it myself but you can check it
out

On Mar 10, 4:16 pm, Foroct  wrote:
> Well it looks like this behaviour can't successfully index two
> different models. Moving back to an old fashioned 'find'.
>
> Thanks all.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Uploading large file (16MB). Where to use set_time_limit()

2009-08-05 Thread Delberto

Hello,

I have an application that needs to allow large file uploads.
upload_max_filesize is 16MB so that shouldn't be a problem. It
basically sits there and doesn't display any errors. Then it stops
processing and leaves you on the same form.

I'm assuming it is timing out so I want to use  set_time_limit() to
allow more time. The question is where to put this code? I tried it in
the controller action and in the component but I think that this code
is executed after the file has completely uploaded.

I'm using the file_upload component from the bakery.
http://bakery.cakephp.org/articles/view/file-upload-component-w-automagic-model-optional

Any help would be appreciated.

Best Regards,
   Derek
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cannot modify header information - headers already sent by

2009-07-28 Thread Delberto

Problem solved. Seems there was a space in the webroot/index.php Quite
frustrating.

On Jul 28, 12:44 pm, Delberto  wrote:
> Hello,
>
> I am having a problem with my application. I have it running fine on
> my local development machine. Yet when I put it on the server I get
> this error "Cannot modify header information -headersalreadysent
> by". I have checked the controllers and models for spaces before  and after ?> but I cannot find any.
>
> I am using Wamp on my local machine and the remote server is Linux
> with PHP5 on it.
>
> Any ideas would be appreciated as I have been nearly a day trying to
> figure this out.
>
> Cheers,
>   Derek
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Cannot modify header information - headers already sent by

2009-07-28 Thread Delberto

Hello,

I am having a problem with my application. I have it running fine on
my local development machine. Yet when I put it on the server I get
this error "Cannot modify header information - headers already sent
by". I have checked the controllers and models for spaces before  but I cannot find any.

I am using Wamp on my local machine and the remote server is Linux
with PHP5 on it.

Any ideas would be appreciated as I have been nearly a day trying to
figure this out.

Cheers,
  Derek
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Redirect loop using Auth + Acl component

2009-07-01 Thread Delberto

Thanks guys. I think I figured it out. I was using the Drayan's
version of the phpThumb component from the bakery (http://
bakery.cakephp.org/articles/view/phpthumb-component). I found another
post that says the phpThumb component should extent Object and not
Component. I made that change and my redirect loops have disappeared.
Can anyone tell me why?

On Jul 1, 3:27 pm, NegoBlack®  wrote:
> I think that is not a good idea... I remeber to read in some place on
> the docs that it was not recomended. Could you tell more about your
> Auth system?
>
> On Jul 1, 9:03 am, GravyFace  wrote:
>
> > Not sure about your code, but try adding 
> > $this->Auth->allow('login');http://book.cakephp.org/view/382/allow
>
> > On Wed, Jul 1, 2009 at 5:49 AM, Delberto wrote:
>
> > > Hello,
>
> > > I am building an application and am having an issue with one of my
> > > controllers. I get the following message in Firefox
>
> > > "Redirection limit for this URL exceeded.  Unable to load the
> > > requested page.  This may be caused by cookies that are blocked"
>
> > > I have followed the cookbook tutorial Simple Acl controlled
> > > Application. I haven't got this error on my other controllers so I'm
> > > wondering what has gone wrong. The error is intermittent but it is a
> > > bit of a show stopper.
>
> > > Any help you can give would be gratefully received.
>
> > > Best Regards,
> > >  Derek
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Validating associated models fields - cannot get it working.

2009-07-01 Thread Delberto

Hello,

When you are saving to more than one model at one time you should use
the SaveAll method. Something like this -->

if ($this->User->saveAll($this->data, array('validate'=>'first'))){

In your view you should have something like this#

echo $form->input('User.password_new', array('type' =>
'password','label' => 'Password'));
echo $form->input('User.password_confirm', array('type' =>
'password','label' => 'Confirm Password'));
echo $form->input('Artist.firstname');
echo $form->input('Artist.surname');




On Jul 1, 12:25 pm, number9  wrote:
> OK, So the validation messages are displaying, but they are displaying
> the whole time regardless of whether or not they should be...
>
> Now I'm not so sure I'm accessing the fields properly at all
>
> Any suggestions?
>
> On Jul 1, 11:53 am, number9  wrote:
>
> > Well I've got the validation message to display now, it works but
> > feels a bit hacky?
>
> > I stored the validation errors array in a variable:
>
> > validationErrors; ?>
>
> > I then accessed the error for the relevant field names and outputted
> > it if there was an error message:
>
> > if (isset($v_errors['Post']['Tag.name'])) { echo " > message\">".$v_errors['Post']['Tag.name'].""; }
>
> > My guess is that something I did in the controller caused the error
> > messages not to display for those particular fields. If anybody would
> > like to shed light on this, I would love to hear it!
>
> > On Jul 1, 11:21 am, number9  wrote:
>
> > > OK, so the minute I posted this, I noticed that actually the field
> > > names are OK, but the messages are not displaying for those fields.
>
> > > Output of validationErrors); ?> :
>
> > > Array
> > > (
> > >     [Post] => Array
> > >         (
> > >             [name] => The name for your tip should be at least 10
> > > characters.
> > >             [Tag.name] => 10 chars please.
> > >         )
>
> > > )
>
> > > The "name" field error is displayed, but the "Tag.name" fields error
> > > isn't...
>
> > > On Jul 1, 11:09 am, number9  wrote:
>
> > > > I have a form where users can add tags/images at the same time as
> > > > adding a post.
>
> > > > These fields are referenced like this in the view:
>
> > > > echo $form->input('Img.pic')
> > > > echo $form->input('Tag.name')
>
> > > > I am trying to add validation rules to these fields in the post model,
> > > > referencing the fields as follows:
>
> > > >         'Img.pic' => array(
> > > >                         // rules etc. go here
> > > >                 )
>
> > > >         'Tag.name' => array(
> > > >                         // rules etc. go here
> > > >                 )
>
> > > > I have also tried adding validation rules to the Tag model (no Img
> > > > model exists because it is a component).
>
> > > > How should I be doing this? I have searched but cannot find a
> > > > solution. I have tried various validation rules and the rest of the
> > > > models validation rules are working fine.
>
> > > > Would appreciate any suggestions!
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Redirect loop using Auth + Acl component

2009-07-01 Thread Delberto

Hello,

I am building an application and am having an issue with one of my
controllers. I get the following message in Firefox

"Redirection limit for this URL exceeded.  Unable to load the
requested page.  This may be caused by cookies that are blocked"

I have followed the cookbook tutorial Simple Acl controlled
Application. I haven't got this error on my other controllers so I'm
wondering what has gone wrong. The error is intermittent but it is a
bit of a show stopper.

Any help you can give would be gratefully received.

Best Regards,
  Derek

--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: ACL denying access issues

2009-05-21 Thread Delberto

Hello,

Try this page. -->http://book.cakephp.org/view/648/Setting-up-
permissions
It is part of the turorial on Auth and ACL. It seems to work for me.

$group =& $this->User->Group;

$group->id = 2;
$this->Acl->deny($group, 'controllers');

Best Regards,
  Del

On May 20, 11:33 pm, hahmadi82  wrote:
> Hi,
>
> I have set up my ACL based on this tutorial:
>
> http://komunitasweb.com/2009/03/cakephp-acl-tutorial-what-and-how/
>
> This tutorial has a user management system with add, delete, index, and edit
> functionality. The problem I'm having is that no matter how I set up my
> aros_acos permissions, the Users always have access to these pages once
> logged in.  I can deny them access:
>
> cake acl deny Group.3 Users all
>
> or not set it up at all, yet once they log in, they have access to all those
> views.  Please help, thanks!
>
> --
> View this message in 
> context:http://www.nabble.com/ACL-denying-access-issues-tp23644791p23644791.html
> Sent from the CakePHP mailing list archive at Nabble.com.

--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---