Re: CakePHP 1.3.8 - Editing user info causes 404

2016-05-03 Thread Steven Ybarra
Do you have validation when adding a user?

If so, it's probably not adding on an update because it's checking for the
validation.

Turn off validation on the update and see if it works.

i'm not sure the cake1.8 way, but it's something like

$this->MODEL->save($data, $params => array('validate'=>false));

On Mon, May 2, 2016 at 3:05 PM, Josh R <j...@jackmarketing.ca> wrote:

> Hello Group,
>
> I am new to this group and CakePHP.
>
> I am dealing with a site that is build using CakePHP version 1.3.8. When
> adding a new user, everything works fine. When modifying a user (either
> through admin's account or through the user's account) the save function
> keeps the URL of the page (with client ID in url as it should) but the page
> doesn't add the updated data to the database, and gives a 404 page. When
> the URL is copied and entered again in browser the User's page appears, but
> like I mentioned no changes to the User's information was recorded. See the
> start and end of the form functions, there are a lot of fields in this form.
>
> Form->create("User", array("url" => array("controller"
> => "admin", "action" => $this->params["action"]))); ?>
> *There are many fields > echo $this->Form->input("...");, etc...*
> Form->end("Enregistrer"); ?>
>
> I was told that this form was working properly a couple months ago (I just
> recently have been looking into this issue), and then one day the saving of
> the form stopped.
>
> Any help is greatly appreciated. I can also send snippets of code if need
> be.
>
> Thank you in advance!
> josh
>
> --
> Sign up for our Newsletter for updates.
> http://cakephp.org/newsletter/signup
>
> We will soon be closing this Google Group. But don't worry, we have
> something better coming. Stay tuned for an updated from the CakePHP Team
> soon.
>
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Follow us on Twitter http://twitter.com/CakePHP
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: CakePHP 1.3.8 - Editing user info causes 404

2016-05-03 Thread Josh R
Hi Reuben,

Thanks for your quick response yesterday. The URL I am getting is with the 
user ID.

For example: 
When I am logged in as an administrator and go view all users 
(/admin/admin/view_all_users) and I click to edit user ID="305880" (
/admin/admin/user_edit/305880), after making changes to the form I click 
save (Enregistrer) and the URL I come back to is the same 
(/admin/admin/user_edit/305880) 
but displays a 404 page. I can then copy the URL into another tab and the 
page loads (without any changes saved).

So I've been digging through the CakePHP files for the past couple days and 
I must say it's a bit overwhelming with what seems like duplicate 
files/functions in similar filenames with a Postfix of "_bu" (maybe because 
of the way the original developer built it).

Anyways, what I found is the following, please let me know if I am even 
looking in the right spot...
So as I posted yesterday, the form is in app/views/admin/admin_user_edit.php
Form->create("User", array("url" => array("controller" => 
"admin", "action" => $this->params["action"]))); ?>
*There are many fields > echo $this->Form->input("...");, etc...*
Form->end("Enregistrer"); ?>

