Re: DebugKit 3.0 installation

2014-09-04 Thread Joe Theuerkauf
i junked everything inside */vendor*. Empty directory.

*composer install*

Everything installed cleanly.

DebugKit is in /plugins Here are the clone hashes composer listed:

  - Installing cakephp/plugin-installer (dev-master 2f1a842)
Cloning 2f1a84253e216edd4462724aaca822bdda36dfdf

  - Installing cakephp/cakephp (3.0.x-dev b35cc28)
Cloning b35cc28793a5e6a6f8f730fd03c4368d7aa0fdb5

  - Installing cakephp/debug_kit (3.0.x-dev 0dde466)
Cloning 0dde4663d9df811b2b8660c05a72c29b903386c3

So, any ideas? :)
-joe


On Thursday, 4 September 2014 19:31:43 UTC-4, Joe Theuerkauf wrote:
>
> i thought i did, but in the past, updates meant deleting */vendor/cakephp* 
> then running *composer update* to get the newest repo.
>
> So i attempted that again. With no /vendor/cakephp (and also deleted 
> */plugins/DebugKit*) i get this:
>
> C:\Sites\kodiak.com-cake3>composer update
> PHP Fatal error:  Class 'Cake\Composer\Installer\PluginInstaller' not 
> found in 
> phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Plugin/PluginManager.php
>  
> on line 235
>
> Fatal error: Class 'Cake\Composer\Installer\PluginInstaller' not found in 
> phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Plugin/PluginManager.php
>  
> on line 235
>
> Oookaaayyy, now it needs Cake in order to update Cake?
>
> So i restored */vendor/cakephp*. Now DebugKit installs, but to */plugins*.
> Also, it appeared to want to update the Cake library, but this happened:
>
>   - Updating cakephp/cakephp 3.0.x-dev (0368cbd => b00de78)
>
>   [RuntimeException]
>   The .git directory is missing from 
> C:\Sites\kodiakinvestmentsllc.com-cake3\vendor\cakephp\cakephp, see 
> http://getcomposer.org/commit-deps for more information
>
> update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] 
> [--lock] [--no-plugins] [--no-custom-installers] [--no-scripts] 
> [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] 
> [-o|--optimize-autoloader] [packages1] ... [packagesN]
>
> As of now i have */vendor/cakephp/cakephp* (with no *.git* directory), 
> and that's it. No /plugins/DebugKit & no 
> */vendor/cakephp/plugin-installer* (that originally installed with 
> DebugKit).
>
> When i try *composer update* now, i get the missing Class error from 
> above.
>
> i know it's something i did wrong, but after you're done smacking your 
> head on the desk, some help to repair this stuff would be greatly 
> appreciated. :-)
> -joe
>
>
> On Thursday, 4 September 2014 03:18:15 UTC-4, José Lorenzo wrote:
>>
>> Do you have the latest cakephp 3 code? Debugkit is installing fine for me
>>
>> On Thursday, September 4, 2014 7:13:31 AM UTC+2, Joe Theuerkauf wrote:
>>>
>>> Dumb question # 3,582,697:
>>>
>>> Why is composer installing DebugKit (3.0.*-dev) to /plugins rather than 
>>> /Plugin?
>>>
>>> When i follow the idiot-simple (and i should know!) instructions for the 
>>> DK3 branch, i end up with this:
>>>
>>> *Fatal error*:  Uncaught exception 
>>> 'Cake\Core\Exception\MissingPluginException' with message 'Plugin DebugKit 
>>> could not be found.' 
>>>   in 
>>> C:\Sites\kodiakinvestmentsllc.com-cake3\vendor\cakephp\cakephp\src\Core\Plugin.php:140Stack
>>>  trace:#0 
>>> C:\Sites\kodiakinvestmentsllc.com-cake3\App\Config\bootstrap.php(99): 
>>> Cake\Core\Plugin::load('DebugKit', Array)#1 
>>> C:\Sites\kodiakinvestmentsllc.com-cake3\webroot\index.php(27): 
>>> require('C:\\Sites\\kodiak...')#2 {main}  thrown in 
>>> C:\Sites\kodiakinvestmentsllc.com-cake3\vendor\cakephp\cakephp\src\Core\Plugin.php
>>>  on line 140
>>>
>>>
>>> To me that looks like Cake is trying to load plugins exclusively from 
>>> /Plugin.
>>>
>>> i know the 3.0 work is just getting underway now that Cake 3 beta is 
>>> out. i'm sure this is something simple i'm missing. i gotta stop trying to 
>>> be productive at 1am.
>>>
>>> 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/d/optout.


