Developers in North East England?

2014-02-10 Thread phpMagpie
Hi,

Are you a PHP/CakePHP/Croogo developer in the North East of England looking 
for work?  If so, get in touch with me.

Paul.

-- 
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 http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Cake and Angular Question

2014-02-10 Thread MihaiTL
I think that instead of

partials/phone-list.html

you should use

*phone_list_controller* / *action_for_phone_list*

and you should create phone_list.ctp view 

Something similar should be done for 

partials/phone-detail.html




luni, 10 februarie 2014, 20:25:17 UTC+2, advantage+ a scris:
>
> Looking deeper into updating a site to use Angular.js but first thing I 
> noticed was looking at the demo here http://docs.angularjs.org/tutorial that 
> in the app.js it references using html partials (element in Cake 
> terms):
>
>  
>
> phonecatApp.config*([*'$routeProvider',
>
>   *function(*$routeProvider*) {*
>
> $routeProvider.
>
>   when*(*'/phones', *{*
>
> templateUrl: 'partials/phone-list.html',
>
> controller: 'PhoneListCtrl'
>
>   *})*.
>
>   when*(*'/phones/:phoneId', *{*
>
> templateUrl: 'partials/phone-detail.html',
>
> controller: 'PhoneDetailCtrl'
>
>   *})*.
>
>   otherwise*({*
>
> redirectTo: '/phones'
>
>   *})*;
>
>   *}])*;
>
>  
>
> Is there a way to use Cakes elements instead?
>
>   
>   
>   
>
>
>
> Seems like having an element to show each record then when added / 
> modified the exact same code in html format rather than .ctp is just wrong. 
>
>  
>

-- 
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 http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Cake and Angular Question

2014-02-10 Thread Advantage+
Looking deeper into updating a site to use Angular.js but first thing I
noticed was looking at the demo here  
http://docs.angularjs.org/tutorial  that in the app.js it references using
html partials (element in Cake terms):

 

phonecatApp.config(['$routeProvider',

  function($routeProvider) {

$routeProvider.

  when('/phones', {

templateUrl: 'partials/phone-list.html',

controller: 'PhoneListCtrl'

  }).

  when('/phones/:phoneId', {

templateUrl: 'partials/phone-detail.html',

controller: 'PhoneDetailCtrl'

  }).

  otherwise({

redirectTo: '/phones'

  });

  }]);

 

Is there a way to use Cakes elements instead?

 


Seems like having an element to show each record then when added / modified
the exact same code in html format rather than .ctp is just wrong. 

 

-- 
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 http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Validation problem

2014-02-10 Thread Slawomir Wawak
Thanks a lot. This
 

> $this->Student->set($this->request->data)
>

helped. Now most of the fields are being validated. Only two left:

'password' => array(
> 'rule'=> array('minLength', '6'),
> 'required'=>true,
> 'message' => 'Co najmniej 6 znaków'
> ), 
> 'moodle_password' => array(
> 'rule'=> array('equalTo', 'some_text'),
> 'required'=>true,
> 'message' => 'Błędne hasło Moodle'
> ),
>