I did also find a function in app/controllers/admin_controller.php (I 
highlighted the redirect link for user_edit if user already exists)
function admin_user_edit($id = NULL){
$new_user = false;
if (!$id){
$new_user = true;
}
if (!empty($this->data)){
//print_r($this->data);
$this->_uz_remove_data_not_to_be_saved("UserAddress");
$this->_uz_remove_data_not_to_be_saved("UserPhone");
$this->_uz_remove_data_not_to_be_saved("UserEmail");
$this->_uz_remove_data_not_to_be_saved("UserLink");
$this->_uz_remove_data_not_to_be_saved("UserContact");
//print_r($this->data);
//special for new user
if ($new_user){
$this->User->save($this->data, array("validate" => false));
$id = $this->User->id;
$this->data['User']['user_id'] = $id;
}
//pr($this->data); 
//validate password
if (!empty($this->data['User']['password']) && 
!empty($this->data['User']['confirm_password'])){
if ($this->data['User']['confirm_password'] == 
$this->data['User']['password']){
}
else {
unset($this->data['User']['password']);
unset($this->data['User']['confirm_password']);
}
}
else {
unset($this->data['User']['password']);
unset($this->data['User']['confirm_password']);
}
if (!empty($this->data['ExpertisesUser']['expertise_id'])){
$all_eus = $this->data['ExpertisesUser']['expertise_id'];
unset($this->data['ExpertisesUser']);
foreach ($all_eus as $k => $v){
unset($temp);
$temp['user_id'] = $this->data['User']['user_id'];
$temp['expertise_id'] = $v;
$this->data['ExpertisesUser'][] = $temp;
}
}
else {
unset($this->data['ExpertisesUser']);
}
if (!empty($this->data['UserCircusField']['circus_field_id'])){
$all_eus = $this->data['UserCircusField']['circus_field_id'];
unset($this->data['UserCircusField']);
foreach ($all_eus as $k => $v){
unset($temp);
$temp['user_id'] = $this->data['User']['user_id'];
$temp['circus_field_id'] = $v;
$this->data['UserCircusField'][] = $temp;
}
}
else {
unset($this->data['UserCircusField']);
}
//delete previous circus fields and expertises first
if (!$new_user){
$this->loadModel("UserCircusField");
$this->loadModel("ExpertisesUser");
$this->UserCircusField->deleteAll(array("UserCircusField.user_id" => 
$this->data['User']['user_id']), false);
$this->ExpertisesUser->deleteAll(array("ExpertisesUser.user_id" => 
$this->data['User']['user_id']), false);
}

$this->loadModel("UserProfile");
unset($this->UserProfile->validate);
if ($this->User->saveAll($this->data)){
if ($new_user){
$redirect = array("action" => "new_user_order_creation", 
$this->data['User']['user_id']);
}
else {
$redirect = array("action" => "user_edit", $this->data['User']['user_id']);
}
$this->Session->setFlash("Utilisateur enregistré !", "fs");
$this->redirect($redirect);
}
else {
if ($new_user){
$this->User->delete($this->data['User']['user_id']);
unset($this->data['User']['user_id']);
}
$this->Session->setFlash("Utilisateur non enregistré. Vérifiez les erreurs 
ci-dessous.", "fe");
}
}
else {
//new user/
if ($new_user){
$this->loadModel("UserProfile");
$max_member_number_temp = $this->UserProfile->find('first', 
array("recursive" => -1, "order" => "UserProfile.member_number DESC", 
"limit" => 1));
$this->data['UserProfile']['member_number'] = 
$max_member_number_temp['UserProfile'][

Re: CakePHP Forum launched!

2016-05-03 Thread euromark
This forum should be closed and switched to read only.
The other one should now be the only one in use.

See the PRs to change the links on the CakePHP sites and documentation etc.
Mark


Am Dienstag, 3. Mai 2016 03:01:20 UTC+2 schrieb Reuben:
>
> Maybe this post should get stickied / pinned, so people know all the 
> action should now be at discourse.cakephp.org.
>
> Regards
> Reuben Helms
>
> On Tuesday, 26 April 2016 03:02:49 UTC+10, Megan Lalk wrote:
>>
>> CakePHP Forum launched!
>>
>> *We asked you what you wanted and the feedback was clear! Sign up 
>> <http://discourse.cakephp.org/> here - **http://discourse.cakephp.org/ 
>> <http://discourse.cakephp.org/>*
>>
>> As you know, a CakePHP forum <http://discourse.cakephp.org/> is a 
>> welcomed platform by many! - From today, you  can be a part of the 
>> discussion and post your questions, find out the answers and make comments 
>> - all stored in one easy location!
>>
>> Our Google group has been a great place for many developers over the 
>> years, but also comes with a few difficulties. Results from our poll came 
>> in, and the consensus was that we needed a place where we could ask our 
>> questions, find out what others were asking and seek the advise from 
>> others. This platform allows for better interaction with your community!
>>
>> Well there you have it, besides our #CakePHP channel on IRC 
>> <http://%20irc.freenode.net/>, Slack <http://cakesf.herokuapp.com/>
>>  channel, Stackoverflow 
>> <http://stackoverflow.com/questions/tagged/cakephp> and our community 
>> newsletter; You can now also find us on our new CakePHP Forum 
>> <http://discourse.cakephp.org/>.
>>
>>
>>   
>> Larry E. Masters
>>   
>>         Co-Founder CakePHP
>>
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: CakePHP 1.3.8 - Editing user info causes 404

2016-05-02 Thread Reuben
Hi Josh

What URL is actually getting posted when the form is submitted?  

My only concern is that $this->params["action"] is not populated with the 
value you are expecting.  

I'm guessing that you are expecting the values of that variable to be 
either add, edit, create or update.  

What are the signatures of those methods in the controller?

Usually an add function will just be `function add()`, but an edit function 
might be `function edit($id)`, in which case, the POST will fail, because 
the action is not providing an id on the URL (i.e. /users/edit is requested 
instead of /users/edit/1).

And last but not least, it looks like these forums are being wound down. 
Head over to http://discourse.cakephp.org for CakePHP discussions. (but 
still reply to this topic, if you need to)

Regards
Reuben Helms

On Tuesday, 3 May 2016 07:42:07 UTC+10, Josh R wrote:
>
> Hello Group,
>
> I am new to this group and CakePHP.
>
> I am dealing with a site that is build using CakePHP version 1.3.8. When 
> adding a new user, everything works fine. When modifying a user (either 
> through admin's account or through the user's account) the save function 
> keeps the URL of the page (with client ID in url as it should) but the page 
> doesn't add the updated data to the database, and gives a 404 page. When 
> the URL is copied and entered again in browser the User's page appears, but 
> like I mentioned no changes to the User's information was recorded. See the 
> start and end of the form functions, there are a lot of fields in this form.
>
> Form->create("User", array("url" => array("controller" 
> => "admin", "action" => $this->params["action"]))); ?>
> *There are many fields > echo $this->Form->input("...");, etc...*
> Form->end("Enregistrer"); ?>
>
> I was told that this form was working properly a couple months ago (I just 
> recently have been looking into this issue), and then one day the saving of 
> the form stopped.
>
> Any help is greatly appreciated. I can also send snippets of code if need 
> be.
>
> Thank you in advance!
> josh
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: CakePHP Forum launched!

2016-05-02 Thread Reuben
Maybe this post should get stickied / pinned, so people know all the action 
should now be at discourse.cakephp.org.

Regards
Reuben Helms

On Tuesday, 26 April 2016 03:02:49 UTC+10, Megan Lalk wrote:
>
> CakePHP Forum launched!
>
> *We asked you what you wanted and the feedback was clear! Sign up 
> <http://discourse.cakephp.org/> here - **http://discourse.cakephp.org/ 
> <http://discourse.cakephp.org/>*
>
> As you know, a CakePHP forum <http://discourse.cakephp.org/> is a 
> welcomed platform by many! - From today, you  can be a part of the 
> discussion and post your questions, find out the answers and make comments 
> - all stored in one easy location!
>
> Our Google group has been a great place for many developers over the 
> years, but also comes with a few difficulties. Results from our poll came 
> in, and the consensus was that we needed a place where we could ask our 
> questions, find out what others were asking and seek the advise from 
> others. This platform allows for better interaction with your community!
>
> Well there you have it, besides our #CakePHP channel on IRC 
> <http://%20irc.freenode.net/>, Slack <http://cakesf.herokuapp.com/>
>  channel, Stackoverflow 
> <http://stackoverflow.com/questions/tagged/cakephp> and our community 
> newsletter; You can now also find us on our new CakePHP Forum 
> <http://discourse.cakephp.org/>.
>
>
>   
> Larry E. Masters
>   
> Co-Founder CakePHP
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


CakePHP 1.3.8 - Editing user info causes 404

2016-05-02 Thread Josh R
Hello Group,

I am new to this group and CakePHP.

I am dealing with a site that is build using CakePHP version 1.3.8. When 
adding a new user, everything works fine. When modifying a user (either 
through admin's account or through the user's account) the save function 
keeps the URL of the page (with client ID in url as it should) but the page 
doesn't add the updated data to the database, and gives a 404 page. When 
the URL is copied and entered again in browser the User's page appears, but 
like I mentioned no changes to the User's information was recorded. See the 
start and end of the form functions, there are a lot of fields in this form.

Form->create("User", array("url" => array("controller" => 
"admin", "action" => $this->params["action"]))); ?>
*There are many fields > echo $this->Form->input("...");, etc...*
Form->end("Enregistrer"); ?>

I was told that this form was working properly a couple months ago (I just 
recently have been looking into this issue), and then one day the saving of 
the form stopped.

Any help is greatly appreciated. I can also send snippets of code if need 
be.

Thank you in advance!
josh

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Cakephp 3.x patchEntity set "'new' => true" to entity in edit function

2016-04-25 Thread heavyKevy
Thanks for the update, I am glad to hear that it is working for you.

It seems to me that in order for the system to know which record is being 
updated, that all of the ids should need to be supplied for every record that 
is being saved in a transaction.  If it is saving a record for which you did 
not supply an id, then it must be able to figure out the id via the 
relationship but can't do that with addresses when there can be multiple 
addresses that are related.

Best regards,
Kevin

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Cakephp 3.x patchEntity set "'new' => true" to entity in edit function

2016-04-25 Thread Paulo Terra
Hi Kevin,

It worked perfectly!!

I just would lime to know why only Addresses need the id. 

But if you dont know, thats OK. You already relped me!!

Thanks a lot!

Best regards,

Paulo Terra

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


CakePHP Forum launched!

2016-04-25 Thread Megan Lalk
CakePHP Forum launched!

*We asked you what you wanted and the feedback was clear! Sign up 
<http://discourse.cakephp.org/> here - **http://discourse.cakephp.org/*

As you know, a CakePHP forum <http://discourse.cakephp.org/> is a welcomed 
platform by many! - From today, you  can be a part of the discussion and 
post your questions, find out the answers and make comments - all stored in 
one easy location!

Our Google group has been a great place for many developers over the years, 
but also comes with a few difficulties. Results from our poll came in, and 
the consensus was that we needed a place where we could ask our questions, 
find out what others were asking and seek the advise from others. This 
platform allows for better interaction with your community!

Well there you have it, besides our #CakePHP channel on IRC 
<http://%20irc.freenode.net/>, Slack <http://cakesf.herokuapp.com/>
 channel, Stackoverflow <http://stackoverflow.com/questions/tagged/cakephp> and 
our community newsletter; You can now also find us on our new CakePHP Forum 
<http://discourse.cakephp.org/>.



  Larry E. Masters

      Co-Founder CakePHP

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


CakePHP 3: Cookie component and test cases

2016-04-22 Thread Narendra Vaghela
Hello,

I am building a plugin for learning purpose. In my plugin, I use 
CookieComponent to store data in cookie.
My test cases are failing due to CookieComponent.

Here is my code: https://github.com/narendravaghela/cakephp-remember-me
Here is travis build 
log: https://travis-ci.org/narendravaghela/cakephp-remember-me/jobs/124758432

Can anyone help me to sort this out?

Thank you

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


CakePHP 3: Plugin and test cases + Travis build is failing

2016-04-22 Thread Narendra Vaghela
Hello,

I am learning the plugin development and making it available via composer.

Here is my code: https://github.com/narendravaghela/cakephp-remember-me

Here is Travis 
build: https://travis-ci.org/narendravaghela/cakephp-remember-me/jobs/124758432

All tests are getting passed on my local machine. But, when I run Travis 
build, it shows errors.

Can someone please help on this?

Thanks in advance.

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: cakephp 3 modular programming

2016-04-20 Thread euromark
It's called plugins
https://github.com/FriendsOfCake/awesome-cakephp etc

Mark


Am Mittwoch, 20. April 2016 18:26:27 UTC+2 schrieb Anurag Kumar:
>
> Is it possible to do modular programming with cakePHP 3.
>
> If yes please provide some example on it.
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


cakephp 3 modular programming

2016-04-20 Thread Anurag Kumar
Is it possible to do modular programming with cakePHP 3.

If yes please provide some example on it.

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Cakephp 3.x patchEntity set "'new' => true" to entity in edit function

2016-04-20 Thread heavyKevy
I am not sure why the others appear to be working,  I suggest that you test 
thoroughly to make sure they are doing as expected.
It may be because of the many - to -one relationship though.

Let me know how it goes.
Regards,
Kevin

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Cakephp 3.x patchEntity set "'new' => true" to entity in edit function

2016-04-20 Thread Paulo Terra
Hi Kekin, it is very kind of you help this poor Cake novice. It have been 
hard programing days.

Ok, if I have a hidden ID field of the Addresses I think it is going to 
work. But why do I have to put the Addresses ID and the other entities work 
without it?

Here is the form:

PS: Thanks again for your patience


Form->create($buyer);
?>








Form->input('user.name',['label' => __('Nome')]);?>
Form->input('cpf',['label' 
=> __('CPF')]);?>


Form->input('user.username',['label' => __('Email')]);?>




Form->label(__('Sexo'));?>

 __('Masculino'), 
'Feminino' => __('Feminino'));?>

Form->radio('gender', $options);?>


Form->label('birthdate',__('Data de 
nascimento'));?>
Form->input(
'birthdate',
array (
'label'=> 
false,
'minYear' => 
date('Y') - 100, 
'maxYear' => 
date('Y') - 12,
'empty'=> 
true,
'monthNames'=> true,
'default'=> ''
)
);

?>





Form->input('user.addresses.0.phone',['label' => __('Telefone')]);?>


Form->input('user.addresses.0.celphone',['label' => 
__('Celular')]);?>




Form->input('user.addresses.0.zipcode',['label' => __('CEP')]);?>




Form->input('user.addresses.0.line1',['label' => __('Endereço e 
número')]);?>




Form->input('user.addresses.0.line2',['label' => __('Complemento e 
Bairro')]);?>




Form->input('user.addresses.0.city',['label' 
=> __('Cidade')]);?>


Form->input('user.addresses.0.state',['label' => __('Estado')]);?>


Form->input('user.addresses.0.country_id',['options' => 
$countries,'label' => __('País')]);?>






Form->label(__('Preferências musicais'));
echo $this->Form->input('genres._ids',
[   
'templates' => ['checkboxWrapper' => '{{label}}'],
'options'  => $genres,
'multiple' => 'checkbox',
'label' => false,
//'value' => $buyer
]);   
?>









Form->label(__('Receber novidades'));?>
Form->input('newsletter',['type' => 
'checkbox','value' => 'Sim','hiddenField'=>'Não', 'label' => __('Quero 
receber email de novidades do Prefiro Vinil')]);?>






Form->button(__('Salvar'), ['class' => 
'btn-success']) ?>






Form->end() ?>






Em quarta-feira, 20 de abril de 2016 01:11:37 UTC-3, heavyKevy escreveu:
>
> Does your edit form have an input for the address_id?  
>
> something like:"user.addresses.0.id"
>
> I see the id: (29) for the address in the debug output of the entity...
>
> If you need further help with it, you are going to need to show the edit 
> form in order to figure out what may be missing.
>
> Hope that helps...
> Best regards,
> Kevin
>
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But d

Re: Cakephp 3.x patchEntity set "'new' => true" to entity in edit function

2016-04-19 Thread heavyKevy
Does your edit form have an input for the address_id?  

something like:"user.addresses.0.id"

I see the id: (29) for the address in the debug output of the entity...

If you need further help with it, you are going to need to show the edit form 
in order to figure out what may be missing.

Hope that helps...
Best regards,
Kevin

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Cakephp 3.x patchEntity set "'new' => true" to entity in edit function

2016-04-19 Thread Paulo Terra
Hi heavyKevy, thank you for your answer!

Ok, about your first advise, I simplified and its ok, but about the issue, 
that´s it, the problem is the missind ID. But I simlpy don´t know why all 
other entitys comes with the id and Addresses not! That is the problem. Do 
you know why?

Thanks in advance!

Paulo Terra




Em segunda-feira, 18 de abril de 2016 04:50:18 UTC-3, heavyKevy escreveu:
>
> First off you don't need to cotain users 3 times, 
> Users.Addresses.Countries includes all 3 tables already.
>
> Secondly, if the address has the id, it should automatically detect that 
> it is being edited, if the id is missing it will add the address.
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Cakephp 3.x patchEntity set "'new' => true" to entity in edit function

2016-04-18 Thread heavyKevy
First off you don't need to cotain users 3 times, Users.Addresses.Countries 
includes all 3 tables already.

Secondly, if the address has the id, it should automatically detect that it is 
being edited, if the id is missing it will add the address.

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Cakephp 3.x patchEntity set "'new' => true" to entity in edit function

2016-04-17 Thread Paulo Terra
'genre_id' => (int) 3,
'id' => (int) 66,
    'buyer_id' => (int) 68
        ],
'dirty' => [],
        'original' => [],
'virtual' => [],
'errors' => [],
'repository' => 'BuyersGenres'

}
],
'dirty' => [],
'original' => [],
'virtual' => [],
'errors' => [],
'repository' => 'Genres'

}
]
],
'virtual' => [],
'errors' => [],
'repository' => 'Buyers'

}


-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Vacancy for a CakePHP developer in London (Farringdon)

2016-04-14 Thread Dr. Tarique Sani
:D

On Fri, Apr 8, 2016 at 1:18 PM, Jeremy Burns : Class Outfit <
jeremybu...@classoutfit.com> wrote:

> Thank you, but Delhi is a long commute. I don’t think that will work. This
> is an on site position.
>
> On 8 Apr 2016, at 08:18, Kamal Deol <kamal.d...@gmail.com> wrote:
>
>
>
> On Fri, Apr 8, 2016 at 8:31 AM, Jeremy Burns <jeremybu...@classoutfit.com>
> wrote:
>
>> An old client of mine is looking someone to take over and develop some
>> code I built for them a year or so ago (CakePHP 2.6). They are only small,
>> so it'd be more of a junior than a senior role (they might consider
>> contract). The business is small but successful and is mainly based in
>> Swindon, but the IT is run from their very small but very friendly London
>> office. The company is run by a really cool switched on chap who
>> understands technology and how important it is to his business. This is an
>> on site only position. No agents or recruiters please.
>>
>> Contact me if you'd like to know more. Send me your CV if you'd like to
>> be considered and I'll forward the good ones on to the client.
>>
>> --
>> Sign up for our Newsletter for updates.
>> http://cakephp.org/newsletter/signup
>>
>> We will soon be closing this Google Group. But don't worry, we have
>> something better coming. Stay tuned for an updated from the CakePHP Team
>> soon.
>>
>> Like Us on FaceBook https://www.facebook.com/CakePHP
>> Follow us on Twitter http://twitter.com/CakePHP
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "CakePHP" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to cake-php+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
> Sign up for our Newsletter for updates.
> http://cakephp.org/newsletter/signup
>
> We will soon be closing this Google Group. But don't worry, we have
> something better coming. Stay tuned for an updated from the CakePHP Team
> soon.
>
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Follow us on Twitter http://twitter.com/CakePHP
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
> 
>
>
> --
> Sign up for our Newsletter for updates.
> http://cakephp.org/newsletter/signup
>
> We will soon be closing this Google Group. But don't worry, we have
> something better coming. Stay tuned for an updated from the CakePHP Team
> soon.
>
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Follow us on Twitter http://twitter.com/CakePHP
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
=====
Hire a CakePHP dev team : http://sanisoft.com
=====

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Save assosicated error cakephp 3.2

2016-04-11 Thread Phan Tuan Kiet
Hi all,
   I have problem in cakephp 3.x.
   I have 2 table Products and Images. When add new product, image of 
project saved. But When I edit product and remove one image from this 
product ==> click save. Images of this product not remove.


Please, help me.
Thanks.

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Vacancy for a CakePHP developer in London (Farringdon)

2016-04-08 Thread Jeremy Burns : Class Outfit
Thank you, but Delhi is a long commute. I don’t think that will work. This is 
an on site position.

> On 8 Apr 2016, at 08:18, Kamal Deol <kamal.d...@gmail.com> wrote:
> 
> 
> 
> On Fri, Apr 8, 2016 at 8:31 AM, Jeremy Burns <jeremybu...@classoutfit.com 
> <mailto:jeremybu...@classoutfit.com>> wrote:
> An old client of mine is looking someone to take over and develop some code I 
> built for them a year or so ago (CakePHP 2.6). They are only small, so it'd 
> be more of a junior than a senior role (they might consider contract). The 
> business is small but successful and is mainly based in Swindon, but the IT 
> is run from their very small but very friendly London office. The company is 
> run by a really cool switched on chap who understands technology and how 
> important it is to his business. This is an on site only position. No agents 
> or recruiters please.
> 
> Contact me if you'd like to know more. Send me your CV if you'd like to be 
> considered and I'll forward the good ones on to the client.
> 
> -- 
> Sign up for our Newsletter for updates.
> http://cakephp.org/newsletter/signup <http://cakephp.org/newsletter/signup>
>  
> We will soon be closing this Google Group. But don't worry, we have something 
> better coming. Stay tuned for an updated from the CakePHP Team soon.
>  
> Like Us on FaceBook https://www.facebook.com/CakePHP 
> <https://www.facebook.com/CakePHP>
> Follow us on Twitter http://twitter.com/CakePHP <http://twitter.com/CakePHP>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to cake-php+unsubscr...@googlegroups.com 
> <mailto:cake-php+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> Sign up for our Newsletter for updates.
> http://cakephp.org/newsletter/signup <http://cakephp.org/newsletter/signup>
>  
> We will soon be closing this Google Group. But don't worry, we have something 
> better coming. Stay tuned for an updated from the CakePHP Team soon.
>  
> Like Us on FaceBook https://www.facebook.com/CakePHP 
> <https://www.facebook.com/CakePHP>
> Follow us on Twitter http://twitter.com/CakePHP <http://twitter.com/CakePHP>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to cake-php+unsubscr...@googlegroups.com 
> <mailto:cake-php+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.
> 

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Vacancy for a CakePHP developer in London (Farringdon)

2016-04-07 Thread Jeremy Burns
An old client of mine is looking someone to take over and develop some code 
I built for them a year or so ago (CakePHP 2.6). They are only small, so 
it'd be more of a junior than a senior role (they might consider 
contract). The business is small but successful and is mainly based in 
Swindon, but the IT is run from their very small but very friendly London 
office. The company is run by a really cool switched on chap who 
understands technology and how important it is to his business. This is an 
on site only position. No agents or recruiters please.

Contact me if you'd like to know more. Send me your CV if you'd like to be 
considered and I'll forward the good ones on to the client.

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Testing AJAX calls in CakePHP 2.8

2016-04-06 Thread Jaz


down votefavorite 
<http://stackoverflow.com/questions/36000402/testing-ajax-calls-in-cakephp-2-8#>

I'm working with Cake 2.8.1. I've installed PHPUnit and am writing unit 
tests for my app. However, I've run into a problem when trying to test AJAX 
calls.

My application checks to make sure that the request is an AJAX call and 
throws a NotFoundException if is isn't.

if (!$this->request->is('ajax')) {
throw new NotFoundException(__('Illegal url call'));}

I can write tests that catch the exception, but I'm struggling to create 
tests for valid inputs and calls. When I run them, the test suite for that 
controller just stops and doesn't show any more input. The testing results 
summation that is usually present at the bottom doesn't appear and any 
tests following that one are not run. I've seen this solution 
<http://stackoverflow.com/questions/8182278/testing-ajax-request-in-cakephp-2-0>
 in 
several different answers. I've tried setting both the $_ENV and $_SERVER 
variables and neither seems to help.

I tried digging into the testing code in Cake itself, but I got lost pretty 
quickly. Does anyone have suggestions for how to debug this and/or write 
correct unit tests? Thanks!

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


CakePHP 3 - ConnectionManager::config and persisting connection configuration.

2016-04-05 Thread Luuk Honings
Hi,

I have a need to, in addition to the default DB connection (from app.php) , 
add another DB connection specific to the client. Ie every client ends up 
with 2 connections and depending on where data needs to be retrieved from, 
the app sets the defaultConnectionName() in the relevant Table object. 

I am currently loading the 2nd connection info based on the logged in user, 
on the fly, using ConnectionManager::config(). This works well. However 
what I've noticed is that the app loads the connection info every time the 
user makes a request. Would there be a way to persist this connection 
information between requests, short of storing connection info in Session? 
Having said that I did also notice that bootstrap gets called for every 
request - loading the 'default' connection information anyway.

Cheerio,
Luuk

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Carregar endereço a partir do CEP no CakePHP 3 usando AJAX

2016-04-04 Thread Paulo Terra
Ok Diego, obrigado. Vou dar uma olhada. Abs!
Em 04/04/2016 11:52, "Diego Mendonça" <diego...@gmail.com> escreveu:

> Eu utilizo esse aqui: https://viacep.com.br/ no próprio site tem um
> tutorial de como fazer com JS
>
> --
> Diego Mendonça
> meadiciona.com/diego182
> vamosfugir.net
>
> On Sun, Apr 3, 2016 at 7:59 PM, Paulo Terra <pte...@gmail.com> wrote:
>
>> Sim, mas existem outros webservices confiáveis também.
>>
>> Em sábado, 2 de abril de 2016 20:06:03 UTC-3, Nilson Pena escreveu:
>>>
>>> O correio disponibiliza algum webservice gratuito?
>>>
>>> Em sábado, 2 de abril de 2016, Paulo Terra <pte...@gmail.com> escreveu:
>>>
>>>> Estou tentando carregar o endereço a partir do CEP informado pelo
>>>> usuário. Apesar de encontrar várias pessoas perguntando por isso não
>>>> encontro uma resposta que funcione. Alguém já fez isso no CakePHP 3?
>>>>
>>>> --
>>>> Sign up for our Newsletter for updates.
>>>> http://cakephp.org/newsletter/signup
>>>>
>>>> We will soon be closing this Google Group. But don't worry, we have
>>>> something better coming. Stay tuned for an updated from the CakePHP Team
>>>> soon.
>>>>
>>>> Like Us on FaceBook https://www.facebook.com/CakePHP
>>>> Follow us on Twitter http://twitter.com/CakePHP
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "CakePHP" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to cake-php+unsubscr...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> --
>> Sign up for our Newsletter for updates.
>> http://cakephp.org/newsletter/signup
>>
>> We will soon be closing this Google Group. But don't worry, we have
>> something better coming. Stay tuned for an updated from the CakePHP Team
>> soon.
>>
>> Like Us on FaceBook https://www.facebook.com/CakePHP
>> Follow us on Twitter http://twitter.com/CakePHP
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "CakePHP" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to cake-php+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> Sign up for our Newsletter for updates.
> http://cakephp.org/newsletter/signup
>
> We will soon be closing this Google Group. But don't worry, we have
> something better coming. Stay tuned for an updated from the CakePHP Team
> soon.
>
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Follow us on Twitter http://twitter.com/CakePHP
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "CakePHP" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/cake-php/nfmu-j5wiH8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> cake-php+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Carregar endereço a partir do CEP no CakePHP 3 usando AJAX

2016-04-04 Thread Diego Mendonça
Eu utilizo esse aqui: https://viacep.com.br/ no próprio site tem um
tutorial de como fazer com JS

--
Diego Mendonça
meadiciona.com/diego182
vamosfugir.net

On Sun, Apr 3, 2016 at 7:59 PM, Paulo Terra <pte...@gmail.com> wrote:

> Sim, mas existem outros webservices confiáveis também.
>
> Em sábado, 2 de abril de 2016 20:06:03 UTC-3, Nilson Pena escreveu:
>>
>> O correio disponibiliza algum webservice gratuito?
>>
>> Em sábado, 2 de abril de 2016, Paulo Terra <pte...@gmail.com> escreveu:
>>
>>> Estou tentando carregar o endereço a partir do CEP informado pelo
>>> usuário. Apesar de encontrar várias pessoas perguntando por isso não
>>> encontro uma resposta que funcione. Alguém já fez isso no CakePHP 3?
>>>
>>> --
>>> Sign up for our Newsletter for updates.
>>> http://cakephp.org/newsletter/signup
>>>
>>> We will soon be closing this Google Group. But don't worry, we have
>>> something better coming. Stay tuned for an updated from the CakePHP Team
>>> soon.
>>>
>>> Like Us on FaceBook https://www.facebook.com/CakePHP
>>> Follow us on Twitter http://twitter.com/CakePHP
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "CakePHP" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to cake-php+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> Sign up for our Newsletter for updates.
> http://cakephp.org/newsletter/signup
>
> We will soon be closing this Google Group. But don't worry, we have
> something better coming. Stay tuned for an updated from the CakePHP Team
> soon.
>
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Follow us on Twitter http://twitter.com/CakePHP
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Carregar endereço a partir do CEP no CakePHP 3 usando AJAX

2016-04-03 Thread Paulo Terra
Sim, mas existem outros webservices confiáveis também.

Em sábado, 2 de abril de 2016 20:06:03 UTC-3, Nilson Pena escreveu:
>
> O correio disponibiliza algum webservice gratuito?
>
> Em sábado, 2 de abril de 2016, Paulo Terra <pte...@gmail.com > 
> escreveu:
>
>> Estou tentando carregar o endereço a partir do CEP informado pelo 
>> usuário. Apesar de encontrar várias pessoas perguntando por isso não 
>> encontro uma resposta que funcione. Alguém já fez isso no CakePHP 3?
>>
>> -- 
>> Sign up for our Newsletter for updates.
>> http://cakephp.org/newsletter/signup
>>  
>> We will soon be closing this Google Group. But don't worry, we have 
>> something better coming. Stay tuned for an updated from the CakePHP Team 
>> soon.
>>  
>> Like Us on FaceBook https://www.facebook.com/CakePHP
>> Follow us on Twitter http://twitter.com/CakePHP
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "CakePHP" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to cake-php+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Carregar endereço a partir do CEP no CakePHP 3 usando AJAX

2016-04-03 Thread Paulo Terra
Oi Fabricio, obrigado pela resposta. Minha dificuldade maior é fazer a 
requisição Ajax. Apesar de ler a documentação e consultar alguns exemplos 
daqui do forum, nada funcionou.

Em sábado, 2 de abril de 2016 19:43:43 UTC-3, Fabrício Muniz escreveu:
>
> Qual a dificuldade?
>
> 2016-04-02 18:09 GMT-03:00 Paulo Terra <pte...@gmail.com >:
>
>> Estou tentando carregar o endereço a partir do CEP informado pelo 
>> usuário. Apesar de encontrar várias pessoas perguntando por isso não 
>> encontro uma resposta que funcione. Alguém já fez isso no CakePHP 3?
>>
>> -- 
>> Sign up for our Newsletter for updates.
>> http://cakephp.org/newsletter/signup
>>  
>> We will soon be closing this Google Group. But don't worry, we have 
>> something better coming. Stay tuned for an updated from the CakePHP Team 
>> soon.
>>  
>> Like Us on FaceBook https://www.facebook.com/CakePHP
>> Follow us on Twitter http://twitter.com/CakePHP
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "CakePHP" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to cake-php+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Carregar endereço a partir do CEP no CakePHP 3 usando AJAX

2016-04-02 Thread Nilson Pena
O correio disponibiliza algum webservice gratuito?

Em sábado, 2 de abril de 2016, Paulo Terra <pte...@gmail.com> escreveu:

> Estou tentando carregar o endereço a partir do CEP informado pelo usuário.
> Apesar de encontrar várias pessoas perguntando por isso não encontro uma
> resposta que funcione. Alguém já fez isso no CakePHP 3?
>
> --
> Sign up for our Newsletter for updates.
> http://cakephp.org/newsletter/signup
>
> We will soon be closing this Google Group. But don't worry, we have
> something better coming. Stay tuned for an updated from the CakePHP Team
> soon.
>
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Follow us on Twitter http://twitter.com/CakePHP
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com
> <javascript:_e(%7B%7D,'cvml','cake-php%2bunsubscr...@googlegroups.com');>.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Carregar endereço a partir do CEP no CakePHP 3 usando AJAX

2016-04-02 Thread Fabrício Muniz
Qual a dificuldade?

2016-04-02 18:09 GMT-03:00 Paulo Terra <pte...@gmail.com>:

> Estou tentando carregar o endereço a partir do CEP informado pelo usuário.
> Apesar de encontrar várias pessoas perguntando por isso não encontro uma
> resposta que funcione. Alguém já fez isso no CakePHP 3?
>
> --
> Sign up for our Newsletter for updates.
> http://cakephp.org/newsletter/signup
>
> We will soon be closing this Google Group. But don't worry, we have
> something better coming. Stay tuned for an updated from the CakePHP Team
> soon.
>
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Follow us on Twitter http://twitter.com/CakePHP
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Carregar endereço a partir do CEP no CakePHP 3 usando AJAX

2016-04-02 Thread Paulo Terra
Estou tentando carregar o endereço a partir do CEP informado pelo usuário. 
Apesar de encontrar várias pessoas perguntando por isso não encontro uma 
resposta que funcione. Alguém já fez isso no CakePHP 3?

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Looking for an experienced CakePHP developer

2016-03-30 Thread Clement Crownrise
You can contact me, 

On Wednesday, March 23, 2016 at 8:27:53 PM UTC+1, majna wrote:
>
> Hi,
>
> I'm looking for an experienced CakePHP 2.x developer, freelance, remote, 
> long-term.
> Please LMK if you know somebody.
>
> Thanks!
> majna
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Cakephp 3.2.5] Cannot match provided foreignKey

2016-03-28 Thread 'Manuel Maurer' via CakePHP
Argh, what a stupid mistake

Not sure why I forgot to add primary indices, but adding them did the 
trick. Not a very helpful error message though.

Thanks for the help!

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: CakePHP 3 Role Authorization for controllers and methods

2016-03-27 Thread euromark
I use https://github.com/dereuromark/cakephp-tinyauth to exactly prevent 
this complicated if/switch statement logic from happening all over the 
controllers ;)
One simple to configure ini file, done.
Mark


Am Sonntag, 27. März 2016 11:43:31 UTC+2 schrieb LSRX4EVER:
>
> Hello Everyone,
>
> I'm a beginner CakePHP 3 developer. I learned fairly quick for my skill 
> level. 
> I'm currently working on a management system for a school, where there 
> will be a couple of roles that will only access specific controller 
> functions. (Student, Instructor, Supervisor, Administrator)
> HOWEVER, each user has a user state that I must validate and set 
> permission temporarily for users
> Example:
>
> Active User
> LoginEnter code here...
> Redirected to their role controller, with only access to those methods in 
> that controller
>
> Inactive User (used for setup)
> Login
> Confirm Account Information
> only aloud to access that setup() action
> once confirmed, it will set the user active and log them out
>
> Disabled User
> Is disabled, unauthorized user. Already have that configured
>
>
> My login function looks like:
> public function login()
> {
> $this->viewBuilder()->layout('login'); 
> if($this->Auth->user()){
> return $this->redirect(['controller'=>'Users','action'=>'index']); //index 
> redirect for now
> } else {
> if($this->request->is('post')){
> $user = $this->Auth->identify();
> $login_error=null;
> if($user){
> $session = $this->request->session(); 
> switch($user['user_status']){
> case '1': //Active - Normal Login
> unset($user['created'], $user['expiration'], $user['user_status'], 
> $user['security_question_answer'], $user['security_question_id'], 
> $user['modified']);
> $userid=$user['id'];
> //$user= array_merge($user, array('Roles' => 
> $this->Users->Roles->find('list', ['order' => ['Roles.role_id' => 
> 'ASC']])->matching('Users', function ($q) use ($userid) {return 
> $q->where(['Users.id' => $userid]);})->toArray()));
> $user = array_merge($user, 
> array('role'=>key($this->Users->Roles->find('list', ['order' => 
> ['Roles.role_id' => 'ASC']])->select(['Roles.role_id'])->matching('Users', 
> function ($q) use ($userid) { return $q->where(['Users.id' => 
> $userid]);})->limit(1)->toArray(;
> $user = array_merge($user, array('user_status' => 1));
> $this->Auth->setUser($user);
> return $this->redirect($this->Auth->redirectUrl('/users/index'));
> break;
> case '2': //Disabled 
> $login_error=1;
> $this->set(compact('login_error'));
> break;
> case '3': //Inactive - Redirect to setup method
> unset($user['created'], $user['expiration'], $user['user_status'], 
> $user['security_question_answer'], $user['security_question_id'], 
> $user['modified']);
> $userid=$user['id'];
> //$user= array_merge($user, array('roles' => 
> $this->Users->Roles->find('list', ['order' => ['Roles.role_id' => 
> 'ASC']])->matching('Users', function ($q) use ($userid) {return 
> $q->where(['Users.id' => $userid]);})->toArray()));
> $user = array_merge($user, 
> array('role'=>key($this->Users->Roles->find('list', ['order' => 
> ['Roles.role_id' => 'ASC']])->select(['Roles.role_id'])->matching('Users', 
> function ($q) use ($userid) { return $q->where(['Users.id' => 
> $userid]);})->limit(1)->toArray()), 'status' => 3));
> $this->Auth->setUser($user); //Auth Role to only allow inactive user 
> privilage to login, recovery and setup?
> /*this isnt right*/ return 
> $this->redirect($this->Auth->redirectUrl('/users/setup'));
> break;
> }
> } 
> if($login_error!=1){
> $login_error=0;
> };
> $this->set(compact('login_error'));
> }
> }
> }
>
> My AppController BeforeFilter looks like:
> public function beforeFilter(Event $event)
> {
> $this->Auth->allow(['/users/login', '/users/recovery']);
> /*
> switch(user_status){
> case 'Active'
> switch(role){
> case 'Student'
> allow student controller methods
> break;
> case 'Supervisor'
> allow supervisor controller methods
> break;
> case 'Instructor'
> allow instructor controller methods
> break;
> case 'Administrator'
> allow administrator controller methods
> break;
> }
> deny login and recovery methods
> break;
> case 'Inactive'
> allow setup and logout methods
> deny login and recovery methods
> break;
> default:
> allow login and recovery methods
> break;
> }
> */
> }
>
>
> I have looked at some things, I am running a basic authentication system 
> and I heard of Access

CakePHP 3 Role Authorization for controllers and methods

2016-03-27 Thread LSRX4EVER
Hello Everyone,

I'm a beginner CakePHP 3 developer. I learned fairly quick for my skill 
level. 
I'm currently working on a management system for a school, where there will 
be a couple of roles that will only access specific controller functions. 
(Student, Instructor, Supervisor, Administrator)
HOWEVER, each user has a user state that I must validate and set permission 
temporarily for users
Example:

Active User
LoginEnter code here...
Redirected to their role controller, with only access to those methods in 
that controller

Inactive User (used for setup)
Login
Confirm Account Information
only aloud to access that setup() action
once confirmed, it will set the user active and log them out

Disabled User
Is disabled, unauthorized user. Already have that configured


My login function looks like:
public function login()
{
$this->viewBuilder()->layout('login'); 
if($this->Auth->user()){
return $this->redirect(['controller'=>'Users','action'=>'index']); //index 
redirect for now
} else {
if($this->request->is('post')){
$user = $this->Auth->identify();
$login_error=null;
if($user){
$session = $this->request->session(); 
switch($user['user_status']){
case '1': //Active - Normal Login
unset($user['created'], $user['expiration'], $user['user_status'], 
$user['security_question_answer'], $user['security_question_id'], 
$user['modified']);
$userid=$user['id'];
//$user= array_merge($user, array('Roles' => 
$this->Users->Roles->find('list', ['order' => ['Roles.role_id' => 
'ASC']])->matching('Users', function ($q) use ($userid) {return 
$q->where(['Users.id' => $userid]);})->toArray()));
$user = array_merge($user, 
array('role'=>key($this->Users->Roles->find('list', ['order' => 
['Roles.role_id' => 'ASC']])->select(['Roles.role_id'])->matching('Users', 
function ($q) use ($userid) { return $q->where(['Users.id' => 
$userid]);})->limit(1)->toArray(;
$user = array_merge($user, array('user_status' => 1));
$this->Auth->setUser($user);
return $this->redirect($this->Auth->redirectUrl('/users/index'));
break;
case '2': //Disabled 
$login_error=1;
$this->set(compact('login_error'));
break;
case '3': //Inactive - Redirect to setup method
unset($user['created'], $user['expiration'], $user['user_status'], 
$user['security_question_answer'], $user['security_question_id'], 
$user['modified']);
$userid=$user['id'];
//$user= array_merge($user, array('roles' => 
$this->Users->Roles->find('list', ['order' => ['Roles.role_id' => 
'ASC']])->matching('Users', function ($q) use ($userid) {return 
$q->where(['Users.id' => $userid]);})->toArray()));
$user = array_merge($user, 
array('role'=>key($this->Users->Roles->find('list', ['order' => 
['Roles.role_id' => 'ASC']])->select(['Roles.role_id'])->matching('Users', 
function ($q) use ($userid) { return $q->where(['Users.id' => 
$userid]);})->limit(1)->toArray()), 'status' => 3));
$this->Auth->setUser($user); //Auth Role to only allow inactive user 
privilage to login, recovery and setup?
/*this isnt right*/ return 
$this->redirect($this->Auth->redirectUrl('/users/setup'));
break;
}
} 
if($login_error!=1){
$login_error=0;
};
$this->set(compact('login_error'));
}
}
}

My AppController BeforeFilter looks like:
public function beforeFilter(Event $event)
{
$this->Auth->allow(['/users/login', '/users/recovery']);
/*
switch(user_status){
case 'Active'
switch(role){
case 'Student'
allow student controller methods
break;
case 'Supervisor'
allow supervisor controller methods
break;
case 'Instructor'
allow instructor controller methods
break;
case 'Administrator'
allow administrator controller methods
break;
}
deny login and recovery methods
break;
case 'Inactive'
allow setup and logout methods
deny login and recovery methods
break;
default:
allow login and recovery methods
break;
}
*/
}


I have looked at some things, I am running a basic authentication system 
and I heard of Access Control Lists (ACL), but its seemed quite intricate 
and I don't want to spend a week trying to figure something out that's far 
from my reach.

Any suggestions how to accomplish this?

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Cakephp 3.2.5] Cannot match provided foreignKey

2016-03-25 Thread heavyKevy

>
> In addition to the other reply, i recommend that you use the bake utility 
> to bake your models so that all of the needed files are created along with 
> the correct syntax.
>

from a dos command prompt, cd to your application folder that contains your 
bin and src folders and issue the following commands:
bin\cake bake model Users
bin\cake bake model Articles

in addition, you may want to bake your controllers and templates but make 
sure you don't overwrite any code that you have already written there...
With your tables created correctly and the code baked everything should 
work as expected.

regards,
--Kevin

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: CakePHP 3 + MSSQL = slow query

2016-03-25 Thread heavyKevy
Is there any reason you are not paging it and fetching only 20, or 50 or 
100 records at a time?  That would significantly speed things up for you...
Regards,
--Kevin

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Cakephp 3.2.5] Cannot match provided foreignKey

2016-03-25 Thread Gaurav Kumar
Hello Manuel,

In your tables there is no PRIMARY KEY defined. So, your tables should look 
like this

CREATE TABLE `articles` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` bigint(20) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci 
AUTO_INCREMENT=1 ;

CREATE TABLE `users` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci 
AUTO_INCREMENT=1 ;

and then your issue will be resolve.

On Thursday, March 24, 2016 at 3:43:58 PM UTC+5:30, Manuel Maurer wrote:
>
> Hello,
>
> I am trying to upgrade some of my applications from Cake 2 to 3. To get 
> used to the new version I tried a few simple things and for some strange 
> reason I cannot get Associations to run...
>
> In my mysql database I have two simple tables:
>
> CREATE TABLE `articles` (
>   `id` bigint(20) UNSIGNED NOT NULL,
>   `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
>   `user_id` bigint(20) UNSIGNED NOT NULL
> ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
>
> CREATE TABLE `users` (
>   `id` bigint(20) UNSIGNED NOT NULL,
>   `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL
> ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
>
> In a fresh copy of Cakephp 3.2.5 I added 3 files:
>
> *src/Model/Table/UsersTable.php:*
>
>  namespace App\Model\Table;
> use Cake\ORM\Table;
>
> class UsersTable extends Table
> {
> public function initialize(array $config){
> }
> }
>
>
> *src/Model/Table/ArticlesTable.php:*
>  namespace App\Model\Table;
> use Cake\ORM\Table;
>
> class ArticlesTable extends Table
> {
> public function initialize(array $config){
> $this->belongsTo('Users');
> }
> }
>
>
> *src/Controller/ArticlesController.php:*
>  namespace App\Controller;
>
> class ArticlesController extends AppController 
> {
> public function index(){
> $tmp = $this->Articles->find('all')->contain(['Users']);
> var_dump($tmp);
> exit;
> }
> }
>
> My development system is running MariaDB 10.0.15 and PHP 7.0.4 on W7.
>
> Finally I fire up http://test/articles and get this error:
> * Cannot match provided foreignKey for "Users", got "(user_id)" but 
> expected foreign key for "()" *
>
>
> The last item in the stack trace is this:
>
> Cake\ORM\Association\BelongsTo->_joinCondition 
> CORE\src\ORM\Association.php, line 557
>
>
> On the right hand side I get 
> cakephp-3-2-5\vendor\cakephp\cakephp\src\ORM\Association.php:
>
> 'finder' => $this->finder()
> ];
> 
> if (!empty($options['foreignKey'])) {
> $joinCondition = $this->_joinCondition($options);
> if ($joinCondition) {
> $options['conditions'][] = $joinCondition;
> }
> }
>
>
> And in the arguments table:
>
> [
>   'aliasPath' => 'Users',
>   'propertyPath' => 'user',
>   'includeFields' => true,
>   'foreignKey' => 'user_id',
>   'conditions' => [],
>   'fields' => [],
>   'type' => 'LEFT',
>   'table' => 'users',
>   'finder' => 'all'
> ]
>
>
> As a test I added a foreign key constraint to the database:
>
>
> ALTER 
> <http://localhost/phpmyadmin/url.php?url=http://dev.mysql.com/doc/refman/5.5/en/alter-table.html>
>  
> TABLE 
> <http://localhost/phpmyadmin/url.php?url=http://dev.mysql.com/doc/refman/5.5/en/alter-table.html>
>  
> `articles` ADD FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE 
> <http://localhost/phpmyadmin/url.php?url=http://dev.mysql.com/doc/refman/5.5/en/delete.html>
>  
> RESTRICT ON UPDATE 
> <http://localhost/phpmyadmin/url.php?url=http://dev.mysql.com/doc/refman/5.5/en/update.html>
>  
> RESTRICT;
>
>
> However, that did not have any effects (not that I expected any).
>
> I also tried to specify the foreignKey, className etc. on the association, 
> no change there. I even downgraded to php 5.6 on my linux dev box, that 
> didn't help either.
>
>
> Any suggestions?
>
>
> Best regards,
>
> Manuel
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Cakephp 2.8.1] Multiple assosication to one model with habtm throws a notice

2016-03-24 Thread 'Steffen Reinig' via CakePHP
Hi,

i checked your solution, but it occurs the same error.

public $hasAndBelongsToMany = array (
'Owners' => array (
'className' => 'User',
'with' => 'PermissionOwner',
),
'Rights' => array (
'className' => 'User',
'with' => 'PermissionRight',
)
);

*Notice* (8): Undefined index: User 
[*CORE\Cake\Model\Datasource\DboSource.php*, line *1388*]




On Monday, March 14, 2016 at 8:29:13 PM UTC+1, John Andersen wrote:
>
> Check your model names in the HABTM relationships. Looks like you have a 
> mix of singular and plural.
> Enjoy, John
>
> On Monday, 14 March 2016 05:33:36 UTC+2, Steffen Reinig wrote:
>>
>> Hello Cakephp Fans,
>>
>> today i receive these error: 
>>
>> Notice (8): Undefined index: User [CORE\Cake\Model\Datasource\DboSource.php, 
>> line 1388]
>>
>> Its easy to reproduce:
>>
>> Model: User belongsTo Group
>> Model: Permission habtm Rights (className User)
>>Permission habtm Owners (className User)
>>
>> When i use now 
>> $this->Permission->find('all', array('recursive' => -2)); 
>>
>> the notice will be thrown. But only for the 2nd habtm.
>>
>> The output is like:
>>
>> array(
>> 'Permission' => array(
>> 'id' => '6',
>> ),
>> 'Owner' => array(
>> (int) 0 => array(
>> 'id' => '499',
>> 'PermissionOwner' => array(
>> 'id' => '6',
>> 'user_id' => '499',
>> 'permission_id' => '6'
>> )
>> )
>> ),
>> 'Rights' => array(
>> (int) 0 => array(
>> 'id' => '485',
>> 'PermissionRight' => array(
>> 'id' => '18',
>> 'permission_id' => '6',
>> 'user_id' => '485',
>> ),
>> 'Group' => array()
>> ),
>> (int) 1 => array(
>> 'id' => '124',
>> 'PermissionRight''id' => '19',
>> 'permission_id' => '6',
>>     'user_id' => '124',
>>         ),
>>     'Group' => array()
>> )
>> )
>> )
>>
>>
>>
>>
>> Kind Regards
>>
>>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Cakephp 3.2.5] Cannot match provided foreignKey

2016-03-24 Thread 'Manuel Maurer' via CakePHP
Hello,

I am trying to upgrade some of my applications from Cake 2 to 3. To get 
used to the new version I tried a few simple things and for some strange 
reason I cannot get Associations to run...

In my mysql database I have two simple tables:

CREATE TABLE `articles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `users` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

In a fresh copy of Cakephp 3.2.5 I added 3 files:

*src/Model/Table/UsersTable.php:*

belongsTo('Users');
}
}