Re: DebugKit 3.0 installation

2014-09-04 Thread Joe Theuerkauf
i thought i did, but in the past, updates meant deleting */vendor/cakephp* 
then running *composer update* to get the newest repo.

So i attempted that again. With no /vendor/cakephp (and also deleted 
*/plugins/DebugKit*) i get this:

C:\Sites\kodiak.com-cake3>composer update
PHP Fatal error:  Class 'Cake\Composer\Installer\PluginInstaller' not found 
in 
phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Plugin/PluginManager.php
 
on line 235

Fatal error: Class 'Cake\Composer\Installer\PluginInstaller' not found in 
phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Plugin/PluginManager.php
 
on line 235

Oookaaayyy, now it needs Cake in order to update Cake?

So i restored */vendor/cakephp*. Now DebugKit installs, but to */plugins*.
Also, it appeared to want to update the Cake library, but this happened:

  - Updating cakephp/cakephp 3.0.x-dev (0368cbd => b00de78)

  [RuntimeException]
  The .git directory is missing from 
C:\Sites\kodiakinvestmentsllc.com-cake3\vendor\cakephp\cakephp, see 
http://getcomposer.org/commit-deps for more information

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] 
[--lock] [--no-plugins] [--no-custom-installers] [--no-scripts] 
[--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] 
[-o|--optimize-autoloader] [packages1] ... [packagesN]

As of now i have */vendor/cakephp/cakephp* (with no *.git* directory), and 
that's it. No /plugins/DebugKit & no */vendor/cakephp/plugin-installer* 
(that originally installed with DebugKit).

When i try *composer update* now, i get the missing Class error from above.

i know it's something i did wrong, but after you're done smacking your head 
on the desk, some help to repair this stuff would be greatly appreciated. 
:-)
-joe


On Thursday, 4 September 2014 03:18:15 UTC-4, José Lorenzo wrote:
>
> Do you have the latest cakephp 3 code? Debugkit is installing fine for me
>
> On Thursday, September 4, 2014 7:13:31 AM UTC+2, Joe Theuerkauf wrote:
>>
>> Dumb question # 3,582,697:
>>
>> Why is composer installing DebugKit (3.0.*-dev) to /plugins rather than 
>> /Plugin?
>>
>> When i follow the idiot-simple (and i should know!) instructions for the 
>> DK3 branch, i end up with this:
>>
>> *Fatal error*:  Uncaught exception 
>> 'Cake\Core\Exception\MissingPluginException' with message 'Plugin DebugKit 
>> could not be found.' 
>>   in 
>> C:\Sites\kodiakinvestmentsllc.com-cake3\vendor\cakephp\cakephp\src\Core\Plugin.php:140Stack
>>  trace:#0 
>> C:\Sites\kodiakinvestmentsllc.com-cake3\App\Config\bootstrap.php(99): 
>> Cake\Core\Plugin::load('DebugKit', Array)#1 
>> C:\Sites\kodiakinvestmentsllc.com-cake3\webroot\index.php(27): 
>> require('C:\\Sites\\kodiak...')#2 {main}  thrown in 
>> C:\Sites\kodiakinvestmentsllc.com-cake3\vendor\cakephp\cakephp\src\Core\Plugin.php
>>  on line 140
>>
>>
>> To me that looks like Cake is trying to load plugins exclusively from 
>> /Plugin.
>>
>> i know the 3.0 work is just getting underway now that Cake 3 beta is out. 
>> i'm sure this is something simple i'm missing. i gotta stop trying to be 
>> productive at 1am.
>>
>> 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/d/optout.