Both don't validate. I don't know why. :-(

Regards,
Slawek.

-- 
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 http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Session Problems due to browserconfig.xml

2014-02-10 Thread AD7six


On Monday, 10 February 2014 15:03:43 UTC+1, Thyagarajan Delli wrote:
>
> Hi All,
>
> We noticed a strange behavior where users reported that their session is 
> timing out abruptly. On debugging the issue, we found the following 
> behavior.
>
> When the user keeps working on different sections of the application, the 
> same CAKEPHP session id is being send as a part of the header (we got it 
> through apache logs).
>
> But there is a 404 request to browserconfig.xml. We don't have this file 
> in our root. 
>

It's a windows-specific file which IE requests 
http://msdn.microsoft.com/en-us/library/ie/dn320426(v=vs.85).aspx

Best action is to simply create it (empty if appropriate) so that the 
session and any other app logic isn't affected. same for other common 404s 
such as favicon.ico, apple-touchpng and (only to prevent log noise) 
robots.txt.

Incidentally: Developing with IE - if that's what user is doing: brave =).

AD

-- 
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 http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Validation problem

2014-02-10 Thread AD7six


On Monday, 10 February 2014 15:53:45 UTC+1, Slawomir Wawak wrote:
>
> Hi!
> I try to create some validation to my form. I followed some forums and 
> blogs looking for solution, but nothing helps.
>
> My controller looks like this:
>
> public function add() {
>> if ($this->request->is('post')) {
>> $this->Student->create();
>> *if ($this->Student->validates()) {*
>> .
>>
>
The above is attempting to validate an empty Student object - Student 
doesn't have any form data in it. You are missing:

$this->Student->set($this->request->data)

or similar.
 

> When I enable "required => true" form fails each time, even when correct.
>

Because the form data isn't in/on the model - you're validating nothing.
 

> When I show debug($this->Student->data) all data is there.
>

Where are you doing that? 

AD

-- 
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 http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Localization extract comments

2014-02-10 Thread AD7six


On Monday, 10 February 2014 14:22:10 UTC+1, John Doe wrote:
>
> Hi,
>
> can I do something like that in CakePHP?
>
> /// TRANSLATORS: Please leave %s as it is, because it is needed by the 
> program./// Thank you for contributing to this project.printf(_("My name is 
> %s.\n"), my_name);
>
>
Not without writing your own parse function. That particular comment looks 
more appropriate to put in a CONTRIBUTING.md type file - unless you want to 
scatter it throughout your code base.

AD

-- 
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 http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How to integrate big blue button on cakePHP 2.0

2014-02-10 Thread AD7six


On Monday, 10 February 2014 13:17:02 UTC+1, Mohit Garg wrote:
>
> Hi,
>
> Please help me .
>
> I want to integrate big blue button on cakePHP 2.0.
>
> Thanks
>

Here you go:

   A button 

AD

-- 
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 http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Session Problems due to browserconfig.xml

2014-02-10 Thread Thyagarajan Delli
Hi All,

We noticed a strange behavior where users reported that their session is 
timing out abruptly. On debugging the issue, we found the following 
behavior.

When the user keeps working on different sections of the application, the 
same CAKEPHP session id is being send as a part of the header (we got it 
through apache logs).

But there is a 404 request to browserconfig.xml. We don't have this file in 
our root. 
When this call is made, a 404 response is given back, but the cakephp also 
gives back a new session id. The next request from this user comes with 
this new id and it finds this to be a session missing and logs the user out 
of the system.

What could be the reason for this??

*HTTP : Log *

"GET /browserconfig.xml HTTP/1.1" 404 158 

*User Agent:*

"-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; Trident/7.0; Touch; MDDCJS; 
rv:11.0) like Gecko" 

*HTTP Header:*

"_mkto_trk=id:895-WNT-152&token:_mch-greatplacetowork.com-1389204011408-64400; 
__utma=188050558.2113426640.1389215158.1391549861.1391919029.7; 
__utmz=188050558.1391919029.7.6.utmcsr=culturesurvey.greatplacetowork.com|utmccn=(referral)|utmcmd=referral|utmcct=/Pages/sessionTimeOutPage/;
 
__qca=P0-981991203-1389215159220; CAKEPHP=pko85qkvb33iqq08aeip1l9t07" 

*HTTP Response:*

"CAKEPHP=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/, CAKEPHP=
vfnpkrkpd0a8fllgskofs8bgs7; expires=Mon, 10-Feb-2014 03:36:59 GMT; path=/; 
HttpOnly"

Regards,
Thyagarajan D.

-- 
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 http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Validation problem

2014-02-10 Thread Slawomir Wawak
Hi!
I try to create some validation to my form. I followed some forums and 
blogs looking for solution, but nothing helps.

My controller looks like this:

public function add() {
> if ($this->request->is('post')) {
> $this->Student->create();
> *if ($this->Student->validates()) {*
> .
>

And my model validation:

public $validate = array(
>>  'firstname' => array(
>> 'alphaNumeric' => array(
>> 'rule' => 'alphaNumeric',
>> 'required'=>true,
>> 'message'  => 'Tylko litery w imieniu'
>> ),
>> 'minLength' => array(
>> 'rule'=> array('minLength', '3'),
>> 'required'=>true,
>> 'message' => 'Wpisz pełne imię'
>> )
>> ), ..
>
>
When I remove "required => true" form passes validation even with errors! 
When I enable "required => true" form fails each time, even when correct. 
The only field that works correct is email:

> 'email' => array('email', true),
>

When I show debug($this->Student->data) all data is there. However I 
suppose, that somehow validation may be somehow unable to see this. 

Please help me find solution to this problem.
Regards,
Slawek.

-- 
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 http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Localization extract comments

2014-02-10 Thread John Doe
Hi,

can I do something like that in CakePHP?

/// TRANSLATORS: Please leave %s as it is, because it is needed by the 
program./// Thank you for contributing to this project.printf(_("My name is 
%s.\n"), my_name);



Then extract, so I get my POT File like this:

 #. TRANSLATORS: Please leave %s as it is, because it is needed by the program.
 #. Thank you for contributing to this project.
 #: src/name.c:36
 msgid "My name is %s.\n"
 msgstr ""



Konsole: cake i18n extract --> I have no comments in my POT-File. I only 
get:

 #: src/name.c:36
 msgid "My name is %s.\n"
 msgstr ""

-- 
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 http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Internationalization Extract Comments

2014-02-10 Thread John Doe
Hi,

Can I make comments in my Code like:

*/// Comments for translatorecho __d('domain', 'Hello World');*

Then in console: *cake i18n extract*

So I get a POT-File like this:


*#. Comments for translatormsgid "Hello World"msgstr ""*



-- 
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 http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


How to integrate big blue button on cakePHP 2.0

2014-02-10 Thread Mohit Garg
Hi,

Please help me .

I want to integrate big blue button on cakePHP 2.0.

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 http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Tree recover() method and alternative parent_id field

2014-02-10 Thread euromark
See 
http://stackoverflow.com/questions/21652535/cakephp-tree-recover-method-returning-an-sql-error


Am Samstag, 8. Februar 2014 22:57:06 UTC+1 schrieb Andrew Cross:
>
> Hello,
>
> I'm trying to use the recover() method described here: 
> http://book.cakephp.org/2.0/en/core-libraries/behaviors/tree.html#TreeBehavior::recover,
>  
> unfortunately, whenever I run it I get the follow error: SQLSTATE[42000]: 
> Syntax error or access violation: 1064 You have an error in your SQL 
> syntax; check the manual that corresponds to your MySQL server version for 
> the right syntax to use near 'recover' at line 1
>
> Is this a bug or would it appear I'm doing something wrong?
>
> Furthermore, I do not have a field called parent_id in my table, it is 
> called idParent, is there anyway of forcing this field to be used?
>
> I can successfully run the find() function on my model without issue (i.e. 
> $this->Category->find('all');) but not $this->Category->recover();
>
> This is how I'm calling it, I've tried calling it directly from the 
> CategoryController as well but that errors exactly the same.
>
> public function beforeRender()
> {
> $this->loadModel('Category');
> $this->Category->recover();
> }
>

-- 
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 http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Using ORM Entity mutators to change value doesn't work

2014-02-10 Thread bato
Hi everyone,

I'm very excited wit new CakePHP 3 ORM! 
Now I'm playing with accessors and mutators but I have issues trying to 
change the value to save on db.

Here is my Entity

 true];

public function getName($name) {
return str_replace(',', ' ', $name);
}

public function setName($name) {
$name = str_replace(' ', ',', $name);
return $name;
}

public function getNameUpper() {
return strtoupper($this->_properties['name']);
}

}

Everything works except for Author::setName().  When I save from controller

public function saveAuthor() {
//debug($this->request->data());
$data = ['name' => 'John Smith'];
$authors = TableRegistry::get('Authors');
$author = $authors->newEntity($data);

if (!$authors->save($author)) {
die("error");
}
}

setName method is called and return the $name to save but in database the 
name doesn't reflect the changes done in setName.

setName returns 'John,Smith' but in db I have 'John Smith'.

Have I misunderstood how mutators work?

-- 
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 http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


How does HTTP Post URL for adding multiple records look like?

2014-02-10 Thread Sam
Dear CakePHP gurus,

I would like to add multiple records to a single model in a single HTTP 
post. For single record, the HTTP post will look something like 
"http://127.0.0.1/app/model/api_add/data[Model][Field1]";. How will the HTTP 
Post URL look like for adding multiple records? I will tried different sort 
of combination but failed.

Below is the add() in the Controller.
public function add() 
{ 
if ($this->request->is('post')) 
{
$this->Model->create();
$this->Model->saveAll($this->request->data);
}
}

-- 
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 http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.