*src/Controller/ArticlesController.php:*
Articles->find('all')->contain(['Users']);
var_dump($tmp);
exit;
}
}

My development system is running MariaDB 10.0.15 and PHP 7.0.4 on W7.

Finally I fire up http://test/articles and get this error:
* Cannot match provided foreignKey for "Users", got "(user_id)" but 
expected foreign key for "()" *


The last item in the stack trace is this:

Cake\ORM\Association\BelongsTo->_joinCondition 
CORE\src\ORM\Association.php, line 557


On the right hand side I get 
cakephp-3-2-5\vendor\cakephp\cakephp\src\ORM\Association.php:

'finder' => $this->finder()
];

if (!empty($options['foreignKey'])) {
$joinCondition = $this->_joinCondition($options);
if ($joinCondition) {
$options['conditions'][] = $joinCondition;
}
}


And in the arguments table:

[
'aliasPath' => 'Users',
'propertyPath' => 'user',
'includeFields' => true,
'foreignKey' => 'user_id',
'conditions' => [],
'fields' => [],
'type' => 'LEFT',
'table' => 'users',
'finder' => 'all'
]


As a test I added a foreign key constraint to the database:


ALTER 
<http://localhost/phpmyadmin/url.php?url=http://dev.mysql.com/doc/refman/5.5/en/alter-table.html>
 