Re: Select Option

2014-09-04 Thread Abdelmajid el Ibrahimi
Opened a bug report #4490
Op 4 sep. 2014 16:09 schreef "José Lorenzo" :

> Could you create a github bug report about this problem in
> https://github.com/cakephp/cakephp/issues ?
>
> It seems like you found something broken.
>
> On Thursday, September 4, 2014 3:10:40 PM UTC+2, Abdelmajid el Ibrahimi
> wrote:
>>
>> Tried it but it doesn't work it says:
>> *Error: * Cannot use object of type Cake\ORM\Query as array
>>
>> I went to use cake php because it is said to be easier to use but i use
>> version 3.0 and all the examples out there are for 1.2 or 2.x.
>>
>> Op donderdag 4 september 2014 15:03:47 UTC+2 schreef scs:
>>>
>>>  You need to either create plural version of docenten in your $this->set
>>>  or in your view in the use
>>>  echo $this->Form->select('docenten', array( 'options'=>$docenten));
>>>
>>  --
> 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 a topic in the
> Google Groups "CakePHP" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/cake-php/egqBKdozff8/unsubscribe.
> To unsubscribe from this group and all its topics, 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/d/optout.
>

-- 
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/d/optout.


Re: Error menu.ctp

2014-09-04 Thread Mike Karthauser

stick a pr($pages) in your menu.ctp.


I bet you'll see the problem then..

you'll find you should have 

$v['Post']['link'];

$v['Post']['name'];

if in doubt, always PR();

On 4 Sep 2014, at 11:47, Deruel Roland  wrote:

> Hi
> 
> this part of my problem is resolv but i dont no  see now the link of the 
> navbar
> 
> but my resuest db is ok
> 
> my menu.ctp
> 
> 
>  $this->requestAction(array('controller'=>'pages','action'=>'menu')); ?>
> 
>   $v): $v =  current($v); ?>
>   Html->link($v['name'],$v['link']); ?>
>   
>   
> 
> 
> my PagesController.php
> 
> 
>  array('Post');  function menu(){
>$pages = $this->Post->find('all',array(
> 'conditions' => array('type'=>'page','online'=>1)
> ));   return $pages;
>   } function show($id = null,$slug = null){
> }
> 
> }
> 
> 
> my Post.php
> 
> 
>  $primary = false ){foreach($data as $k=>$d){  
> if(isset($d['Post']['slug']) && isset($d['Post']['id'])){ 
> $d['Post']['link'] = array(  'controller' => 'pages', 
>  'action' => 'show',  'id' => $d['Post']['id'],   
>'slug'   => $d['Post']['slug']  );
> }  $data[$k] = $d;}   return $data; }
> }
> 
> 
> my default.ctp
> 
> 
>   $this->element('menu'); ?>  
> 
> I normally have to see the result of my request my first page in the 
> navigation bar
> 
> 
> 
> 
> 
> Le mercredi 3 septembre 2014 13:24:58 UTC+2, Bprd Codin a écrit :
> Hello,
> 
> Problem with my menu.ctp
> 
> error message 
> 
> Parse error: syntax error, unexpected 'array' (T_ARRAY), expecting ')' in 
> /app/View/Elements/menu.ctp on line 1
> 
> 
> 
> my menu.ctp
> 
>  $this->requestAction(array('controller'=>'pages','action'=>'menu'array('return')));?>
> 
> and ma controller
> 
> 
>  array('Post');  function menu(){ $pages = $this-> 
> Post->find('all',array('conditions' => 
> array('type'=>'page','online'=>1) )); return $pages;
>}  function show($id = null,$slug = null){   }
> }
> 
> if you have a idéa thank you
> 
> -- 
> 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/d/optout.


Mike Karthäuser
Director, Brightstorm Ltd.

1, Brewery Court
North Street
Bristol
BS3 1JS

mi...@brightstorm.co.uk
www.brightstorm.co.uk
+44(0) 7939252144


-- 
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/d/optout.


Re: Select Option