TABLE 
<http://localhost/phpmyadmin/url.php?url=http://dev.mysql.com/doc/refman/5.5/en/alter-table.html>
 
`articles` ADD FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE 
<http://localhost/phpmyadmin/url.php?url=http://dev.mysql.com/doc/refman/5.5/en/delete.html>
 
RESTRICT ON UPDATE 
<http://localhost/phpmyadmin/url.php?url=http://dev.mysql.com/doc/refman/5.5/en/update.html>
 
RESTRICT;


However, that did not have any effects (not that I expected any).

I also tried to specify the foreignKey, className etc. on the association, 
no change there. I even downgraded to php 5.6 on my linux dev box, that 
didn't help either.


Any suggestions?


Best regards,

Manuel

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


CakePHP 3 + MSSQL = slow query

2016-03-24 Thread Enrico Lorenzoni

hello everyone, this is my situation.

MSSQL server with query on a single table; timer says 4.47s, SQL Log says 
1375 rows in 110ms.
Time spent in "controller action" is 3600ms and I further tried to inspect 
the controller code, printing elapsed microseconds: it seems like the 
assignment of the foreach cycle is the slowest thing in my code.

Maybe I can optimize something to save some time?

even with debug off time is not much better.

please tell me how can I provide more debug information to help fix this.

thanks!

Enrico

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Looking for an experienced CakePHP developer

2016-03-23 Thread 'zhaff' via CakePHP
Hi,

I have sent you an email. Please find my CakePHP 2.x works here 
http://neptunescripts.com

Best regards,
Zhaff

On Thursday, March 24, 2016 at 3:27:53 AM UTC+8, majna wrote:
>
> Hi,
>
> I'm looking for an experienced CakePHP 2.x developer, freelance, remote, 
> long-term.
> Please LMK if you know somebody.
>
> Thanks!
> majna
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Looking for an experienced CakePHP developer

2016-03-23 Thread Fabian Olmos
Hi,

I can help  you
El 23/3/2016 16:28, "majna" <majna...@gmail.com> escribió:

> Hi,
>
> I'm looking for an experienced CakePHP 2.x developer, freelance, remote,
> long-term.
> Please LMK if you know somebody.
>
> Thanks!
> majna
>
> --
> Sign up for our Newsletter for updates.
> http://cakephp.org/newsletter/signup
>
> We will soon be closing this Google Group. But don't worry, we have
> something better coming. Stay tuned for an updated from the CakePHP Team
> soon.
>
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Follow us on Twitter http://twitter.com/CakePHP
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Looking for an experienced CakePHP developer

2016-03-23 Thread abdessamad kassasse
maybe i can help U

2016-03-23 20:27 GMT+01:00 majna <majna...@gmail.com>:

> Hi,
>
> I'm looking for an experienced CakePHP 2.x developer, freelance, remote,
> long-term.
> Please LMK if you know somebody.
>
> Thanks!
> majna
>
> --
> Sign up for our Newsletter for updates.
> http://cakephp.org/newsletter/signup
>
> We will soon be closing this Google Group. But don't worry, we have
> something better coming. Stay tuned for an updated from the CakePHP Team
> soon.
>
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Follow us on Twitter http://twitter.com/CakePHP
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Looking for an experienced CakePHP developer

2016-03-23 Thread majna
Hi,

I'm looking for an experienced CakePHP 2.x developer, freelance, remote, 
long-term.
Please LMK if you know somebody.

Thanks!
majna

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Cakephp Upload to a sub directory is giving issues

2016-03-21 Thread Clement Crownrise
Hi everyone, I just completed a cakephp project with cake 2.x locally , 
every thing works perfectly. 

Now, I moved it online and uploaded to a sub directory, 
http://doubleedgetechnologies.com.ng/unlimitedgrace/

but below is the error I am getting, I know is .htaccess issue, I have 
struggled with it for over 3 hours all to no avail. 

Please help me out.

Thanks

Internal Server Error 

The server encountered an internal error or misconfiguration and was unable 
to complete your request.

Please contact the server administrator, 
webmas...@doubleedgetechnologies.com.ng and inform them of the time the 
error occurred, and anything you might have done that may have caused the 
error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while 
trying to use an ErrorDocument to handle the request.

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Cakephp 2.8.1] Multiple assosication to one model with habtm throws a notice

2016-03-14 Thread John Andersen
Check your model names in the HABTM relationships. Looks like you have a 
mix of singular and plural.
Enjoy, John

On Monday, 14 March 2016 05:33:36 UTC+2, Steffen Reinig wrote:
>
> Hello Cakephp Fans,
>
> today i receive these error: 
>
> Notice (8): Undefined index: User [CORE\Cake\Model\Datasource\DboSource.php, 
> line 1388]
>
> Its easy to reproduce:
>
> Model: User belongsTo Group
> Model: Permission habtm Rights (className User)
>Permission habtm Owners (className User)
>
> When i use now 
> $this->Permission->find('all', array('recursive' => -2)); 
>
> the notice will be thrown. But only for the 2nd habtm.
>
> The output is like:
>
> array(
> 'Permission' => array(
> 'id' => '6',
> ),
> 'Owner' => array(
> (int) 0 => array(
> 'id' => '499',
> 'PermissionOwner' => array(
> 'id' => '6',
> 'user_id' => '499',
> 'permission_id' => '6'
> )
> )
> ),
> 'Rights' => array(
> (int) 0 => array(
> 'id' => '485',
> 'PermissionRight' => array(
> 'id' => '18',
> 'permission_id' => '6',
> 'user_id' => '485',
> ),
> 'Group' => array()
> ),
> (int) 1 => array(
> 'id' => '124',
> 'PermissionRight''id' => '19',
> 'permission_id' => '6',
> 'user_id' => '124',
> ),
> 'Group' => array()
> )
> )
> )
>
>
>
>
> Kind Regards
>
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to upgrade TLS version in cakePHP

2016-03-14 Thread Борислав Събев Borislav Sabev
This has nothing to do with CakePHP - it is a pure-PHP issue.
Maybe the versions of PHP you use in the CLI (terminal) abd web are 
different? Check which is which and if different see how to configure the 
web-based one.

It really depends on what OS you are running this. Any web application 
could choose a different PHP version (if available on the server) via the 
web server config. For example, if it is Apache, this could change in the 
.htaccess or in the apache config files.

You need to investigate more but one thing is sure - this is not a Cake 
issue.

Hope this helped.
Cheers, Borislav.



On Monday, 14 March 2016 05:33:39 UTC+2, Arun NV wrote:
>
>
> down votefavorite 
> <http://stackoverflow.com/questions/35885577/how-to-upgrade-tls-version-in-cakephp-2-2-1#>
>
> I am using *cakePHP2.2.1* and *PHP5.3.10*.And i have updated *curl* and 
> *libcurl* now curl is supporting *TLS 1.2* in *terminal*. But when i am 
> trying to send *curl* request in *cakePHP* it's shows the*TLS* version as 
> *1.1*. Is there anyway to configure *TLS* in *cakePHP*?
>
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: What is the meaning of this error in cakephp 3?

2016-03-14 Thread Clement Crownrise
I forgot to add

use Cake\Validation\Validator;
to the ArticlesTable file,

I also forgot to add

public function beforefilter(Event $event){

To the AppController.php file.

Thanks all

On Mon, Mar 14, 2016 at 12:59 PM, Willem Schwarte <wschwa...@gmail.com>
wrote:

> So what was the problem?
>
> Op 14 mrt. 2016 om 12:43 heeft Clement Crownrise <
> clementcrownr...@gmail.com> het volgende geschreven:
>
> Thanks All, the error has been fixed.
>
>
>
> On Saturday, March 12, 2016 at 10:30:25 AM UTC+1, Clement Crownrise wrote:
>>
>> Hello, I am doing the blog tutorial in cakephp 3, but I got this notice
>> at the top of my page, please does anyone know the meaning and how to solve
>> it?
>>
>> *Strict* (2048): Declaration of App\Controller\AppController::beforefilter() 
>> should be compatible with 
>> Cake\Controller\Controller::beforeFilter(Cake\Event\Event $event) 
>> [*APP/Controller\AppController.php*, line *29*]
>>
>>
>>
>> *Strict* (2048): Declaration of 
>> App\Controller\UsersController::beforefilter() should be compatible with 
>> App\Controller\AppController::beforefilter() 
>> [*APP/Controller\UsersController.php*, line *10*]
>>
>>
>> Your help will be appreciated
>>
> --
> Sign up for our Newsletter for updates.
> http://cakephp.org/newsletter/signup
>
> We will soon be closing this Google Group. But don't worry, we have
> something better coming. Stay tuned for an updated from the CakePHP Team
> soon.
>
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Follow us on Twitter http://twitter.com/CakePHP
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> Sign up for our Newsletter for updates.
> http://cakephp.org/newsletter/signup
>
> We will soon be closing this Google Group. But don't worry, we have
> something better coming. Stay tuned for an updated from the CakePHP Team
> soon.
>
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Follow us on Twitter http://twitter.com/CakePHP
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "CakePHP" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/cake-php/qEur8oKsm48/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> cake-php+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
http://www.clementcrownrise.name/images/nameing.gif

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: What is the meaning of this error in cakephp 3?

2016-03-14 Thread Willem Schwarte
So what was the problem?

> Op 14 mrt. 2016 om 12:43 heeft Clement Crownrise <clementcrownr...@gmail.com> 
> het volgende geschreven:
> 
> Thanks All, the error has been fixed.
> 
> 
> 
>> On Saturday, March 12, 2016 at 10:30:25 AM UTC+1, Clement Crownrise wrote:
>> Hello, I am doing the blog tutorial in cakephp 3, but I got this notice at 
>> the top of my page, please does anyone know the meaning and how to solve it?
>> 
>> Strict (2048): Declaration of App\Controller\AppController::beforefilter() 
>> should be compatible with 
>> Cake\Controller\Controller::beforeFilter(Cake\Event\Event $event) 
>> [APP/Controller\AppController.php, line 29]
>> 
>> 
>> 
>> Strict (2048): Declaration of App\Controller\UsersController::beforefilter() 
>> should be compatible with App\Controller\AppController::beforefilter() 
>> [APP/Controller\UsersController.php, line 10]
>> 
>> Your help will be appreciated
> 
> -- 
> Sign up for our Newsletter for updates.
> http://cakephp.org/newsletter/signup
>  
> We will soon be closing this Google Group. But don't worry, we have something 
> better coming. Stay tuned for an updated from the CakePHP Team soon.
>  
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Follow us on Twitter http://twitter.com/CakePHP
> --- 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to cake-php+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Cakephp 3 Application Development Book

2016-03-14 Thread Clement Crownrise
Does anyone have a book on cakephp 3 ? I mean a book that explains 
practical application development with cake 3. 

Your help would be appreciated.

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: What is the meaning of this error in cakephp 3?

2016-03-14 Thread Clement Crownrise
Thanks All, the error has been fixed.



On Saturday, March 12, 2016 at 10:30:25 AM UTC+1, Clement Crownrise wrote:
>
> Hello, I am doing the blog tutorial in cakephp 3, but I got this notice at 
> the top of my page, please does anyone know the meaning and how to solve it?
>
> *Strict* (2048): Declaration of App\Controller\AppController::beforefilter() 
> should be compatible with 
> Cake\Controller\Controller::beforeFilter(Cake\Event\Event $event) 
> [*APP/Controller\AppController.php*, line *29*]
>
>
>
> *Strict* (2048): Declaration of 
> App\Controller\UsersController::beforefilter() should be compatible with 
> App\Controller\AppController::beforefilter() 
> [*APP/Controller\UsersController.php*, line *10*]
>
>
> Your help will be appreciated
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: What is the meaning of this error in cakephp 3?

2016-03-13 Thread Clement Crownrise
Thanks all, these lines of codes are already added to the
UsersController.php

but the error still persists



namespace App\Controller;

use Cake\Event\Event;
use App\Controller\AppController;
use Cake\Network\Exception\NotFoundException;


class UsersController extends AppController{

public function beforefilter(Event $event){
//parent::beforefilter($event);
//$this->Auth->allow(['add','logout']);
return null;
}


On Sun, Mar 13, 2016 at 9:14 AM, Willem Schwarte <wschwa...@gmail.com>
wrote:

> Yes. That should solve it.
>
> - willem
>
> Op 13 mrt. 2016 om 08:42 heeft heavyKevy <arnett.ke...@gmail.com> het
> volgende geschreven:
>
> You also need to make sure that you add the following line near the top of
> the file after the namespace with the other use statements:
>
> use Cake\Event\Event;
>
> Best regards,
> --Kevin
>
>
> On Sunday, March 13, 2016 at 1:47:10 AM UTC+7, Clement Crownrise wrote:
>>
>> Hi, Thanks Willem,
>>
>> I have tried it, but the error still persists , look at the code below
>>
>>
>> public function beforefilter(Event $event){
>> //parent::beforefilter($event);
>> //$this->Auth->allow(['add','logout']);
>> return null;
>> }
>>
>> On Sat, Mar 12, 2016 at 11:52 AM, Willem Schwarte <wsch...@gmail.com>
>> wrote:
>>
>>> Just as it says. You need to have the same method signature as the one
>>> you are overriding. Thus:
>>>
>>> public function beforeFilter(Event $event)
>>> {
>>> return null;
>>> }
>>>
>>>
>>> you forgot the parameter.
>>>
>>>
>>> Willem
>>>
>>>
>>>
>>> On 12 Mar 2016, at 10:30, Clement Crownrise <clementc...@gmail.com>
>>> wrote:
>>>
>>> Hello, I am doing the blog tutorial in cakephp 3, but I got this notice
>>> at the top of my page, please does anyone know the meaning and how to solve
>>> it?
>>>
>>> *Strict* (2048): Declaration of 
>>> App\Controller\AppController::beforefilter() should be compatible with 
>>> Cake\Controller\Controller::beforeFilter(Cake\Event\Event $event) 
>>> [*APP/Controller\AppController.php*, line *29*]
>>>
>>>
>>>
>>> *Strict* (2048): Declaration of 
>>> App\Controller\UsersController::beforefilter() should be compatible with 
>>> App\Controller\AppController::beforefilter() 
>>> [*APP/Controller\UsersController.php*, line *10*]
>>>
>>>
>>> Your help will be appreciated
>>>
>>> --
>>> Sign up for our Newsletter for updates.
>>> http://cakephp.org/newsletter/signup
>>>
>>> We will soon be closing this Google Group. But don't worry, we have
>>> something better coming. Stay tuned for an updated from the CakePHP Team
>>> soon.
>>>
>>> Like Us on FaceBook https://www.facebook.com/CakePHP
>>> Follow us on Twitter http://twitter.com/CakePHP
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "CakePHP" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to cake-php+u...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>> --
>>> Sign up for our Newsletter for updates.
>>> http://cakephp.org/newsletter/signup
>>>
>>> We will soon be closing this Google Group. But don't worry, we have
>>> something better coming. Stay tuned for an updated from the CakePHP Team
>>> soon.
>>>
>>> Like Us on FaceBook https://www.facebook.com/CakePHP
>>> Follow us on Twitter http://twitter.com/CakePHP
>>> ---
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "CakePHP" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/cake-php/qEur8oKsm48/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> cake-php+u...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> http://www.clementcrownrise.name/images/nameing.gif
>>
> --
> Sign up for our Newsletter for updates.
> http://cakephp.org/newsletter/signup
>
> We will soon be closing this Google Group. But don't worry, we have
> something better coming. Stay tuned for an up

How do I install the latest version(3.2.3) of Cakephp on shared hosting?

2016-03-13 Thread Prabhdeep Kaur
How do I install the latest version(3.2.3) of Cakephp on shared hosting? 
<http://stackoverflow.com/questions/35770133/how-do-i-install-the-latest-version3-2-3-of-cakephp-on-shared-hosting>

Can anyone help me to install latest version of Cakephp on shared hosting. 
The latest Cakephp folder structure is different from previous one. It give 
me a blank page when I run my site.

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


What are CakePHP 3.2 conventions for Town Directory Web-Site eg how name the tables and fields.... if have

2016-03-13 Thread Leonidas Savvides


Note:this is second post after approved by google group... first post - not 
see it - was prior approved... 


*What are CakePHP 3.2 conventions for Town Directory Web-Site eg how name 
the tables and fields if have *

 

businesses

id, user_id, cat_id, name, description, address, phone, email, url, 
Map_lat, Map_long, img1url, img2url, img3url 

 

categories

id, cat

 

Users  // this will be the same as Blog example in Guide

CREATE TABLE users (

id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,

username VARCHAR(50),

password VARCHAR(255),

role VARCHAR(20),

created DATETIME DEFAULT NULL,

modified DATETIME DEFAULT NULL

);

 

*bake (pre-made code baking) should work, for first two tables...?well?*

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to upgrade TLS version in cakePHP

2016-03-13 Thread Arun NV


down votefavorite 
<http://stackoverflow.com/questions/35885577/how-to-upgrade-tls-version-in-cakephp-2-2-1#>

I am using *cakePHP2.2.1* and *PHP5.3.10*.And i have updated *curl* and 
*libcurl* now curl is supporting *TLS 1.2* in *terminal*. But when i am 
trying to send *curl* request in *cakePHP* it's shows the*TLS* version as 
*1.1*. Is there anyway to configure *TLS* in *cakePHP*?

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: What is the meaning of this error in cakephp 3?

2016-03-13 Thread Matías Croce

Maybe you forgot the namespace. You should use:

use  Cake\Event\Event;

or

beforeFilter(Cake\Event\Event $event)



On 12/03/16 15:46, Clement Crownrise wrote:

Hi, Thanks Willem,

I have tried it, but the error still persists , look at the code below


public function beforefilter(Event $event){
//parent::beforefilter($event);
//$this->Auth->allow(['add','logout']);
return null;
}

On Sat, Mar 12, 2016 at 11:52 AM, Willem Schwarte <wschwa...@gmail.com 
<mailto:wschwa...@gmail.com>> wrote:


Just as it says. You need to have the same method signature as the
one you are overriding. Thus:

public function beforeFilter(Event $event) { return null; }


you forgot the parameter.


Willem




On 12 Mar 2016, at 10:30, Clement Crownrise
<clementcrownr...@gmail.com <mailto:clementcrownr...@gmail.com>>
wrote:

Hello, I am doing the blog tutorial in cakephp 3, but I got this
notice at the top of my page, please does anyone know the meaning
and how to solve it?

*Strict* (2048): Declaration of 
App\Controller\AppController::beforefilter() should be compatible with 
Cake\Controller\Controller::beforeFilter(Cake\Event\Event $event) 
[*APP/Controller\AppController.php*, line*29*]



*Strict* (2048): Declaration of 
App\Controller\UsersController::beforefilter() should be compatible with 
App\Controller\AppController::beforefilter() 
[*APP/Controller\UsersController.php*, line*10*]

Your help will be appreciated

-- 
Sign up for our Newsletter for updates.

http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we
have something better coming. Stay tuned for an updated from the
CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the
Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to cake-php+unsubscr...@googlegroups.com
<mailto:cake-php+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.


-- 
Sign up for our Newsletter for updates.

http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we
have something better coming. Stay tuned for an updated from the
CakePHP Team soon.

    Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to a topic in
the Google Groups "CakePHP" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/cake-php/qEur8oKsm48/unsubscribe.
To unsubscribe from this group and all its topics, send an email
to cake-php+unsubscr...@googlegroups.com
<mailto:cake-php+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.




--
http://www.clementcrownrise.name/images/nameing.gif
--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have 
something better coming. Stay tuned for an updated from the CakePHP 
Team soon.


Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google 
Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to cake-php+unsubscr...@googlegroups.com 
<mailto:cake-php+unsubscr...@googlegroups.com>.

For more options, visit https://groups.google.com/d/optout.


--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups "CakePHP" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Cakephp 2.8.1] Multiple assosication to one model with habtm throws a notice

2016-03-13 Thread 'Steffen Reinig' via CakePHP
Hello Cakephp Fans,

today i receive these error: 

Notice (8): Undefined index: User [CORE\Cake\Model\Datasource\DboSource.php, 
line 1388]

Its easy to reproduce:

Model: User belongsTo Group
Model: Permission habtm Rights (className User)
   Permission habtm Owners (className User)

When i use now 
$this->Permission->find('all', array('recursive' => -2)); 

the notice will be thrown. But only for the 2nd habtm.

The output is like:

array(
'Permission' => array(
'id' => '6',
),
'Owner' => array(
(int) 0 => array(
'id' => '499',
'PermissionOwner' => array(
'id' => '6',
'user_id' => '499',
'permission_id' => '6'
)
)
),
'Rights' => array(
(int) 0 => array(
'id' => '485',
'PermissionRight' => array(
'id' => '18',
'permission_id' => '6',
'user_id' => '485',
),
'Group' => array()
),
(int) 1 => array(
'id' => '124',
'PermissionRight''id' => '19',
'permission_id' => '6',
'user_id' => '124',
),
'Group' => array()
)
)
)




Kind Regards

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