2014-09-04 Thread José Lorenzo
Could you create a github bug report about this problem in 
https://github.com/cakephp/cakephp/issues ?

It seems like you found something broken.

On Thursday, September 4, 2014 3:10:40 PM UTC+2, Abdelmajid el Ibrahimi 
wrote:
>
> Tried it but it doesn't work it says:
> *Error: * Cannot use object of type Cake\ORM\Query as array 
>
> I went to use cake php because it is said to be easier to use but i use 
> version 3.0 and all the examples out there are for 1.2 or 2.x.
>
> Op donderdag 4 september 2014 15:03:47 UTC+2 schreef scs:
>>
>>  You need to either create plural version of docenten in your $this->set
>>  or in your view in the use 
>>  echo $this->Form->select('docenten', array( 'options'=>$docenten)); 
>>
>

-- 
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/d/optout.


Re: Error menu.ctp

2014-09-04 Thread Deruel Roland
Hi

this part of my problem is resolv but i dont no  see now the link of the 
navbar

but my resuest db is ok

my menu.ctp


requestAction(array('controller'=>'pages','action'=>'
menu')); ?>



  $v): $v =  current($v); ?>

  Html->link($v['name'],$v['link']); ?>

  

  


my PagesController.php


Post->find('all',array(

'conditions' => array('type'=>'page','online'=>1)

   ));

  return $pages;

  }

function show($id = null,$slug = null){

}

}

my Post.php


$d){

 if(isset($d['Post']['slug']) && isset($d['Post']['id'])){

$d['Post']['link'] = array(

 'controller' => 'pages',

 'action' => 'show',

 'id' => $d['Post']['id'],

 'slug'   => $d['Post']['slug']

 ); 

   }   

   $data[$k] = $d;

   }

  return $data;

}

}

my default.ctp


 

   element('menu'); ?>

 

I normally have to see the result of my request my first page in the 
navigation bar




Le mercredi 3 septembre 2014 13:24:58 UTC+2, Bprd Codin a écrit :
>
> Hello,
>
> Problem with my menu.ctp
>
> error message 
>
>1. 
>
>Parse error: syntax error, unexpected 'array' (T_ARRAY), expecting ')' 
>in /app/View/Elements/menu.ctp on line 1
>
>
>
> my menu.ctp
>
>
>1. requestAction(array 
>('controller'=>'pages','action'=>'menu'array 
>('return')));?>
>
>
> and ma controller
>
>
> 
> class PagesController extends AppController {
>
>  public $uses = array('Post');
>
>  function menu(){
>
> $pages = $this-> Post->find('all',array(
>
>'conditions' => array('type'=>'page','online'=>1)
>
> ));
>
> return $pages;
>}
>
>  function show($id = null,$slug = null){
>
>   }
>
> }
> if you have a idéa thank you
>

-- 
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/d/optout.


Re: Select Option

2014-09-04 Thread Stephen S
CakePHP 3.0 has only recently entered beta, if you're looking for something
stable you should take the latest 2.5 stable release


On 4 September 2014 14:10, Abdelmajid el Ibrahimi 
wrote:

> Tried it but it doesn't work it says:
> *Error: * Cannot use object of type Cake\ORM\Query as array
>
> I went to use cake php because it is said to be easier to use but i use
> version 3.0 and all the examples out there are for 1.2 or 2.x.
>
> Op donderdag 4 september 2014 15:03:47 UTC+2 schreef scs:
>
>>  You need to either create plural version of docenten in your $this->set
>>  or in your view in the use
>>  echo $this->Form->select('docenten', array( 'options'=>$docenten));
>>
>  --
> 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/d/optout.
>



-- 
Kind Regards
 Stephen Speakman

-- 
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/d/optout.


Re: Select Option

2014-09-04 Thread Abdelmajid el Ibrahimi
Tried it but it doesn't work it says:
*Error: * Cannot use object of type Cake\ORM\Query as array 

I went to use cake php because it is said to be easier to use but i use 
version 3.0 and all the examples out there are for 1.2 or 2.x.