CakePHP 2.6.13, 2.7.11, 2.8.2, 3.0.17, 3.1.12, and 3.2.5 Released

2016-03-13 Thread mark_story
The CakePHP core team is happy to announce the immediate availability of 
CakePHP
2.6.13, 2.7.11, 2.8.2, 3.0.17, 3.1.12, and 3.2.5. These releases contain 
security
fixes. 3.2.5 and 2.8.2 also contain bugfixes.

Security Fixes
--

These releases contain fixes for arbitrary address spoofing when using the
``clientIp()`` method of the request object. Previously, this method would 
use
the ``HTTP_CLIENT_IP`` header which can be spoofed easily. If you are using 
this
method as a source of trusted data we recommend you upgrade. We'd like to 
thank
the independent security researcher Dawid Golunski for discovering this
vulnerability in CakePHP which was reported to us by Beyond Security's
SecuriTeam Secure Disclosure program.

Bugfixes in 2.8.2
-

* Notice errors in ``request->referer()`` in PHP7 with no referrer were 
fixed.
  (@phlyper)
* Email logs now include the subject and to headers when using the
  ``MailTransport`` (@garas)
* Updated API documentation (@xhs345)
* A regression in DbAcl introduced in 2.8.1 was fixed around how inherited
  permissions and explicit deny permissions interacted (@markstory)

Bugfixes in 3.2.5
-

* Postgres schema reflection performs better on large databases. (@donkeyx,
  @markstory)
* Xcache cache engine can now store objects (@SmiSoft)
* Malformed HTTP Range headers no longer emit warnings. (@markstory)
* Improved API documentation (@markstory, @curtisgibby, @dereuromark)
* The ``__xn`` and ``__dxn`` functions now correctly use plural forms.
  (@chinpei215)


New Features in 3.2.5
-

* ``assertCookieNotSet`` was added to ``IntegrationTestCase``. (@lorenzo)
* The 'obj' fetch type was added to ``PDOStatement``. (@davalb)

As always, a huge thanks to all the community members that helped make this
release happen by reporting issues and sending pull requests.

Download a `packaged release on github
<https://github.com/cakephp/cakephp/releases>`_.

.. author:: markstory
.. categories:: release, news, security
.. tags:: release, security

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Cakephp 2.x Receive emails into the application...

2016-03-13 Thread euromark
This might help you
https://github.com/barbushin/php-imap


Am Samstag, 12. März 2016 01:31:18 UTC+1 schrieb April DeRossett:
>
> Ahoy!  I am looking for a way to receive reply emails into my cakephp 
> application and after a ton of research I haven't yet figured out how to 
> make that happen.  Pretend I am an awesome PHP and MySQL programmer but, 
> that I know Nothing about managing an email server.  Does anyone know of a 
> great tutorial or read that would help me get started?  Thanks in advance. 
> April
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: What is the meaning of this error in cakephp 3?

2016-03-13 Thread Willem Schwarte
Yes. That should solve it. 

- willem

> Op 13 mrt. 2016 om 08:42 heeft heavyKevy <arnett.ke...@gmail.com> het 
> volgende geschreven:
> 
> You also need to make sure that you add the following line near the top of 
> the file after the namespace with the other use statements:
> 
> use Cake\Event\Event;
> 
> Best regards,
> --Kevin
> 
> 
>> On Sunday, March 13, 2016 at 1:47:10 AM UTC+7, Clement Crownrise wrote:
>> Hi, Thanks Willem, 
>> 
>> I have tried it, but the error still persists , look at the code below
>> 
>> 
>> public function beforefilter(Event $event){
>> //parent::beforefilter($event);
>> //$this->Auth->allow(['add','logout']);
>> return null;
>> }
>> 
>>> On Sat, Mar 12, 2016 at 11:52 AM, Willem Schwarte <wsch...@gmail.com> wrote:
>>> Just as it says. You need to have the same method signature as the one you 
>>> are overriding. Thus:
>>> 
>>> public function beforeFilter(Event $event)
>>> {
>>> return null;
>>> }
>>> 
>>> you forgot the parameter.
>>> 
>>> 
>>> Willem
>>> 
>>> 
>>> 
>>>> On 12 Mar 2016, at 10:30, Clement Crownrise <clementc...@gmail.com> wrote:
>>>> 
>>>> Hello, I am doing the blog tutorial in cakephp 3, but I got this notice at 
>>>> the top of my page, please does anyone know the meaning and how to solve 
>>>> it?
>>>> 
>>>> Strict (2048): Declaration of App\Controller\AppController::beforefilter() 
>>>> should be compatible with 
>>>> Cake\Controller\Controller::beforeFilter(Cake\Event\Event $event) 
>>>> [APP/Controller\AppController.php, line 29]
>>>> 
>>>> 
>>>> 
>>>> Strict (2048): Declaration of 
>>>> App\Controller\UsersController::beforefilter() should be compatible with 
>>>> App\Controller\AppController::beforefilter() 
>>>> [APP/Controller\UsersController.php, line 10]
>>>> 
>>>> Your help will be appreciated
>>>> 
>>>> -- 
>>>> Sign up for our Newsletter for updates.
>>>> http://cakephp.org/newsletter/signup
>>>>  
>>>> We will soon be closing this Google Group. But don't worry, we have 
>>>> something better coming. Stay tuned for an updated from the CakePHP Team 
>>>> soon.
>>>>  
>>>> Like Us on FaceBook https://www.facebook.com/CakePHP
>>>> Follow us on Twitter http://twitter.com/CakePHP
>>>> --- 
>>>> You received this message because you are subscribed to the Google Groups 
>>>> "CakePHP" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>>> email to cake-php+u...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>> 
>>> -- 
>>> Sign up for our Newsletter for updates.
>>> http://cakephp.org/newsletter/signup
>>>  
>>> We will soon be closing this Google Group. But don't worry, we have 
>>> something better coming. Stay tuned for an updated from the CakePHP Team 
>>> soon.
>>>  
>>> Like Us on FaceBook https://www.facebook.com/CakePHP
>>> Follow us on Twitter http://twitter.com/CakePHP
>>> --- 
>>> You received this message because you are subscribed to a topic in the 
>>> Google Groups "CakePHP" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/cake-php/qEur8oKsm48/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to 
>>> cake-php+u...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>> 
>> 
>> 
>> -- 
>> http://www.clementcrownrise.name/images/nameing.gif
> 
> -- 
> Sign up for our Newsletter for updates.
> http://cakephp.org/newsletter/signup
>  
> We will soon be closing this Google Group. But don't worry, we have something 
> better coming. Stay tuned for an updated from the CakePHP Team soon.
>  
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Follow us on Twitter http://twitter.com/CakePHP
> --- 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to cake-php+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: What is the meaning of this error in cakephp 3?

2016-03-12 Thread heavyKevy
You also need to make sure that you add the following line near the top of 
the file after the namespace with the other use statements:

use Cake\Event\Event;

Best regards,
--Kevin


On Sunday, March 13, 2016 at 1:47:10 AM UTC+7, Clement Crownrise wrote:
>
> Hi, Thanks Willem, 
>
> I have tried it, but the error still persists , look at the code below
>
>
> public function beforefilter(Event $event){
> //parent::beforefilter($event);
> //$this->Auth->allow(['add','logout']);
> return null;
> }
>
> On Sat, Mar 12, 2016 at 11:52 AM, Willem Schwarte <wsch...@gmail.com 
> > wrote:
>
>> Just as it says. You need to have the same method signature as the one 
>> you are overriding. Thus:
>>
>> public function beforeFilter(Event $event)
>> {
>> return null;
>> }
>>
>>
>> you forgot the parameter.
>>
>>
>> Willem
>>
>>
>>
>> On 12 Mar 2016, at 10:30, Clement Crownrise <clementc...@gmail.com 
>> > wrote:
>>
>> Hello, I am doing the blog tutorial in cakephp 3, but I got this notice 
>> at the top of my page, please does anyone know the meaning and how to solve 
>> it?
>>
>> *Strict* (2048): Declaration of App\Controller\AppController::beforefilter() 
>> should be compatible with 
>> Cake\Controller\Controller::beforeFilter(Cake\Event\Event $event) 
>> [*APP/Controller\AppController.php*, line *29*]
>>
>>
>>
>> *Strict* (2048): Declaration of 
>> App\Controller\UsersController::beforefilter() should be compatible with 
>> App\Controller\AppController::beforefilter() 
>> [*APP/Controller\UsersController.php*, line *10*]
>>
>>
>> Your help will be appreciated
>>
>> -- 
>> Sign up for our Newsletter for updates.
>> http://cakephp.org/newsletter/signup
>>  
>> We will soon be closing this Google Group. But don't worry, we have 
>> something better coming. Stay tuned for an updated from the CakePHP Team 
>> soon.
>>  
>> Like Us on FaceBook https://www.facebook.com/CakePHP
>> Follow us on Twitter http://twitter.com/CakePHP
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "CakePHP" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to cake-php+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> -- 
>> Sign up for our Newsletter for updates.
>> http://cakephp.org/newsletter/signup
>>  
>> We will soon be closing this Google Group. But don't worry, we have 
>> something better coming. Stay tuned for an updated from the CakePHP Team 
>> soon.
>>  
>> Like Us on FaceBook https://www.facebook.com/CakePHP
>> Follow us on Twitter http://twitter.com/CakePHP
>> --- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "CakePHP" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/cake-php/qEur8oKsm48/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> cake-php+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> http://www.clementcrownrise.name/images/nameing.gif
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: What is the meaning of this error in cakephp 3?

2016-03-12 Thread Clement Crownrise
Hi, Thanks Willem,

I have tried it, but the error still persists , look at the code below


public function beforefilter(Event $event){
//parent::beforefilter($event);
//$this->Auth->allow(['add','logout']);
return null;
}

On Sat, Mar 12, 2016 at 11:52 AM, Willem Schwarte <wschwa...@gmail.com>
wrote:

> Just as it says. You need to have the same method signature as the one you
> are overriding. Thus:
>
> public function beforeFilter(Event $event)
> {
> return null;
> }
>
>
> you forgot the parameter.
>
>
> Willem
>
>
>
> On 12 Mar 2016, at 10:30, Clement Crownrise <clementcrownr...@gmail.com>
> wrote:
>
> Hello, I am doing the blog tutorial in cakephp 3, but I got this notice at
> the top of my page, please does anyone know the meaning and how to solve it?
>
> *Strict* (2048): Declaration of App\Controller\AppController::beforefilter() 
> should be compatible with 
> Cake\Controller\Controller::beforeFilter(Cake\Event\Event $event) 
> [*APP/Controller\AppController.php*, line *29*]
>
>
>
> *Strict* (2048): Declaration of 
> App\Controller\UsersController::beforefilter() should be compatible with 
> App\Controller\AppController::beforefilter() 
> [*APP/Controller\UsersController.php*, line *10*]
>
>
> Your help will be appreciated
>
> --
> Sign up for our Newsletter for updates.
> http://cakephp.org/newsletter/signup
>
> We will soon be closing this Google Group. But don't worry, we have
> something better coming. Stay tuned for an updated from the CakePHP Team
> soon.
>
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Follow us on Twitter http://twitter.com/CakePHP
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> Sign up for our Newsletter for updates.
> http://cakephp.org/newsletter/signup
>
> We will soon be closing this Google Group. But don't worry, we have
> something better coming. Stay tuned for an updated from the CakePHP Team
> soon.
>
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Follow us on Twitter http://twitter.com/CakePHP
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "CakePHP" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/cake-php/qEur8oKsm48/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> cake-php+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
http://www.clementcrownrise.name/images/nameing.gif

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: What is the meaning of this error in cakephp 3?

2016-03-12 Thread Willem Schwarte
Just as it says. You need to have the same method signature as the one you are 
overriding. Thus:

public function beforeFilter(Event $event)
{
return null;
}

you forgot the parameter.


Willem



> On 12 Mar 2016, at 10:30, Clement Crownrise <clementcrownr...@gmail.com> 
> wrote:
> 
> Hello, I am doing the blog tutorial in cakephp 3, but I got this notice at 
> the top of my page, please does anyone know the meaning and how to solve it?
> 
> Strict (2048) <>: Declaration of App\Controller\AppController::beforefilter() 
> should be compatible with 
> Cake\Controller\Controller::beforeFilter(Cake\Event\Event $event) 
> [APP/Controller\AppController.php, line 29]
> 
> 
> 
> Strict (2048) <>: Declaration of 
> App\Controller\UsersController::beforefilter() should be compatible with 
> App\Controller\AppController::beforefilter() 
> [APP/Controller\UsersController.php, line 10]
> 
> Your help will be appreciated
> 
> -- 
> Sign up for our Newsletter for updates.
> http://cakephp.org/newsletter/signup <http://cakephp.org/newsletter/signup>
>  
> We will soon be closing this Google Group. But don't worry, we have something 
> better coming. Stay tuned for an updated from the CakePHP Team soon.
>  
> Like Us on FaceBook https://www.facebook.com/CakePHP 
> <https://www.facebook.com/CakePHP>
> Follow us on Twitter http://twitter.com/CakePHP <http://twitter.com/CakePHP>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to cake-php+unsubscr...@googlegroups.com 
> <mailto:cake-php+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


What is the meaning of this error in cakephp 3?

2016-03-12 Thread Clement Crownrise
Hello, I am doing the blog tutorial in cakephp 3, but I got this notice at 
the top of my page, please does anyone know the meaning and how to solve it?

*Strict* (2048): Declaration of App\Controller\AppController::beforefilter() 
should be compatible with 
Cake\Controller\Controller::beforeFilter(Cake\Event\Event $event) 
[*APP/Controller\AppController.php*, line *29*]



*Strict* (2048): Declaration of App\Controller\UsersController::beforefilter() 
should be compatible with App\Controller\AppController::beforefilter() 
[*APP/Controller\UsersController.php*, line *10*]


Your help will be appreciated

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Cakephp 2.x Receive emails into the application...

2016-03-11 Thread April DeRossett
Ahoy!  I am looking for a way to receive reply emails into my cakephp 
application and after a ton of research I haven't yet figured out how to 
make that happen.  Pretend I am an awesome PHP and MySQL programmer but, 
that I know Nothing about managing an email server.  Does anyone know of a 
great tutorial or read that would help me get started?  Thanks in advance. 
April

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: API Design using CakePHP 3

2016-03-10 Thread Florian Krämer
1) I would *not *avoid that. We use the protection and have no problem at 
all with it.
2) Create a filter and use it in beforeSave()? Create data objects like the 
entities in Cake and filter the date there before sending?
3) No idea what you're talking about, you basically say "It's not working 
righ". We do the transformRequest just once AFAIR.
4) No idea, "It's not working" is nothing you'll get help with.

See 
http://book.cakephp.org/3.0/en/development/routing.html#creating-restful-routes 
There is also the FoC CRUD plugin but we don't use it yet and probably 
won't. Cake is good enough as it is for us so far. We're re-building our 
frontend and a CRM with Angular and Cake3.

On Wednesday, March 9, 2016 at 3:04:19 PM UTC+1, Rafael Queiroz wrote:
>
> Hi guys,
>
> I make a *API* using *CakePHP 3.2.x*, so, and now have a angular app 
> requesting *API*.
> My question is about association data, e.g. i have *Series* *Model* and 
> send the request:
>
> *api.com/series/add <http://api.com/series/add>*
>
> {
> "id": 5,
> "title": "New serie", 
> "hidden": false,
> "courses": {"_ids":["1","2"]}
> }
>
> It's work, many times, i have problems, because first time in edit, i get 
> register and mockup in scope of app, and have problems, because register 
> have all fields, per sample: 
>
> 1. Avoiding Mass Assignment Protection in Entity, because save created = 
> null
> 2. Send all object data, have association data i don't want send, i need 
> using transformRequest in angularJs
> 3. Many times i have problem with CORS, because send a object complex, not 
> expected, if simple object it's work
> 4. I have problem for delete association data, have a garbage in docs, but 
> not work's 100%. [1]
>
> So, this easy save data and associations, now, it's my nightmare.
>
> *My point is about best practices for api, i read articles and have a 
> solution, using sub resources.*
>
>
>
> *I need create new endpoints for retrieve/save/delete associations data in 
> register ?What do you think ? Thank you in advance for your attention*
> [1] 
> http://book.cakephp.org/3.0/en/orm/saving-data.html#patching-hasmany-and-belongstomany
>
> -- 
> Regards,
>
> Rafael F. Queiroz
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


API Design using CakePHP 3

2016-03-09 Thread Rafael Queiroz
Hi guys,

I make a *API* using *CakePHP 3.2.x*, so, and now have a angular app
requesting *API*.
My question is about association data, e.g. i have *Series* *Model* and
send the request:

*api.com/series/add <http://api.com/series/add>*

{
"id": 5,
"title": "New serie",
"hidden": false,
"courses": {"_ids":["1","2"]}
}

It's work, many times, i have problems, because first time in edit, i get
register and mockup in scope of app, and have problems, because register
have all fields, per sample:

1. Avoiding Mass Assignment Protection in Entity, because save created =
null
2. Send all object data, have association data i don't want send, i need
using transformRequest in angularJs
3. Many times i have problem with CORS, because send a object complex, not
expected, if simple object it's work
4. I have problem for delete association data, have a garbage in docs, but
not work's 100%. [1]

So, this easy save data and associations, now, it's my nightmare.

*My point is about best practices for api, i read articles and have a
solution, using sub resources.*



*I need create new endpoints for retrieve/save/delete associations data in
register ?What do you think ? Thank you in advance for your attention*
[1]
http://book.cakephp.org/3.0/en/orm/saving-data.html#patching-hasmany-and-belongstomany

-- 
Regards,

Rafael F. Queiroz

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


CakePHP 3.x CMS?

2016-03-01 Thread Dakota
Croogo is currently being upgraded. Would be great if you could help out :)

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


CakePHP 3.x CMS?

2016-03-01 Thread calzone
Are there any current CMS packages out there that are built on CakePHP 3.x?

Seems like all the Cake CMS I can find are abandoned or old and almost 
abandoned projects.  I remember trying one last year and find it wouldn't 
even set up correctly out of the box.

The point of a CMS is to not have to work to get up and running. If I 
wanted to work, I may as well just use CakePHP by itself.

Well, almost.  The issue is that I need to empower totally non-technical 
people to update content on a website, but I want to be able to customize 
it and tweak it myself to do specialized tasks the way we want, tasks that 
are not really well-supported with a traditional CMS or might require 
trying out plugin after plugin hoping to find the right one when I know I 
could just code it myself.

Given that, however, I don't have the bandwidth in my company to actually 
create a CMS using CakePHP for the non-techies.

More explanation than necessary perhaps, but I hope it makes clear why I 
seek a CakePHP CMS as opposed to just using CakePHP or just using some 
other CMS.

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Any Nigerian Cakephp Developer

2016-02-29 Thread Clement Crownrise
Hi, I am Clement from Nigeria, I am in need of a Good, professional and 
experienced cakephp developer in Nigeria. 

Please is you are one, do send me a mail , we have businesses to do 
together.

Thanks

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Software R and CakePHP

2016-02-25 Thread Rodrigo Dall'Agnol
someone has worked with the integration of R software with Cakephp, I need 
to know what you need (server configuration, the cake, other settings) to 
call and run the script by R Cakephp? .

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: CakePHP 3.2.0 Released

2016-02-23 Thread José Lorenzo
Yes, it is

On Monday, February 1, 2016 at 12:18:20 PM UTC+1, rafaelmsantos.com wrote:
>
> Is the intl php extension still required?
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Cakephp 3.x How to create dynamic subdomain?

2016-02-23 Thread Dr. Tarique Sani
What is the error?

The *.example.com should point to the same webroot as your www.example.com
and example.com

Do all the magic in your code



On Tue, Feb 16, 2016 at 10:44 AM, Rajaram indira <
rajaramindiras...@gmail.com> wrote:

> Hi,
>
>  I'm doing dynamic sub domain in cakephp 3.x like,
>
> - [].example.com
>
> In sub domain part should be dynamic.
> I was tried wildcard method. But I can't get exact solution for my
> problem.
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at https://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
=
Hire a CakePHP dev team : http://sanisoft.com
=

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: CakePHP 3.0 location for API-Access

2016-02-21 Thread Anthony GRASSIOT
Didn't use it personnaly but I know that this exists:

  

<https://github.com/cakephp-fr/openweathermap>  

  

You might want to have a look at it.

  

Regards

Anto

  

> On Feb 21 2016, at 5:33 pm, euromark dereurom...@gmail.com wrote:  

>

> Take a look at twitter, and how they did it:

>

> https://github.com/cvo-technologies/cakephp-twitter

>

>  

>

>  
Am Sonntag, 21. Februar 2016 15:06:29 UTC+1 schrieb web tools:

>

>> Hello,

>>

>>  

>>