Op donderdag 4 september 2014 15:03:47 UTC+2 schreef scs:
>
>  You need to either create plural version of docenten in your $this->set
>  or in your view in the use 
>  echo $this->Form->select('docenten', array( 'options'=>$docenten)); 
>

-- 
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/d/optout.


Re: Select Option

2014-09-04 Thread scs
 You need to either create plural version of docenten in your $this->set
 or in your view in the use 
 echo $this->Form->select('docenten', array( 'options'=>$docenten)); 

-- 
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/d/optout.


Re: Cake 3 Security Component black holes add with associations

2014-09-04 Thread heavyKevy
Ok, Thank you...


On Thursday, September 4, 2014 4:09:19 AM UTC+7, heavyKevy wrote:
>
>  I have promotions owned by a user
> and associated with other users.
>
> The Add screen gives a Select control for selecting the owner and a 
> multi-select for selecting the associated users.
>
> In PromotionsTable::
> public function initialize(array $config) {
> $this->table('promotions');
> $this->displayField('name');
> $this->primaryKey('id');
>
> $this->belongsTo('Users', [
> 'foreignKey' => 'user_id',
> ]);
> $this->belongsToMany('Users', [
> 'foreignKey' => 'promotion_id',
> 'targetForeignKey' => 'user_id',
> 'joinTable' => 'promotions_users',
> ]);
> }
>
> Data saves fine if the security component is not loaded...
> black holes the request otherwise...
> Is this a bug or is this by design?
>
>

-- 
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/d/optout.


Re: Cake 3 Security Component black holes add with associations

2014-09-04 Thread José Lorenzo
I will try to reproduce your use case this evening and see if you found a 
bug.