>> I would like to use the API of OpenWeatherMap
(<http://openweathermap.org/api>) in my CakePHP 3.x Application, but I am not
sure where to put my API-Calls like "**getWeatherByCityname()**" in, because
'**Table**', '**Entity**' and '**Behaviour**' only belongs to relational
Databases.

>>

>>  

>>

>> Is there a best practice?

>>

>>  

>>

>> Thanks!

>>

>> cls

>>

>>  

>>

>>  

>

> \--  
We will soon be closing this Google Group. But don't worry, we have something
better coming. Stay tuned for an updated from the CakePHP Team soon.  
  
Like Us on FaceBook <https://www.facebook.com/CakePHP>  
Follow us on Twitter <http://twitter.com/CakePHP>  
\---  
You received this message because you are subscribed to the Google Groups
"CakePHP" group.  
To unsubscribe from this group and stop receiving emails from it, send an
email to [cake-php+unsubscr...@googlegroups.com](mailto:cake-
php+unsubscr...@googlegroups.com).  
For more options, visit <https://groups.google.com/d/optout>.  

-- 
We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: CakePHP 3.x and Redis as one of the main Database

2016-02-21 Thread euromark
You could work together and upgrade it to 3.x.

Dont forget to publish it 
on https://github.com/FriendsOfCake/awesome-cakephp then.

Mark


Am Sonntag, 21. Februar 2016 15:06:29 UTC+1 schrieb web tools:
>
> Hello,
>
> I am new to CakePHP and I am wondering which is the best way to use Redis 
> not as Cache but as a main Database with CakePHP 3.x. 
>
> I have found a Plugin for Cake 2, but it seems to be incompatible with 
> CakePHP 3.x (https://github.com/Oefenweb/cakephp-redis).
>
> Does anyone has a tipp?
>
> Thanks, Cls
>

-- 
We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: CakePHP 3.0 location for API-Access

2016-02-21 Thread euromark
Take a look at twitter, and how they did it:
https://github.com/cvo-technologies/cakephp-twitter


Am Sonntag, 21. Februar 2016 15:06:29 UTC+1 schrieb web tools:
>
> Hello, 
>
> I would like to use the API of OpenWeatherMap (
> http://openweathermap.org/api) in my CakePHP 3.x Application, but I am 
> not sure where to put my API-Calls like "*getWeatherByCityname()*" in, 
> because '*Table*', '*Entity*' and '*Behaviour*' only belongs to 
> relational Databases.
>
> Is there a best practice?
>
> Thanks!
> cls
>
>
>

-- 
We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


CakePHP 3.x and Redis as one of the main Database

2016-02-21 Thread web tools
Hello,

I am new to CakePHP and I am wondering which is the best way to use Redis 
not as Cache but as a main Database with CakePHP 3.x. 

I have found a Plugin for Cake 2, but it seems to be incompatible with 
CakePHP 3.x (https://github.com/Oefenweb/cakephp-redis).

Does anyone has a tipp?

Thanks, Cls

-- 
We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


CakePHP 3.0 location for API-Access

2016-02-21 Thread web tools
Hello, 

I would like to use the API of OpenWeatherMap 
(http://openweathermap.org/api) in my CakePHP 3.x Application, but I am not 
sure where to put my API-Calls like "*getWeatherByCityname()*" in, because '
*Table*', '*Entity*' and '*Behaviour*' only belongs to relational Databases.

Is there a best practice?

Thanks!
cls


-- 
We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


CakePHP Newsletter Starts Monday!

2016-02-19 Thread Larry E. Masters
Stay updated on what’s happening with CakePHP. Signup for our newsletter today 
or you will miss out first issue on Monday. 

http://cakephp.org/newsletter/signup

-- 
Larry E. Masters
Co-Founder CakePHP - cakephp.org
702-518-3693

-- 
We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Cakephp 3.x How to create dynamic subdomain?

2016-02-17 Thread Rajaram indira
Hi,

 I'm doing dynamic sub domain in cakephp 3.x like,

- [].example.com

In sub domain part should be dynamic.
I was tried wildcard method. But I can't get exact solution for my 
problem.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: intl extension to use CakePHP not working

2016-02-17 Thread Rohit Yadav
I am facing the same problem. Please let me know what to. 

what I did:- 
I have Xampp installed build 12 Nov 2015, 
PHP version :- 7.0
Did the things maintained in cakephp 3.0 documentation 

When I open phpinfo() section of xammp it shows INTL section means 
extension enabled. 
But when it try to run bin\cake server then It throws the same error every 
time. I try to searched a lot and did what stackoverflow says and some 
other php blogger says but still getting the same error. 

Please let me know what to do to resolve this issue.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


CakePHP 3.2: Plugins inside plugins?

2016-02-12 Thread Salines
I work at a large application that contains two groups of users. Each group 
will have a different type of profile. for easy to track and organize the 
code idea is to create these groups as separate plugins. But each of these 
groups should have its own settings plugin.

So, the question is it wise to create a plugin within plugin? I tried to do 
with cake bake command, but without success.

Thanks

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Sorting paginated data by string length in cakephp 3.x

2016-02-09 Thread euromark
using 3.x virtual fields, expr() func() 
see the docs for that

Mark


Am Sonntag, 7. Februar 2016 17:48:33 UTC+1 schrieb jakubplus:
>
> Hi,
>
> I'd like to use Paginator sorting function, but for sorting by string 
> length like mysql LENGTH(title)
>
> $this->Paginator->sort('title')
>
> How to do that in cakephp 3?
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Anyone have done cakephp 3.x integration with angularjs 1.4.x, please help for the setup and directory structure

2016-02-07 Thread Ashish Raj
I have to implement angularjs 1.4.x with cakephp 3.x for a fully customise 
shopping cart. I am totally new in cakephp 3.x (studying from last one week 
) and angularjs 1.4.x

I am thinking what should be the directory structure for merging cakephp 
3.x to angularjs 1.4.x for a shopping website, please help.

And help me about the integration process and work flow... I have searched 
alot in past days but found old code of cakephp 2.x and confused ...

Currently I have found below link as best output of my search about this...

https://medium.com/@ranostaj/login-with-cakephp3-and-angularjs-b4b124708086#.jpn8jqrhl

But above link seems to be for API in cakephp and angular... Is this 
suitable in my context... Please help 

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Sorting paginated data by string length in cakephp 3.x

2016-02-07 Thread jakubplus
Hi,

I'd like to use Paginator sorting function, but for sorting by string 
length like mysql LENGTH(title)

$this->Paginator->sort('title')

How to do that in cakephp 3?

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: CakePHP 3 - Catch invalidargument email -> to exception

2016-02-07 Thread Artur Mamedov
Have the same problem with Carbon::createFromFormat()

try {
   $this->app_from = $date->createFromFormat('Y-m-d', 
$this->request->cookie('app_from'));//$date->subDays(7);//date('Y-m-d', 
strtotime("-7 days"));
   $this->app_to = $date->createFromFormat('Y-m-d', 
$this->request->cookie('app_to'));//$date->now();
} catch (InvalidArgumentException $e) {
   $this->app_from = $date->subDays(7);//date('Y-m-d', strtotime("-7 days"));
   $this->app_to = $date->now();
}


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


CakePHP 3.x - Table display name

2016-02-07 Thread Colin Conway
Hi,

I know this must be really easy, but I've Googled it to death and found 
nothing. The documentation doesn't appear to have anything about it either.

I'm learning CakePHP, using 3.x and I just want to change the name that is 
displayed for a database table. The table is called 'stats_branch_daily', 
but I want the menu and page title to display 'Daily Stats'.

I expect this is just a single variable that needs setting, but I cannot 
find it.

Thanks in advance,
Colin =)

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Cassandra and cakephp

2016-02-04 Thread sphereweb
Also interested in this

On Tuesday, May 29, 2012 at 5:51:50 AM UTC-4, Juan Ezquerro LLanes wrote:
>
> Is there any cassandra datasource for cakephp? Google say yes but i can't 
> find the code.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: CakePHP 3.2.0 Released

2016-02-02 Thread Florian Krämer
Just try it? It's a one minute thing.

On Monday, February 1, 2016 at 12:18:20 PM UTC+1, rafaelmsantos.com wrote:
>
> Is the intl php extension still required?
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: CakePHP 3.2.0 Released

2016-02-01 Thread rafaelmsantos.com
Is the intl php extension still required?

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


CakePHP 2.xx rendering view of original method after saving pdf through second method

2016-01-30 Thread Dave


I am using CakePHP 2.xx and the following component - 
https://github.com/segy/Mpdf to render pdf's.


I have 2 Controller methods, the first method *request_pdf* calls a second 
method *send_pdf* in the same Controller. The second method creates and 
saves a pdf to file, and will then email the pdf (but for simplicity I have 
omitted this part of the code).


Once the second method *send_pdf* finishes creating the pdf control should 
be passed back to the first method *request_pdf* where it should then 
render on screen the view file in *view/Documents/request_pdf*.


The pdf correctly saves to the TMP directory, BUT when *request_pdf* renders 
in the browser, it renders the pdf on screen. The saving of the pdf seems 
to interfere with the rendering of the view.


Here is my Controller code


App::uses('AppController', 'Controller');
App::uses('CakeEmail', 'Network/Email');

class DocumentsController extends AppController {

public $components = array('Mpdf');

// --
// beforeFilter
// --

public function beforeFilter()
{
parent::beforeFilter();
}

function request_pdf()
{
$this->send_pdf();

// have also tried this as described by the author of Mpdf component
// $result = $this->requestAction(array('action' => 'send_pdf/'), 
array('return', 'bare' => false));
}

function send_pdf()
{
$this->layout = null;
$this->Mpdf->init();

$response = $this->render('send_pdf');

$thebody = $response->body();
$this->Mpdf->WriteHTML($thebody);
$this->Mpdf->Output(TMP.'requested_pdf.pdf', 'F');

// have also tried this
// $this->Mpdf->setFilename(TMP.'requested_pdf.pdf');
// $this->Mpdf->setOutput('F');
}
}


I'm sure that it is something simple that I'm over looking here regarding 
the rendering of the original view, but I can't work it out.


I have also tried calling different methods in both the first and second 
methods without success,


$this->layout
$this->view
$this->viewPath
$this->render
$This->autoRender


If I remove $this->layout = null from send_pdf then I get both the pdf AND 
view from *request_pdf*rendered on the screen overlaying each other.


All help appreciated.


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


CakePHP 3.2.1 and 3.1.10 released

2016-01-30 Thread mark_story
The CakePHP core team is pleased to announce the immediate availability of 
CakePHP 3.1.10 and 3.2.1. These maintenance releases fix a regression with 
yesterday's release of 3.1.9 and 3.2.0. 

Bugfixes


You can read all of the [changes in 
3.1.10](http://cakephp.org/changelogs/3.1.10) and the [changes in 
3.2.1](http://cakephp.org/changelogs/3.1.10) in the respective changelogs.

* A regression nested prefix routes being incorrectly inflected has been 
corrected. (@ADmad)

As always, a big thanks to all the community members that helped make this 
release happen by reporting issues and submitting pull requests.

Download a [packaged release on 
github](https://github.com/cakephp/cakephp/releases).

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


cakephp 3.0 and snelg/cakephp-3-oracle [ Error: [Cake\Database\Exception] Cannot describe s_i18_n. It has 0 columns.]

2016-01-29 Thread Mbhd90
When i try to perform bake command i receive this exception

Exception: Cannot describe s_i18_n. It has 0 columns. in 
[/var/www/html/3.0/app-master/vendor/cakephp/cakephp/src/Database/Schema/Collection.php,
 
line 98]
2016-01-21 15:07:24 Error: [Cake\Database\Exception] Cannot describe 
s_i18_n. It has 0 columns.
Stack Trace:
#0 
/var/www/html/3.0/app-master/vendor/cakephp/cakephp/src/Database/Schema/CachedCollection.php(64):
 
Cake\Database\Schema\Collection->describe('s_i18_n', Array)
#1 
/var/www/html/3.0/app-master/vendor/cakephp/cakephp/src/ORM/Table.php(423): 
Cake\Database\Schema\CachedCollection->describe('s_i18_n')
#2 
/var/www/html/3.0/app-master/vendor/cakephp/cakephp/src/ORM/Table.php(499): 
Cake\ORM\Table->schema()
#3 
/var/www/html/3.0/app-master/vendor/cakephp/bake/src/Shell/Task/ModelTask.php(194):
 
Cake\ORM\Table->primaryKey()
#4 
/var/www/html/3.0/app-master/vendor/cakephp/bake/src/Shell/Task/ModelTask.php(110):
 
Bake\Shell\Task\ModelTask->getAssociations(Object(Cake\ORM\Table))
#5 
/var/www/html/3.0/app-master/vendor/cakephp/bake/src/Shell/Task/ModelTask.php(96):
 
Bake\Shell\Task\ModelTask->bake('SI18N')
#6 
/var/www/html/3.0/app-master/vendor/cakephp/bake/src/Shell/BakeShell.php(250): 
Bake\Shell\Task\ModelTask->main('SI18N')
#7 
/var/www/html/3.0/app-master/vendor/cakephp/cakephp/src/Collection/CollectionTrait.php(51):
 
Bake\Shell\BakeShell->Bake\Shell\{closure}('SI18N', 0)
#8 
/var/www/html/3.0/app-master/vendor/cakephp/bake/src/Shell/BakeShell.php(253): 
Cake\Collection\Collection->each(Object(Closure))
#9 [internal function]: Bake\Shell\BakeShell->all('SI18N')
#10 
/var/www/html/3.0/app-master/vendor/cakephp/cakephp/src/Console/Shell.php(443): 
call_user_func_array(Array, Array)
#11 
/var/www/html/3.0/app-master/vendor/cakephp/cakephp/src/Console/ShellDispatcher.php(212):
 
Cake\Console\Shell->runCommand(Array, true, Array)
#12 
/var/www/html/3.0/app-master/vendor/cakephp/cakephp/src/Console/ShellDispatcher.php(179):
 
Cake\Console\ShellDispatcher->_dispatch(Array)
#13 
/var/www/html/3.0/app-master/vendor/cakephp/cakephp/src/Console/ShellDispatcher.php(126):
 
Cake\Console\ShellDispatcher->dispatch(Array)
#14 /var/www/html/3.0/app-master/bin/cake.php(33): 
Cake\Console\ShellDispatcher::run(Array)
#15 {main}


is somebody know how to fix this?

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Help me abount transaction (begin, commit, rollback) in cakephp 3 version

2016-01-29 Thread Somsubhra Saha
Hi,

I am coded from ref link - 
http://book.cakephp.org/3.0/en/orm/database-basics.html#using-transactions.
But my code is running perfectly. But data is not updated or inserted into 
database. 

Below is my code (controller) -

$conn = ConnectionManager::get('default');

$conn->begin();
try {

// here is my code //

$conn->commit();
} catch(Exception $e) {
// do exception handling
$conn->rollback();
}


When I used exit before commit line the database is updated and as well as 
insert values. But when the exit remove the rollback is working (I think).

Please help or guide me.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


CakePHP 3.2.0 Released

2016-01-29 Thread mark_story
The CakePHP core team is happy to announce the immediate availability of 
CakePHP 3.2.0. This is the first stable release for the 3.2 branch. Going 
forward 3.1 will only receive security updates. 3.2 is a backwards 
compatible release with 3.1 and 3.0 and provides new features and 
performance improvements.

Minimum PHP 5.5 Required


CakePHP 3.2 requires at least PHP 5.5.9. By adopting PHP 5.5 we can provide 
better Date and Time libraries and remove dependencies on password 
compatibility libraries.

Deprecations


As we continue to improve CakePHP, certain features are deprecated as they 
are replaced with better solutions. Deprecated features will not be removed 
until 4.0:

* ``Shell::error()`` is deprecated because its name does not clearly 
indicate that it both outputs a message and stops execution. Use 
``Shell::abort()`` instead.
* ``Cake\Database\Expression\QueryExpression::type()`` is deprecated. Use 
``tieWith()`` instead.
* ``Cake\Database\Type\DateTimeType::$dateTimeClass`` is deprecated.  Use 
DateTimeType::useMutable() or DateTimeType::useImmutable() instead.
* ``Cake\Database\Type\\DateType::$dateTimeClass`` is deprecated.  Use
  ``DateTimeType::useMutable()`` or ``DateType::useImmutable()`` instead.
* ``Cake\ORM\ResultSet::_calculateTypeMap()`` is now unused and deprecated.
* ``Cake\ORM\ResultSet::_castValues()`` is now unused and deprecated.

Disabling Deprecation Warnings
--

Upon upgrading you may encounter several deprecation warnings. These 
warnings are emitted by methods, options and functionality that will be 
removed in CakePHP 4.x, but will continue to exist throughout the lifetime 
of 3.x. While we recommend addressing deprecation issues as they are 
encountered, that is not always possible. If you'd like to defer fixing 
deprecation notices, you can disable them in your **config/app.php**:

```php
'Error' => [
'errorLevel' => E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED,
]
```

The above error level will suppress deprecation warnings from CakePHP.

Carbon Replaced with Chronos


The Carbon library has been replaced with [cakephp/chronos] 
(https://github.com/cakephp/chronos). This new library is a fork of Carbon 
with no additional dependencies. It also offer a calendar date object, and 
immutable versions of both date and datetime objects.

New Date Object
---

The ``Date`` class allows you to cleanly map ``DATE`` columns into PHP 
objects.  Date instances will always fix their time to ``00:00:00 UTC``. By 
default the ORM creates instances of ``Date`` when mapping ``DATE`` columns 
now.

New Immutable Date and Time Objects
---

The ``FrozenTime``, and ``FrozenDate`` classes were added. These classes 
offer the same API as the ``Time`` object has. The frozen classes provide 
immutable variants of ``Time`` and ``Date``.  By using immutable objects, 
you can prevent accidental mutations. Instead of in-place modifications, 
modifier methods return *new* instances:

```php
use Cake\I18n\FrozenTime;

$time = new FrozenTime('2016-01-01 12:23:32');
$newTime = $time->modify('+1 day');
```

In the above code ``$time`` and ``$newTime`` are different objects. The 
``$time`` object retains its original value, while ``$newTime`` has the 
modified value. As of 3.2, the ORM can map date/datetime columns into 
immutable objects as well.

CorsBuilder Added
-

In order to make setting headers related to Cross Origin Requests (CORS) 
easier, a new ``CorsBuilder`` has been added. This class lets you define 
CORS related headers with a fluent interface.

RedirectRoute raises an exception on redirect
-

``Router::redirect()`` now raises 
``Cake\Network\Routing\RedirectException`` when a redirect condition is 
reached. This exception is caught by the routing filter and converted into 
a response. This replaces calls to ``response->send()`` and allows 
dispatcher filters to interact with redirect responses.

ORM Improvements


* Containing the same association multiple times now works as expected, and 
the query builder functions are now stacked.
* Function expressions now correctly cast their results. This means that 
expressions like ``$query->func()->current_date()`` will return datetime 
instances.
* Field data that fails validation can now be accessed in entities via the 
``invalid()`` method.
* Entity accessor method lookups are now cached and perform better.


Improved Validator API
--

The Validator object has a number of new methods that make building 
validators less verbose. For example adding validation rules to a username 
field can now look like:

```php
$validator->email('username')
->ascii('username')
->lengthBetween('username', [4, 8]);
```

Console Improvements


How to do CSRF protection in cakephp

2016-01-29 Thread ye lu
Hi,
 I am new to cakephp and now I am working on a new project with 
cakephp by studying. My current doing task is to do CSRF protection for 
overall project.I have read official cakephp 2 cookbook and I did as 
explained in that book. But, now I am facing 

The request has been black-holed
*Error: *The requested address *'/admin/accounts/add'* was not found on 
this server. 

every time the new user add form is submitted.
My code is :
//

public $components = array(
'Security' => array(
'csrfExpires' => '+1 hour'
),
'Search.Prg' => array(
'commonProcess' => array(
'paramType' => 'named',
'filterEmpty' => true
))

);

///

public function beforeFilter() {
parent::beforeFilter();
$this->layout = 'admin';
$this->Security->blackHoleCallback = '_blackHole';
}



public function _blackHole($error) {
die($error);
}

/

By doing so, 'auth' error has appeared.

How should I do?
Please help me.I have googled but it was just the waste of time.I have no 
way to do.
Please help me.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Cakephp find order by then group by

2016-01-29 Thread Shamshad Akther Khan
Thankz a lot sir, Your procedure has helped me solve a problem in live 
tracking issue

On Friday, October 19, 2012 at 2:41:18 PM UTC+6, Vanja Dizdarević wrote:
>
> Seemingly simple task, but not quite, eh...
>
> Solving this with a single query is possible, but you would have to do a 
> manual query (with Model::query), something like:
>
> SELECT Message.* FROM messages as Message
>   RIGHT JOIN (SELECT MAX(created) as last_created, user_id FROM messages 
> GROUP BY user_id)
>   as latest
>   ON Message.created = latest.last_created AND Message.user_id = 
> latest.user_id
>  GROUP BY Message.user_id
>  ORDER BY Message.created DESC;
>
> You cannot instruct MySQL how to decide which row to use when grouping 
> (yeah, i know...), so you would have to use MAX. The problem with this 
> query is that you get ambiguous results if you happen to have 2 messages 
> with same timestamp, user_id, receiver_id, so you would somehow need to 
> sort by created and Message.id too.
>
> Complex queries can become expensive quickly, so it's maybe better to find 
> last message separately for each user.
>
> $senders = $this->Message->find->('all', array(
> 'fields' => array(
> 'DISTINCT Message.user_id'
> )
> 'conditions'=>array(
> 'receiver_id' => $user_id
> )));
> $newMessages = array();
> foreach($senders as $sender) {
> $newMessages[] = $this->Messages->find('first', array(
> 'conditions' => array('user_id' => $sender['Message']['user_id'], 
> 'receiver_id' => $user_id), 
> 'order'=>array('created'=>'desc', 'id'=>'desc')
> ));
> }
>
> Another crazy idea is to create a *Message.last* boolean column and 
> update this field when you insert a new record:
>
> - run "UPDATE messages SET last = 0 WHERE user_id = $user_id AND 
> receiver_id=$receiver_id";
> - Create new message with Message.last = 1
>
> ... and then get last messages with find-all query with condition 
> Message.last = 1.
>
> I wished a thousand times that MySQL had a way of doing this properly in a 
> single query.
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


create an optgroup with cakephp 3.x

2016-01-29 Thread V Ian
i'm novice in cakephp, and i'm having dificulties in something like this:

starting with this sql query:

select service_group.name as service_group_name, service_group.id as 
service_group_id, campaign.name as campaign_name, campaign.id as campaign_id
  from group_service
  join group_service_campaign on group.service.id = 
group_service_campaign.group_service_id
  join campaign on group_service_campaign.campaign_id = campaign.id
  where campaign.active = 'Y'
  and campaign.id in ($in)
  and campaign.company_id = ${_SESSION['companyId']}
  order by group_service.name, campaign.name


In result, i have something like this:

service_group_name | service_group_id | campaign_name | campaign_id |
service_1 | 01 | travel to sicilia | 14 |
service_1 | 01 | travel to greece | 15 |
service_2 | 02 | play the xyz game | 22 |
service_2 | 02 | play the return of xyz game | 234 |


and so on

I converted it to this in my controller:

$var_campaign = $this->loadModel('Service_Group');
$var_campaign = $this->Group_Service->find('list', ['keyfield' => 
'campaign_id', 'valueField' => 'campaign_name', 'groupField' => 
'service_group_name'])
->join(['table' => 'service_group_campaign',
'type' => 'inner',
'conditions' => 'Service_Group.id = 
service_group_campaign.service_group_id'
])
->join(['table' => 'campaign',
'type' => 'inner',
'conditions' => 'service_group_campaign.campaign_id = campaign.id'
]);
$var_campaign->where(['campaign.active' => 'Y']);
$var_campaign->order(['grou_service.name,campaign.name']);

As can see, one thing i don't found an equivalent AS in querybuilder in 
cake, this is my first difficult. 


My other difficult is to how use this to create an select form element with 
optgroup. 

I've searched for examples and questions similar, but all i tried don't 
work.


My view:


echo $this->Form->create(); 
echo $this->Form->input('id', array('label' => 'Services :', 'type' => 
'select', 'empty'=> '-- Select --', 'options' => $var_campaign)); 
echo $this->Form->select("field", $var_campanha); 
echo $this->Form->end();

When i use find('list' ...) in query statement, i get a blank response, if 
i use find('all' ...) i get a not complete response, because all campaign 
names dont come in response, only the services group names with their id's.


My optgroup show a plain text like:


{"id": -1, "name": "Active Proposals","mod": "W","company_id": 10}


and so on.


Where i'm going wrong ?


thanks in advance.



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


  1   2   3   4   5   6   7   8   9   10   >