On Wednesday, September 3, 2014 11:40:00 PM UTC+2, heavyKevy wrote:
>
> No, following is the add.ctp:
>
> echo $this->Form->input('name');
> $Selected =0;
>  if($role != 'admin' && $role != 'prog-admin')
> {
> $Selected = $this->resortId;
>  }
> echo $this->Form->input('user_id', ['title'=>'Promotion 
> Resort/Program','options' => $resorts, 'selected'=>$Selected]);
>  echo $this->Form->input('start_date');
> echo $this->Form->input('end_date');
>  echo $this->Form->input('passes_allowed');
> echo 'Use Shift and/or Control to select as many dealers as needed.';
>  echo $this->Form->input('users._ids', ['title'=>'Associated 
> Dealers','options' => $dealers]);
>
>
> On Thu, Sep 4, 2014 at 4:20 AM, José Lorenzo  wrote:
>
>> Are you creating the second control with javascript?
>>
>>
>> On Wednesday, September 3, 2014 11:09:19 PM UTC+2, heavyKevy wrote:
>>>
>>>  I have promotions owned by a user
>>> and associated with other users.
>>>
>>> The Add screen gives a Select control for selecting the owner and a 
>>> multi-select for selecting the associated users.
>>>
>>> In PromotionsTable::
>>> public function initialize(array $config) {
>>> $this->table('promotions');
>>>  $this->displayField('name');
>>> $this->primaryKey('id');
>>>
>>> $this->belongsTo('Users', [
>>>  'foreignKey' => 'user_id',
>>> ]);
>>> $this->belongsToMany('Users', [
>>>  'foreignKey' => 'promotion_id',
>>> 'targetForeignKey' => 'user_id',
>>> 'joinTable' => 'promotions_users',
>>>  ]);
>>> }
>>>
>>> Data saves fine if the security component is not loaded...
>>> black holes the request otherwise...
>>> Is this a bug or is this by design?
>>>
>>>  -- 
>> 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 a topic in the 
>> Google Groups "CakePHP" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/cake-php/yVBlSRaGTGI/unsubscribe.
>> To unsubscribe from this group and all its topics, 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/d/optout.
>>
>
>

-- 
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/d/optout.


Re: Select Option

2014-09-04 Thread José Lorenzo
You need to pass the options to the select method if you don't follow 
conventions. Check the API so you kwno what parameter is used to pass the 
options array

On Thursday, September 4, 2014 12:40:03 AM UTC+2, Abdelmajid el Ibrahimi 
wrote:
>
> I have a controller where i use this statement:
> $this->set('docenten',$this->Docenten->find('list',array('fields' => 
> array('Docenten.voornaam';
>
> Then in my view i use:
> echo $this->Form->select('docenten');
>
> But it wont populate the list, What am I doing wrong?
>
> I want a selectbox with value=id and the name = voornaam.
>
>

-- 
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/d/optout.


Re: Handling Date Year Parts With Text/Number Form Fields?

2014-09-04 Thread José Lorenzo
Yeah, you will need to create your own method for the helper. Take as an 
example the year() method in the FormHelper

On Thursday, September 4, 2014 5:56:51 AM UTC+2, OJ Tibi - @ojtibi wrote:
>
> Hi Folks,
>
> I'm using text/number fields to let users input year values that aren't 
> restricted by  options, and I was just wondering, what's the best 
> way to handle year parts of a date type using text/number input fields? For 
> example, using `$this->Form->number('my_date.year')` in my add/insert view 
> works because CakePHP parses the year/month/date subkeys from 
> $this->request->data properly. On the other hand, this doesn't work in my 
> edit view because the text/number field doesn't split the date parts like 
> Form::input() and its related methods. Should I implement a workaround by 
> manually parsing the date before passing it to the input field, or is there 
> an internal CakePHP helper technique that can take care of year values in 
> text/number fields?
>
> TIA,
> OJ
>

-- 
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/d/optout.


Re: DebugKit 3.0 installation

2014-09-04 Thread José Lorenzo
Do you have the latest cakephp 3 code? Debugkit is installing fine for me

On Thursday, September 4, 2014 7:13:31 AM UTC+2, Joe Theuerkauf wrote:
>
> Dumb question # 3,582,697:
>
> Why is composer installing DebugKit (3.0.*-dev) to /plugins rather than 
> /Plugin?
>
> When i follow the idiot-simple (and i should know!) instructions for the 
> DK3 branch, i end up with this:
>
> *Fatal error*:  Uncaught exception 
> 'Cake\Core\Exception\MissingPluginException' with message 'Plugin DebugKit 
> could not be found.' 
>   in 
> C:\Sites\kodiakinvestmentsllc.com-cake3\vendor\cakephp\cakephp\src\Core\Plugin.php:140Stack
>  trace:#0 
> C:\Sites\kodiakinvestmentsllc.com-cake3\App\Config\bootstrap.php(99): 
> Cake\Core\Plugin::load('DebugKit', Array)#1 
> C:\Sites\kodiakinvestmentsllc.com-cake3\webroot\index.php(27): 
> require('C:\\Sites\\kodiak...')#2 {main}  thrown in 
> C:\Sites\kodiakinvestmentsllc.com-cake3\vendor\cakephp\cakephp\src\Core\Plugin.php
>  on line 140
>
>
> To me that looks like Cake is trying to load plugins exclusively from 
> /Plugin.
>
> i know the 3.0 work is just getting underway now that Cake 3 beta is out. 
> i'm sure this is something simple i'm missing. i gotta stop trying to be 
> productive at 1am.
>
> 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/d/optout.


trouble in association and paging

2014-09-04 Thread souparno majumder
  HI, i am associating 4 models.
1)Menu->category->subcategory->Products
its a one to many realtion as you go form left to right.

i am trying to post a menu id and get all the products related to that menu 
id in paginated form.
but i am stuck with error.
any help???
*i have mentioned the code below.

thnaks in advance..  


  $conditions=array();

if ($this->request->is('post')) {

$menu_id = $this->request->data["Filter"]["menu_id"];

$conditions=$this->Product->Subcategory->Category->Menu->find("all", 
array('conditions' => array('Menu.id' => $menu_id),'recursive' => 3));
var_dump($conditions);
}



$this->Product->recursive=3;
$this->paginate = array(
'limit' => 8,
'conditions' => $conditions,

);
$this->set('products', $this->paginate());

-- 
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/d/optout.