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 
> 
>  
> TABLE 
> 
>  
> `articles` ADD FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE 
> 
>  
> RESTRICT ON UPDATE 
> 
>  
> 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: How to set a variable and use everywhere?

2016-03-19 Thread Gaurav Kumar
1. If you need to use that variable in controllers then you can set it in 
the beforeFilter and if you need to access the variable in views then 
beforeRender both you have to do in AppController.

2. Please follow this http://book.cakephp.org/3.0/en/views.html

On Thursday, March 17, 2016 at 10:26:13 AM UTC+5:30, Attachai Saorangtoi 
wrote:
>
> *1. How to set a variable and use everywhere?*
>  
> *2.How to send a variable to Layout and Element?*
>
>
>

-- 
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: Srange behaviour with find('list')

2016-02-18 Thread Gaurav Kumar
Hello michael,

Check your displayField in the respective table file. If it is different 
from what you are trying to fetch then just add your field in the 
displayField just above the find query.

On Thursday, February 18, 2016 at 1:48:22 AM UTC+5:30, Michael Kornatzki 
wrote:
>
> Hi,
>
> i am using find('list') to get key/values and was very surprised that the 
> key-values are wrong!?
>
> if i use 
>   $corp = $SupplierCorps->find('list');
>   Log::debug($corp->toArray());
> i get
> [22] => 1003022
> [29] => 1003029
> ...
> where the key is the primaryKey defined in the Table-class and the value 
> is the displayField.
>
> This is ok but if  i use
>
> $corp = $SupplierCorps->find('list', ['keyField' => 'SupplCorp_No_auto']);
>
> i get this
> [1440065430] => 1003022
> [1440065437] => 1003029
>
> and this is wrong!
> The key should now the same as the value.
> And if i run the sql against the mysql-Database i get the right results
>
> Do i oversee something?
>
> I use cakePhp 3.1.5
>
> Thanks in advance,
> michael
>
>

-- 
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: NewBie

2015-08-07 Thread Gaurav Kumar
$this refers the class in which you are currently working.

On Thursday, June 4, 2015 at 2:11:31 AM UTC+5:30, Kingston Abraham wrote:

 what is the difference between $this-request and $request-

 do both convey same information


-- 
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: Cakephp Login form with different database tables

2015-08-07 Thread Gaurav Kumar
Your distributors login submit looking for a 'distributor_login' method and 
that is missing 'DistributorsController'.

On Friday, July 31, 2015 at 4:54:16 PM UTC+5:30, Asmat Quadeer wrote:

 I am trying to create a login form for different types of users like

 `Suppliers`, `Distributors`, `Managers`


 on the website like

 http://azzip.de/distributors/login

 And the Distributor's beforeFilter looks like

 
 public function beforeFilter() {
 
 parent::beforeFilter();
 
 AuthComponent::$sessionKey = 'Auth.Distributor';
 
 $this-Auth-authenticate = array(
 'Form' = array(
 'userModel' = 'Distributor',
 'fields' = array(
 'username' = 'email',
 'password' = 'password'
 ),
 'scope' = array(
 'Distributor.active' = 1,
 )
 )
 );
 
 $this-Auth-allow('login', 'forgotpass', 'register');
 }


 The passwords are hashed. But no chance to login. and unfortunately also 
 can't see the the 
 `login()`

 query to debug. 



-- 
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: Upgrade sage pay protocol v3 in cakephp 1.3

2015-06-23 Thread Gaurav Kumar
As per my knowledge you just need to change the version on request and the 
encryption method to AES-128-CBC-PKCS#5 and you are done. If every thing 
will be ok then you will get the response with some new additional data 
which are added in SagePay v3.0.

On Tuesday, June 23, 2015 at 2:21:56 PM UTC+5:30, Colin Rainsforth wrote:

 I need to update a site too - but from SagePay v2.2 to v3.0. 

 SagePay v2.2 seems to have had fewer madatory fields than v2.3. Can you 
 advise on this?

 Thanks in advance

 Colin

 On Friday, 19 June 2015 04:07:27 UTC+1, Gaurav Kumar wrote:

 I have used that in CakePHP 2.6, implemented sage pay for buy online. 
 There is nothing that you have to change just changes the version and in 
 the response you will get some additional data from sage pay so if you are 
 saving them then you can check it.

 On Thursday, June 18, 2015 at 11:13:39 PM UTC+5:30, Eb ook wrote:

 Dear all,

 I'm using cakephp version 1.3 with.

 My website used sage pay for buy online. 

 The sagepay sent email for me. They suggested to upgrade protocol from 
 v2.23 to v3. 

 Can you help me upgrade it.

 Thanks regards.



-- 
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: Upgrade sage pay protocol v3 in cakephp 1.3

2015-06-23 Thread Gaurav Kumar
Have you tried with the above solution? Because as per my knowledge you 
just need to change the version on request and the encryption method 
to AES-128-CBC-PKCS#5 and you are done. If every thing will be ok then you 
will get the response with some new additional date which are added in 
SagePay v3.0.

On Tuesday, June 23, 2015 at 2:21:56 PM UTC+5:30, Colin Rainsforth wrote:

 I need to update a site too - but from SagePay v2.2 to v3.0. 

 SagePay v2.2 seems to have had fewer madatory fields than v2.3. Can you 
 advise on this?

 Thanks in advance

 Colin

 On Friday, 19 June 2015 04:07:27 UTC+1, Gaurav Kumar wrote:

 I have used that in CakePHP 2.6, implemented sage pay for buy online. 
 There is nothing that you have to change just changes the version and in 
 the response you will get some additional data from sage pay so if you are 
 saving them then you can check it.

 On Thursday, June 18, 2015 at 11:13:39 PM UTC+5:30, Eb ook wrote:

 Dear all,

 I'm using cakephp version 1.3 with.

 My website used sage pay for buy online. 

 The sagepay sent email for me. They suggested to upgrade protocol from 
 v2.23 to v3. 

 Can you help me upgrade it.

 Thanks regards.



-- 
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: Date format

2015-06-22 Thread Gaurav Kumar
Try with this:
 echo $this-Form-input(
'birthdate',
array (
'label'= false,
'dateFormat' = 'DD-MM-',
'minYear' = date('Y') - 100, 
'maxYear' = date('Y') - 12
)
);

On Saturday, June 20, 2015 at 4:24:15 AM UTC+5:30, Paulo Terra wrote:

 Hi,

 I have been trying to change the date format from -MM-DD to DD-MM- 
 on a form at my site, but although I have changed the intl.default_locale 
 to pt_BR as it says on CakePHP 3.0 documentation is still the same format.

 This is the view (add.ctp):

 echo $this-Form-input(
 'birthdate',
 array (
 'label'= false, 
 'minYear' = date('Y') - 100, 
 'maxYear' = date('Y') - 12
 )
 );

 I also tryed this at birthdate input configuration but it does not worked:

 'format'= ('d/m/Y')


 Does anybody know what am I doing wrong?

 Thanks

 Paulo Terra



-- 
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: Upgrade sage pay protocol v3 in cakephp 1.3

2015-06-18 Thread Gaurav Kumar
I have used that in CakePHP 2.6, implemented sage pay for buy online. There 
is nothing that you have to change just changes the version and in the 
response you will get some additional data from sage pay so if you are 
saving them then you can check it.

On Thursday, June 18, 2015 at 11:13:39 PM UTC+5:30, Eb ook wrote:

 Dear all,

 I'm using cakephp version 1.3 with.

 My website used sage pay for buy online. 

 The sagepay sent email for me. They suggested to upgrade protocol from 
 v2.23 to v3. 

 Can you help me upgrade it.

 Thanks regards.


-- 
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: Create plugin and run it my browser

2015-06-18 Thread Gaurav Kumar
The plugin name in the url should be snake case 
http://localhost/cakephp/contact_manager/Contacts 
http://localhost/cakephp/ContactManager/Contacts

On Tuesday, June 16, 2015 at 3:12:56 AM UTC+5:30, Scyllar wrote:

 http://book.cakephp.org/2.0/en/plugins/how-to-create-plugins.html
 i don't know run index.ctp in my browser. Please help me!
 in bootstrap.php

 CakePlugin::load('ContactManager');

 in routes.php

 Router::connect('/', array('plugin' = 'ContactManager', 'controller' = 
 'Contacts', 'action' ='index'));

 http://i.imgur.com/tjPklMS.jpg

 ContactManagerAppController.php

 ?phpclass ContactManagerAppController extends AppController {}

 ContactsController.php

 ?phpclass ContactsController extends ContactManagerAppController {
 public $uses = array('ContactManager.Contact');

 public function index() {
 //...
 }}

 ContactManagerAppModel.php

 ?phpclass ContactManagerAppModel extends AppModel {}

 Contact.php

 class Contact extends ContactManagerAppModel {}

 How display index.ctp in my browser index.ctp

 ?php echo 'hello'; ?

 http://localhost/cakephp/ContactManager/Contacts -- wrong
 http://i.imgur.com/IrRFJKc.jpg 


-- 
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: Create plugin and run it my browser

2015-06-18 Thread Gaurav Kumar

Try to access this location http://localhost/cakephp/ 
http://localhost/cakephp/ContactManager/Contacts you will get your 
plugins index view. Because you have added route for plugin's index method 
on '/' that's why you can access your index method directly on the given 
location.

On Tuesday, June 16, 2015 at 3:12:56 AM UTC+5:30, Scyllar wrote:

 http://book.cakephp.org/2.0/en/plugins/how-to-create-plugins.html
 i don't know run index.ctp in my browser. Please help me!
 in bootstrap.php

 CakePlugin::load('ContactManager');

 in routes.php

 Router::connect('/', array('plugin' = 'ContactManager', 'controller' = 
 'Contacts', 'action' ='index'));

 http://i.imgur.com/tjPklMS.jpg

 ContactManagerAppController.php

 ?phpclass ContactManagerAppController extends AppController {}

 ContactsController.php

 ?phpclass ContactsController extends ContactManagerAppController {
 public $uses = array('ContactManager.Contact');

 public function index() {
 //...
 }}

 ContactManagerAppModel.php

 ?phpclass ContactManagerAppModel extends AppModel {}

 Contact.php

 class Contact extends ContactManagerAppModel {}

 How display index.ctp in my browser index.ctp

 ?php echo 'hello'; ?

 http://localhost/cakephp/ContactManager/Contacts -- wrong
 http://i.imgur.com/IrRFJKc.jpg 


-- 
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: Unusual Table name/ Convention Naming issue

2015-06-01 Thread Gaurav Kumar
Please look after your controller's class name. If you changed your 
controller's name to MyCallDatas1sController then you also have to change 
the class name in the controller same as the file name. I think that should 
work.

On Monday, June 1, 2015 at 3:09:13 AM UTC+5:30, Troy White wrote:

 Hello I am having a naming convention problem that I would normally just 
 rename the table. However, that is not an option. 

 Background info:Table name is myCallDatas1

 I am trying to create a controller for this table. I went to 
 http://inflector.cakephp.org/ and it returned myCallDatas1s. I have tried 
 to use this as a controller(MyCallDatas1sController) name and I get the 
 following error message: Error: Create the class 
 MyCallDatas1sController.php. This table can not be renamed(it is attached 
 to mission critical appliances) is there a work around to fix 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 http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Login/Registration

2015-06-01 Thread Gaurav Kumar
I think you have to read the CakePHP docs then you will definitely get all 
the answers.

On Monday, June 1, 2015 at 3:09:15 AM UTC+5:30, sakshi bhalla wrote:

 All,

 I am new to Cake PHP. I am developing a website and struggling to complete 
 the initial login/registration page.
 Not sure, how should i link between html/css pages with my controller and 
 where should i authenticate user with my database.
 Can anyone share the general structure for login/registration for web app 
 using cake php.


 Thanks
 Sakshi


-- 
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: Schema migration in CakePHP-3

2015-03-10 Thread Gaurav Kumar
Thank you.

On Monday, March 9, 2015 at 10:33:28 AM UTC+5:30, Dakota wrote:

 How do you delete the table? If you simply run DROP TABLE too; then the 
 migration won't run again since Phinx still believes that the migration has 
 run. To undo a migration you need to run bin/cake migrations rollback

-- 
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: Input field returning Array

2015-03-09 Thread Gaurav Kumar
I just got the solution on #cakphp channel that because of change in RC3 
that was happening. So, for saving the file type fields create form with 
different name from database field name and in beforeSave assigned that 
form field value(name or tmp_name) into the database field name.

On Monday, March 9, 2015 at 10:54:34 AM UTC+5:30, Gaurav Kumar wrote:

 I have created a form in CakePHP-3 and in that there is an input type file 
 field. In previously getting the proper values(name, type, tmp_name, error) 
 of that input field. But now just updated the cakePHP and after doing 
 patchEntity the input field returning just Array.


-- 
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.


Input field returning Array

2015-03-08 Thread Gaurav Kumar
I have created a form in CakePHP-3 and in that there is an input type file 
field. In previously getting the proper values(name, type, tmp_name, error) 
of that input field. But now just updated the cakePHP and after doing 
patchEntity the input field returning just Array.

-- 
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: Schema migration in CakePHP-3

2015-03-08 Thread Gaurav Kumar
On first run of the command ./bin/cake migrations migrate --plugin 
PluginName the die() works, but if the table has been deleted and again 
running the migrate command the die() is not working.

On Thursday, March 5, 2015 at 6:54:52 PM UTC+5:30, José Lorenzo wrote:

 Can you put a die() in your migration file to see if it is being read?

 On Thursday, March 5, 2015 at 11:47:30 AM UTC+1, Gaurav Kumar wrote:

 Hello Everyone, 

 I am trying to create a custom plugin for CakePHP-3.0 where I want to 
 include schema migrations [database sql queries] so that when plugin gets 
 installed eventually migrations for the same plugin will run and tables 
 required by the plugin will get created in users database. 

 I have created a Migration class under PluginName/config/Migrations/

 when I do bin/cake migrations migrate --plugin pluginName -- I am 
 getting success message but when I check my database no table is created. 

 please find enclosed here with gist of migration class and output of the 
 above command. 

 https://gist.github.com/aavrug/940634042245f9632d59

 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.


Schema migration in CakePHP-3

2015-03-05 Thread Gaurav Kumar
Hello Everyone, 

I am trying to create a custom plugin for CakePHP-3.0 where I want to 
include schema migrations [database sql queries] so that when plugin gets 
installed eventually migrations for the same plugin will run and tables 
required by the plugin will get created in users database. 

I have created a Migration class under PluginName/config/Migrations/

when I do bin/cake migrations migrate --plugin pluginName -- I am getting 
success message but when I check my database no table is created. 

please find enclosed here with gist of migration class and output of the 
above command. 

https://gist.github.com/aavrug/940634042245f9632d59

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: CakePHP-3 Plugins form validation messages and field values

2015-02-23 Thread Gaurav Kumar
Lorenzo,

I got the problem and the solution both. The problem was happening because 
of page reload. So now with the help of session i can fix that or I got 
modelless forms in cakephp which is also providing the solution. thanks for 
you help.

On Monday, February 23, 2015 at 1:57:41 PM UTC+5:30, José Lorenzo wrote:

 Can you show the code you are using? Use gist.github.com to show your 
 table class, controller and form code.

 On Thursday, February 19, 2015 at 7:19:22 AM UTC+1, Gaurav Kumar wrote:

 I have just created a CommentManager plugin. Created the comment form in 
 post's view.ctp file and able to add the comments. But when the values of 
 the comment form are wrong(email format is not proper or empty) then i am 
 not getting the validation message in front of the respected fields and the 
 values are not refilled.

 Also would like to know what would be the proper way to create a comment 
 form inside a view file of posts.



-- 
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.


CakePHP-3 Plugins form validation messages and field values

2015-02-19 Thread Gaurav Kumar
I have just created a CommentManager plugin. Created the comment form in 
post's view.ctp file and able to add the comments. But when the values of 
the comment form are wrong(email format is not proper or empty) then i am 
not getting the validation message in front of the respected fields and the 
values are not refilled.

Also would like to know what would be the proper way to create a comment 
form inside a view file of posts.

-- 
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: CakePHP 3 Plugin not working (controller file not found)

2015-02-19 Thread Gaurav Kumar
Hey HVan,

Change you autoload in composer.json with this

autoload: {
psr-4: {
App\\: src,
ContactManager\\: ./plugins/ContactManager/src,
ContactManager\\Test\\: ./plugins/ContactManager/tests
}
}, 

On Sunday, February 8, 2015 at 9:28:58 PM UTC+5:30, HVan wrote:

 I followed all the instrucitons, even tried baking a plugin. But each time 
 I reference the plugin (eg. http://localhost/contact_manager/contacts) it 
 says Controller not found. All the files have been created and placed in 
 the proper location. It will say file not found in 
 /plugins/ContactManager/src/Controller/ContactsController.php and I've 
 tripled checked, of course, that the file exists. I also created the Table 
 file - nada.

 It's loading the plugin properly because when I remove, say bootstrap.php 
 inside the plugin, it will say the bootstrap file is not found inside the 
 plugin.

 Any ideas?


-- 
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: Some talk about complex Applications with CakePHP

2013-11-10 Thread Gaurav Matta
Check this
http://itfeast.blogspot.in/2013/10/cakephp-query-and-cache-optimization.html?m=1
On 10-Nov-2013 8:21 PM, Ighor Martins ighor.mart...@gmail.com wrote:

 Hi there!.

 I'm a web developer from Portugal for like 8 years. I have been using
 CakePHP for about 1 year and a half right now, and I'm pretty used to it,
 with a good knowledge of the Framework.

 On the last month, the company I work for, decided to create a new company
 and engage on a new project.
 The idea is to create a platform based on the needs of the company. It's
 something like these sites: http://www.lynda.com/,
 https://www.coursera.org/ and etc, but a little bit more complex, since
 our final users isn't singular people, and some others functional
 requirements that has to be done.

 So, Long story short, since last month we are developing a really small
 sneak peek of the platform working (because we need something functional
 ASAP), and then on the next month we're going to re-factor it all to
 develop the final product. As you can imagine I'm using CakePHP on this
 initial preview, and I'm wondering if I couldn't use CakePHP for the final
 product too.

 We all know that a lot of people complain about CakePHP performance. But
 we know too that 80% of these complains is due to bad use of the Framework.
 Ok, Cake has a way of working that in some cases may have a really big
 performance impact, for example it trying to format all the data into
 relational arrays, which could be a problem in querys that return a really
 big bunch of data, but ...
 Sincerely performance isn't my biggest concern.
 My biggest problem is:
 This will be an application, with a custom software design. And CakePHP
 almost force us to follow it's strict design. At the same time, this
 platform won't require that enough for me to move to something like Zend.

 So, I have knowledge about Cake, but I don't really know the best
 practices to develop big applications with Cake. Only normal websites.
 Sometimes I even feel like cake almost force us grow our controllers code
 instead of models, and that's what's making me sad.
 To give you an example:
 I normally do things like this on controllers:
 $this-MyModel-find('all', array(
   'contain' = array(
  'SecondLevelThing' = array(
'ThirdLevelThing' = array(
   'conditions' = 'thirdLevelThingConditions'
),
'conditions' = 'secondLevelThingConditions'
  )
   )
 ));

 Then I need this same information on other places of application. So I
 just repeat the code, but as you can see, this is already a custom code, I
 can't be re-writing this everywhere.
 So I should do something like:
 $this-MyModel-id = x
 $this-MyModel-getCustomInfo();

 and this object method would return that information. But the problem is,
 when I do that, I see myself fighting against Cake default way of working
 in a lot of things, for example if I want to paginate that information, and
 other things.


 I know CakePHP 3 will be there in a while to solve some of these issues,
 and it will finally return objects instead of arrays :)
 but for now, how is the best design pattern to follow with CakePHP when
 developing big applications without fighting against the framewok?


 Thank you guys.

 --
 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.


-- 
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: Error 500 only in Controllers

2013-10-19 Thread Gaurav Matta
Try /index.php/controller/action
If it works ccheck yr .htaccess file
On 18-Oct-2013 3:17 PM, Damian Kulon dam...@180creative.pl wrote:

 Hi
 When I move my app to another serwer and open in  controller see error 500.
 Adress / works fine and another serwer works all links.

 I think that is version php because on this serwer is 5.2.6 but I need
 5.2.8. It is possible that lower version generate error 500?
 Maybe something else can generate this error. I can't access to logs.

 Thanks for help.
 Sorry for my English

 --
 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.


-- 
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: noobie- help with cake blog tutorial - Error PostsController could not be found

2013-10-06 Thread Gaurav Matta
You seem to miss php tags in your controller...How comfortable are you with
Php


On Fri, Oct 4, 2013 at 3:19 AM, Frank Thomson frankt2...@gmail.com wrote:

 I am running WAMP server on my windows 8 laptop.
 I have cake installed and the test screen shows up as OK.
 There is more detail on that on my personal blog 
 herehttp://frankstech.blogspot.com.au/2013/10/cakephp-installation.html

 I am trying to follow the blog tutorial from the cake web site
 here:
 http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/blog.html

 The problem I get is that when I try

 http://localhost/cake_2_0/posts/index
 I get and get a page full of errors (see below)
 Error: PostsController could not be found.
 Error: Create the class PostsController below in file:
 app\controller\PostsController.php


 I believe that I have followed the tutorial accurately.  Again I have
 documented it step by step on my blog.
 Here:
 http://frankstech.blogspot.com.au/2013/10/cakephp-blog-tutorial.html

 Any suggestions on what I can do to track this issue down.

 Thanks in advance.
 Frank

 --
 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.


-- 
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: App::build in CakePHP3

2013-10-06 Thread Gaurav Matta
As far as I can see on Cakephp website is latest version is 2.4.1 how do
you get to cakephp 3


On Fri, Oct 4, 2013 at 12:34 PM, h.kanji kanjih...@gmail.com wrote:

 Hi Everyone!

 Now, I'm examining the CakePHP3.
 There is not App::build method in CakePHP3.

 Of cource, I understand PSR-0.

 But, I need a way that can be extended without changing the existing
 functionality.
 In CakePHP2 I can use class of their own instead of the classes the
 framework provides.

 What can I do to do the same thing in CakePHP3?

 --
 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.




-- 
Thanks and Regards
Gaurav Matta

Blog: http://itfeast.blogspot.com

-- 
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: Bake doesn't work

2013-10-06 Thread Gaurav Matta
Can't Say about Mac execution file but you can also run cake.php in console
folder to bake...


On Thu, Oct 3, 2013 at 1:34 PM, taoist wturne...@gmail.com wrote:

 When I go to the app directory using the terminal and type *cake bake* ,
 nothing happens other than a 'command not found' error. I tried going to
 the
 Console directory. This did not work.

 I'm using MAMP on Snow Leopard .



 --
 View this message in context:
 http://cakephp.1045679.n5.nabble.com/Bake-doesn-t-work-tp5716768.html
 Sent from the CakePHP mailing list archive at Nabble.com.

 --
 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.




-- 
Thanks and Regards
Gaurav Matta

Blog: http://itfeast.blogspot.com

-- 
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: Duplicate records in database

2013-10-06 Thread Gaurav Matta
can you provide us with screen shot of your firm.Is your site live?


On Thu, Oct 3, 2013 at 11:31 AM, manju16832003 manju16832...@gmail.comwrote:

 Hi,
 I have application written in cakephp 1.3. I'm experiencing this wired
 situation where by some tables are populated with dummy data without user
 action. I mean to say, data is been automatically inserted to few tables
 like posts, reviews table through there hasn't been action to add the data.
 Every day I could see like more than 1k records being inserted with all
 empty values.

 Is anybody experiencing this wired issue?

 :-) would appreciate if your suggestions

 Thank you



 --
 View this message in context:
 http://cakephp.1045679.n5.nabble.com/Duplicate-records-in-database-tp5716767.html
 Sent from the CakePHP mailing list archive at Nabble.com.

 --
 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.




-- 
Thanks and Regards
Gaurav Matta

Blog: http://itfeast.blogspot.com

-- 
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: noobie problem with the cake blog tutorial

2013-10-06 Thread Gaurav Matta
Repeated Post : missing php tags in controller


On Thu, Oct 3, 2013 at 7:10 AM, Frank Thomson frankt2...@gmail.com wrote:

 Hi guys,

 Setup WAMP on my win8 laptop.
 Installed cake
 seemed to go OK.
 Notes on my blog 
 herehttp://frankstech.blogspot.com.au/2013/10/cakephp-installation.html

 Tried the blog tutorial as detailed in
 http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/blog.html

 Have listed step by step what I did on my blog 
 herehttp://frankstech.blogspot.com.au/2013/10/cakephp-blog-tutorial.html

 The jist is
 From
 http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/part-two.html
 At this point, you should be able to point your browser to
 http://www.example.com/posts/index. You should see your view, correctly
 formatted with the title and table listing of the posts.
 So I try
 http://localhost/cake_2_0/posts/index.and get a page full of
 errors (See picture below.)

 Missing Controller
 PostsController could not be found.
 Error: Create the class PostsController below in file
 app\Controller\PostsController.php
 and I have that already in place (See picture below)

 Suggestions and assistance welcome.






 https://lh4.googleusercontent.com/-9S23w7UqnJs/UkzK_8v4-6I/CjI/ujsb-P0dbCs/s1600/ScreenHunter_19+Oct.+03+11.39.jpghttps://lh3.googleusercontent.com/-8OFYyFloLC0/UkyyZ2ATCPI/Cio/pt7d5ABVg4A/s1600/ScreenHunter_17%2BOct.%2B03%2B09.52.jpg

 --
 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.




-- 
Thanks and Regards
Gaurav Matta

Blog: http://itfeast.blogspot.com

-- 
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: Cascading (Dependent) Drop Down list.

2013-09-27 Thread Gaurav Matta
Yes..it's a is helper
On 27-Sep-2013 10:51 AM, Raks kaur@gmail.com wrote:

 Where to use this?  In view file.

 On Thursday, September 26, 2013 9:38:48 PM UTC-7, gaurav wrote:

 If you see in example in given link the code changed for you will be
 ?php
  echo $this-Js-get('#**parentdropdownid')-event-('**
 change',$this-JS-request(**array(
  'controller'='**controllername',  //where request will be processed
  'action'='actionname'),
  array(
  'update'='#**idofchildcategory',
  'async'=true,
  'dataExpression'=true,
  'method'=Post,
  'data'=$(this).serialize()')**,
  false))
  ?

 You can look up for jQuery Ajax request help in case you are unable to
 understand any parameters..
 On 27-Sep-2013 5:49 AM, Raks kaur...@gmail.com wrote:

 But how to use it.
 M new to Cakephp.
 I have tried a lot looking at various different examples. Nothing works.

 On Wednesday, September 25, 2013 8:02:35 PM UTC-7, gaurav wrote:

 You will need.to.use js helper here I suppose you are using cake 2.0
 see this link
 http://itfeast.blogspot.in/**201**3/06/cakephp-20-create-**0bserve**
 -field.html?m=1http://itfeast.blogspot.in/2013/06/cakephp-20-create-0bserve-field.html?m=1
 On 26-Sep-2013 5:33 AM, Raks kaur...@gmail.com wrote:

 Hi,

 I have a sql table having columns id, parent_id and title. All items
 with with parent_id =0 are parents and should appear in a dropdown list.
 That I have done. Now I want another dropdown that on selection of parent,
 shows all the children of that parent. I am working on cakephp MVC
 framework.
 There's only one database table so having a controller , model for
 that and have to have both the drop down in same view.
 Like on selection of first value, second dropdown should show only the
 child elements of that parent to select.

 Any help.

 Thanks

 --
 Like Us on FaceBook 
 https://www.facebook.com/**CakeP**HPhttps://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+u...@**googlegroups.com**.
 To post to this group, send email to cake...@googlegroups.com.
 Visit this group at 
 http://groups.google.com/**group**/cake-phphttp://groups.google.com/group/cake-php
 .
 For more options, visit 
 https://groups.google.com/**grou**ps/opt_outhttps://groups.google.com/groups/opt_out
 .

  --
 Like Us on FaceBook 
 https://www.facebook.com/**CakePHPhttps://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+u...@**googlegroups.com.
 To post to this group, send email to cake...@googlegroups.com.
 Visit this group at 
 http://groups.google.com/**group/cake-phphttp://groups.google.com/group/cake-php
 .
 For more options, visit 
 https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
 .

  --
 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.


-- 
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.


Cakephp not able to save associated model

2013-09-26 Thread Gaurav Kumar
(X-posting from 
SOhttp://stackoverflow.com/questions/19017839/cakephp-not-able-to-save-associated-model
)

I've a model `CloudApp` which has HABTM relationship with `Policy` model 
e.g:

class CloudApp extends AppModel {
public $displayField = 'name';
public $hasAndBelongsToMany = array(
'Policy' = array(
'className' = 'Policy',
'joinTable' = 'cloudapp_policies',
'foreignKey' = 'cloud_app_id',
'associationForeignKey' = 'policy_id',
'unique' = 'keepExisting',
)
);

}

`Policy` model looks like this- 

class Policy extends AppModel {
public $belongsTo = 'CloudApp'; 
}




When I use scaffolding, everything works fine- I am able to multi-select 
policies for CloudApp that I am saving. 


But when I try to manually save data, associated data in Policy model is 
not getting saved.


Here is my `add` controller- 

public function add() {
$this-loadModel('Policy');
$this-set('policies', $this-Policy-find('list', array(
'fields' = array('Policy.name')
)));

if ($this-request-is('post')) {
pr($this-request-data);
$this-CloudApp-saveAll($this-request-data);}
}

add.ctp looks like this-


echo $this-Form-create('CloudApp');
?
fieldset
legend?php echo __('Add Application'); ?/legend
?php
echo $this-Form-input('name');
echo $this-Form-input('policies', array(
'multiple' = true
));

?
/fieldset
?php echo $this-Form-end(__('Submit')); ?

Output of  `pr($this-request-data);` is- 

Array
(
[CloudApp] = Array
(
[name] = 123
[policies] = Array
(
[0] = 18
[1] = 19
[2] = 20
)

)

)


What am I doing 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: Cascading (Dependent) Drop Down list.

2013-09-26 Thread Gaurav Matta
If you see in example in given link the code changed for you will be
?php
 echo
$this-Js-get('#parentdropdownid')-event-('change',$this-JS-request(array(

 'controller'='controllername',  //where request will be processed
 'action'='actionname'),
 array(
 'update'='#idofchildcategory',
 'async'=true,
 'dataExpression'=true,
 'method'=Post,
 'data'=$(this).serialize()'),
 false))
 ?

You can look up for jQuery Ajax request help in case you are unable to
understand any parameters..
On 27-Sep-2013 5:49 AM, Raks kaur@gmail.com wrote:

 But how to use it.
 M new to Cakephp.
 I have tried a lot looking at various different examples. Nothing works.

 On Wednesday, September 25, 2013 8:02:35 PM UTC-7, gaurav wrote:

 You will need.to.use js helper here I suppose you are using cake 2.0 see
 this link
 http://itfeast.blogspot.in/**2013/06/cakephp-20-create-**
 0bserve-field.html?m=1http://itfeast.blogspot.in/2013/06/cakephp-20-create-0bserve-field.html?m=1
 On 26-Sep-2013 5:33 AM, Raks kaur...@gmail.com wrote:

 Hi,

 I have a sql table having columns id, parent_id and title. All items
 with with parent_id =0 are parents and should appear in a dropdown list.
 That I have done. Now I want another dropdown that on selection of parent,
 shows all the children of that parent. I am working on cakephp MVC
 framework.
 There's only one database table so having a controller , model for that
 and have to have both the drop down in same view.
 Like on selection of first value, second dropdown should show only the
 child elements of that parent to select.

 Any help.

 Thanks

 --
 Like Us on FaceBook 
 https://www.facebook.com/**CakePHPhttps://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+u...@**googlegroups.com.
 To post to this group, send email to cake...@googlegroups.com.
 Visit this group at 
 http://groups.google.com/**group/cake-phphttp://groups.google.com/group/cake-php
 .
 For more options, visit 
 https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
 .

  --
 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.


-- 
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: Cascading (Dependent) Drop Down list.

2013-09-25 Thread Gaurav Matta
You will need.to.use js helper here I suppose you are using cake 2.0 see
this link
http://itfeast.blogspot.in/2013/06/cakephp-20-create-0bserve-field.html?m=1
On 26-Sep-2013 5:33 AM, Raks kaur@gmail.com wrote:

 Hi,

 I have a sql table having columns id, parent_id and title. All items with
 with parent_id =0 are parents and should appear in a dropdown list. That I
 have done. Now I want another dropdown that on selection of parent, shows
 all the children of that parent. I am working on cakephp MVC framework.
 There's only one database table so having a controller , model for that
 and have to have both the drop down in same view.
 Like on selection of first value, second dropdown should show only the
 child elements of that parent to select.

 Any help.

 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.


-- 
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: Ajax request

2013-09-25 Thread Gaurav Matta
You will need to rewrite the autocomplete code on page you are requesting
on the fly for search.
If I am correct your search is also Ajax based...
On 25-Sep-2013 6:47 PM, webgaert...@gmail.com wrote:

 Hello,
 I have a problem with a search field on my site and I hope you can help
 me. I got a table called Clients with some information like firstname,
 lastname, adress etc. and all MVC files. For testing I use the Client index
 function. In my view file I have a input field where I want to search for
 clients. when I type at least 4 letter the search function should
 automaticaly display the client names in a div container under the search
 field (like the google instant search). Basically it is working, but after
 first search I got a second input in my clients div and after some searches
 it will break. I think my solution is also not the right way to do this.
 Here is my code:

 *Controller:*
 public function index($searchterm=NULL) {

 if ( $this-RequestHandler-isAjax() ) {

 $clients=$this-Client-find('list', array(
 'conditions'=array('LOWER(Client.lname) LIKE
 \''.$searchterm.'%\''),
 'limit'=500
 ));

 $this-set('clients', $clients);
 }

 }
 *
 View:*
 script type=text/javascript

 $(function() {
 $( #element, this ).keyup(function( event ) {
 if( $(this).val().length = 4 ) {
 $.ajax({
 url: '/clients/index/' + escape( $(this).val() ),
 cache: false,
 type: 'GET',
 dataType: 'HTML',
 success: function (clients) {
 $('#clients').html(clients);
 }
 });
 }
 });
 });
 /script

 ?php echo $this-Form-input('element', array('id'='element'));?

 div id=clients
 ?php
 foreach ($clients as $client) {
 echo 'br';
 echo $client;
 }
 ?
 /div

 I hope you can help me to improve this a little...

  --
 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.


-- 
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: Ajax request

2013-09-25 Thread Gaurav Matta
For better solution do not refresh the button but only the search result.
On 25-Sep-2013 6:47 PM, webgaert...@gmail.com wrote:

 Hello,
 I have a problem with a search field on my site and I hope you can help
 me. I got a table called Clients with some information like firstname,
 lastname, adress etc. and all MVC files. For testing I use the Client index
 function. In my view file I have a input field where I want to search for
 clients. when I type at least 4 letter the search function should
 automaticaly display the client names in a div container under the search
 field (like the google instant search). Basically it is working, but after
 first search I got a second input in my clients div and after some searches
 it will break. I think my solution is also not the right way to do this.
 Here is my code:

 *Controller:*
 public function index($searchterm=NULL) {

 if ( $this-RequestHandler-isAjax() ) {

 $clients=$this-Client-find('list', array(
 'conditions'=array('LOWER(Client.lname) LIKE
 \''.$searchterm.'%\''),
 'limit'=500
 ));

 $this-set('clients', $clients);
 }

 }
 *
 View:*
 script type=text/javascript

 $(function() {
 $( #element, this ).keyup(function( event ) {
 if( $(this).val().length = 4 ) {
 $.ajax({
 url: '/clients/index/' + escape( $(this).val() ),
 cache: false,
 type: 'GET',
 dataType: 'HTML',
 success: function (clients) {
 $('#clients').html(clients);
 }
 });
 }
 });
 });
 /script

 ?php echo $this-Form-input('element', array('id'='element'));?

 div id=clients
 ?php
 foreach ($clients as $client) {
 echo 'br';
 echo $client;
 }
 ?
 /div

 I hope you can help me to improve this a little...

  --
 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.


-- 
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: Sending videos via CakeResponse::file()

2013-09-25 Thread Gaurav Matta
It's better to convert video to flv format before buffering which is
universally acceptable.you can use php ffmpeg module to perform the same to
convert.check here
http://itfeast.blogspot.in/2013/08/best-flv-conversion-parameters-from.html?m=1
On 24-Sep-2013 10:49 PM, Tobias Welz tobias.w...@twx-media.de wrote:

 Dear group,

 I have an issue with sending videos via CakeResponse::file(). I tried
 several HTML5-players (flowplayer, mediaelementsjs, projekktor), different
 headers (setting file-type, setting file-size, disabling cache,...) but the
 problem is always the same. I have multiple players in one page, preloading
 is disabled.

 Here my problems:

 - In chrome and in Firefox the video fails to start
 - If the video is running, the length is not recognized by the player
 - I cannot move to a specific position of the video using the players
 timeline

 If I use a direct link to the video in the filesystem, everything works
 fine.

 Has anybody an idea?


 Thanks,
 Tobi.

 --
 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.


-- 
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 retrieve indivisal field

2013-09-19 Thread Gaurav Matta
$this-model-Id=ID;
$this-model-field('fieldname');
On 19-Sep-2013 1:00 PM, Sudhir Pandey promatics.sud...@gmail.com wrote:

 Hello,
  I am new user of cake php , plz tell

 --
 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.


-- 
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 Add external Javascript and CSS for CakePhp

2013-08-18 Thread Gaurav Matta
Though they are added in template or view depends on need for example a
framework like jQuery can be added to template and it's widgets to
respective views..

I would recommend you to go through.a simple blog tutorial which is the
first.example in.cookbook before you move ahead..
On 19-Aug-2013 1:04 AM, Malintha Adikari malin...@wso2.com wrote:


I am new to CakePhp. I want to get the help of the external javascript
 and css files. I have downloaded those files. And included those files in
 *webroot* directory (js and css sub directories). So If I want to use
 those in a view.ctp how can I call them. Can you explain me simply ?

 --
 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.


-- 
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: Mile Johnson Uploader Question

2013-07-20 Thread Gaurav Matta
Once scaling is done use unlink to delete original file
On 18-Jul-2013 11:47 PM, Advantage+ movepix...@gmail.com wrote:

 I have the plugin working and it's very great.

 ** **

 Only question I have is currently I am trying to upload an image and scale
 that image to a fixed width, and create a thumb. 

 That’s all good. 

 But the original image also gets uploaded and untouched. 

 So I only need the 2 images created from the uploaded, but end up with 3.
 

 ** **

 Scale the uploaded image to a fixed with and create a thumb from that.

 ** **

 Code snip below creates the scaled 750px width, the 100x75 thumb and the
 untouched image.

 ** **

 Just not sure how to modify the uploaded image when looking at the
 documentation. Or delete it after upload since I do not need the original
 uploaded file.
 http://milesj.me/code/cakephp/uploader

 ** **

 public $actsAs = array( 

 'Uploader.Attachment' = array(

 'image' = array(

 'name' = 'formatFilename',  

 'uploadDir'  =
 'img/uploads/',  

 //'dbColumn'   = 'image',  

 'maxNameLength'  =
 30,  

 'overwrite'  =
 true,   

 'stopSave'=
 true,   

 'allowEmpty' =
 false,

 'transforms'= array(

 'scale' =array(

 'method' =
 'resize', 

 'width' =
 750,  

 //'height' =
 75, 

 'aspect' =
 true, 

 'mode' =
 'width', 

 'self' = true,
 

 'dbColumn' =
 'image'),

 'thumb' =array(

 'method' =
 'crop', 

 'width' =
 100,  

 'height' =
 75, 

 'aspect' =
 true, 

 'mode' =
 'width', 

 'self' = true,
 

 'dbColumn' =
 'thumb')

 )   

 )   

 )

 );

 ** **

 Any help would be great.

 Thanks,

 ** **

 Dave

 ** **

 --
 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.




-- 
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: CakePHP - Empty $this-request-data array after Ajax POST

2013-07-02 Thread Gaurav Matta
http://itfeast.blogspot.in/2013/06/cakephp-send-multiple-elements-in-ajax.html?m=1

Follow above link might help you or see jshelper for this version of cake
On 02-Jul-2013 7:56 PM, Juraj Vlk jua...@gmail.com wrote:

 I'm trying to save data which comes from Ajax POST request in JSON but
 There is empty $this-request-data in controller.

 My Ajax call:

 $.ajax({
 type: POST,
 url: 'localhost/pages/register',
 dataType: 'json',
 data: pass_data,

 });

 I use Cakephp 2.3. and JQuery 1.7 Do you have any ideas?

 --
 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.




-- 
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.




installing vamcart in existing cake php

2013-06-27 Thread gaurav thakur
Hello 

I was working on a site of Cake php which was successfully delivered.But 
recently Client again  asked me to put the online shop module  in it.I 
installed vamcart eCommerce plugin in webroot folder of main site .Now 
issue arising with session and log in ,admin had to log in again in vamcart 
admin section whenever he wants to do something in (add,delete,Viewing 
orders) vamcart and session created in main site get expired.I want 
that user will be redirected to the vamcart  with the session still 
there(created during log in in main site). Please help me in the right 
direction,that how to share the authentication , and the second one how to 
customize the .htaccess file so that URL's look good.

Thanks and regards

-- 
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: Issues upgrading component from 1.x to 2.x

2013-06-22 Thread Gaurav Matta
Check component class it should extend. Component and not object
On 22-Jun-2013 10:03 PM, Michael Gaiser mjgai...@gmail.com wrote:

 So I found this compoenent that I want to use as a base for some ideas I
 want to try, but unfortuanatly it seems to be setup for cake 1.2. I am
 getting errors while trying to overload funtions which really isnt my
 strong suit. Has anyone been able to get this to work in cake 2.x?



 http://bakery.cakephp.org/articles/macduy/2010/01/05/acl-caching-using-session

 Thanks.

 ~Michael

 --
 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.




-- 
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: Call function in form before save

2013-06-21 Thread Gaurav Matta
From what i can suggest from short desc..
Declare function In table model and call in beforesave() in model
On 20-Jun-2013 9:39 PM, Renato Bigliazzi rebiglia...@gmail.com wrote:

 I have a form with some field. However there is a field that needs to be
 used as argument to a function to return a result before being saved in the
 database. Following issues:

 1) Where to declare the function that returned the result to be saved in
 the database?
 2) How to call this function?

 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.




-- 
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: Error: Mysql requires a database connection

2013-06-18 Thread Gaurav Matta
Faced same error while migration of project from 1.2 to 2.x. Try clearing
cache

/App/temp/cache
You will find some folders...like model,view etc..dont delete those but
delete all files in them..
On 18-Jun-2013 6:54 PM, Raxit rajpandya1...@gmail.com wrote:

 *Hi,
 *

 *I am facing this problem from past 5 days. Didn't find any solution. I
 have checked connection many times. my team have also checked all the
 connections with Mysql. File is also present under same path.
 *

 *Error: * Confirm you have created the file : app\Config\database.php.

 *Notice: * If you want to customize this error message, create
 app\View\Errors\missing_connection.ctp.
 Stack Trace

- ROOT\lib\Cake\Model\ConnectionManager.php line 
 101http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#→

 DboSource-__construct(array)http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#
- ROOT\lib\Cake\Model\Model.php line 
 3417http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#→

 ConnectionManager::getDataSource(string)http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#
- ROOT\lib\Cake\Model\Model.php line 
 1083http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#→

 Model-setDataSource(string)http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#
- ROOT\lib\Cake\Model\Model.php line 
 3443http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#→

 Model-setSource(string)http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#
- ROOT\lib\Cake\Model\Model.php line 
 2698http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#→

 Model-getDataSource()http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#
- APP\Model\Setting.php line 
 16http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#→

 Model-find(string)http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#
- APP\Controller\FunfordayController.php line 
 268http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#→

 Setting-updateCache()http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#
- APP\Controller\FunfordayController.php line 
 47http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#→

 FunfordayController-_loadSettings()http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#
- [internal 
 function]http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#→

 FunfordayController-beforeFilter(CakeEvent)http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#
- ROOT\lib\Cake\Event\CakeEventManager.php line 
 246http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#→
  call_user_func(array,

 CakeEvent)http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#
- ROOT\lib\Cake\Controller\Controller.php line 
 670http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#→

 CakeEventManager-dispatch(CakeEvent)http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#
- ROOT\lib\Cake\Routing\Dispatcher.php line 
 100http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#→

 Controller-startupProcess()http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#
- ROOT\lib\Cake\Routing\Dispatcher.php line 
 85http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#→
  Dispatcher-_invoke(FunfordayController,
CakeRequest, 
 CakeResponse)http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#
- APP\webroot\index.php line 
 94http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#→
  Dispatcher-dispatch(CakeRequest,

 CakeResponse)http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#

  --
 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.




-- 
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 

Re: How to edit a view in Cake php

2013-06-17 Thread Gaurav Matta
If you only want name of customers then you can add public $uses=
array('product','customer'); as a datamember in your controller class

And you can use $this-customer-find('all') in ur action

Let me know if this helps
On 17-Jun-2013 11:08 PM, Raks kaur@gmail.com wrote:

 Have added a new Column... but m not able to get a column data from other
 model. I want name from customers table in products view.ctp.

 here's the view code:
 *?php
 $records = array();
 foreach ($products as $product){

 $status = ($product['Product']['is_active'] == '1') ? 'Enabled' :
 'Disabled';

 $records[] = array(
 'Product.model' = array('title' =
 $product['Product']['model'], 'id' = $product['Product']['id']),
 'Product.part_num' =
 $product['Product']['part_num'],
 'ProductFamily.name' =
 $product['ProductFamily']['name'],
// shows customer id.. but want customer name
 from customers table according to customer id.
   //'Customer.name'=$product['ProductFamily']['customer_id'],
 'Product.iron_oem' =
 ($product['Product']['iron_oem']) ?  'Iron Systems':'Third Party',
 'ProductType.title' =
 $product['ProductType']['title'],
 'Product.is_active' = $status,
 );
 }

 $data = json_encode($records);
 $ret = {data: . $data .,\n;
 $ret .= pageInfo:{totalRowNum: . $total . },\n;
 $ret .= recordType : 'array'};
 echo $ret;
 ?*
 On Friday, June 7, 2013 11:40:19 AM UTC-7, Raks wrote:

 Hi,

 I Have a piece of code having view, model and controller . I nee dto make
 changes to view only not in the database.
 So how can i do that. Do I need to edit model and controller as well.
 I am new to Cakephp and MVC framework too.

 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.




-- 
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: TreeView

2013-06-12 Thread Gaurav Matta
You can use self join in this case
Table struct can be
Id
Catname
Parent_cat
Created
Modified
On 12-Jun-2013 4:28 PM, raj kumar Pustela pustela...@gmail.com wrote:

 Hi to all,

 i am struggle one thing, how to create treeview in cakephp
 and jquery to store the data in databse.
 Please found above attach file.
i want to show tree view struture that type.
If any one known about that 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 http://groups.google.com/group/cake-php?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Cannot access empty property in View.php on line 854

2013-06-12 Thread Gaurav Matta
Try if(!(empty()))
On 13-Jun-2013 8:49 AM, alfredo davila davilaassadalfr...@gmail.com
wrote:

 ok, this is my View call add.ctp

 h2Create an Account/h2
 ?php
 echo $this-$form-create('User', array('action' = 'add'));
   echo $this-$form-input('username');
   echo $this-$form-input('password', array('type' = 'password'));
   echo $this-$form-input('password_confirm', array('type' =
 'password'));
   echo $this-$form-submit();
   echo $this-$form-end();
 ?

 my Model
 ?php
 class User extends AppModel{
  var $name = 'User';
 }
 ?

  and my Controller

 ?php
 class UsersController extends AppController{

 var $name = 'Users';
 # needed for 'register'
 var $helpers = array('Html', 'Form');

 public function index(){
 }
  function add() {
 if (!empty($this-data)) {
 if ($this-data['User']['password'] ==
 $this-Auth-password($this-data['User']['password_confirm'])){
 $this-User-create();
 if($this-User-save($this-data)){
   $this-Auth-login($this-data);
   $this-redirect(array('action' = 'index'));
 }
 }
 }
 }
 }
 ?

 El lunes, 10 de junio de 2013 18:20:21 UTC-5, alfredo davila escribió:

 I can´t stop dealing with this problem in my cakephp :S I think it´s
 problem of the Model or the View.
 Can anyone help me? :S

  --
 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?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Doubt regarding routing.

2013-06-10 Thread Gaurav Matta
Try
Router::connect('/image/:action',array('controller'='photo'))
On 10-Jun-2013 6:17 PM, Nikunj Amipara nikamipar...@gmail.com wrote:

 hi all,

  i have doubt regarding routing...
  i want to replace

  url :  /photo/* with /image/*   everywhere  basically i want name of
controller to be replaced.. in addition /photo url should no longer work.
or it should be renamed and redirected to /image/*

 is it possible... 
 if yes please give some guidance as i don't know much about routing.

 thanks.
 Nikunj

 --
 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?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.



-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Doubt regarding routing.

2013-06-10 Thread Gaurav Matta
In routes.php
On 10-Jun-2013 6:17 PM, Nikunj Amipara nikamipar...@gmail.com wrote:

 hi all,

  i have doubt regarding routing...
  i want to replace

  url :  /photo/* with /image/*   everywhere  basically i want name of
controller to be replaced.. in addition /photo url should no longer work.
or it should be renamed and redirected to /image/*

 is it possible... 
 if yes please give some guidance as i don't know much about routing.

 thanks.
 Nikunj

 --
 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?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.



-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Doubt regarding routing.

2013-06-10 Thread Gaurav Matta
Can you provide a sample of urls which are not converting...
i did that already it seems to work too but only at some places...i want
photo/:action to be blocked completely


On Mon, Jun 10, 2013 at 7:13 PM, Gaurav Matta gauravgroup...@gmail.comwrote:

 In routes.php

 On 10-Jun-2013 6:17 PM, Nikunj Amipara nikamipar...@gmail.com wrote:
 
  hi all,
 
   i have doubt regarding routing...
   i want to replace
 
   url :  /photo/* with /image/*   everywhere  basically i want name
 of controller to be replaced.. in addition /photo url should no longer
 work. or it should be renamed and redirected to /image/*
 
  is it possible... 
  if yes please give some guidance as i don't know much about routing.
 
  thanks.
  Nikunj
 
  --
  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?hl=en.
  For more options, visit https://groups.google.com/groups/opt_out.
 
 

  --
 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/FMMEsvc-d6Q/unsubscribe?hl=en.
 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?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.






-- 
*
 ..Nikunj.*
*  (nikamipar...@gmail.com)
**(nik_amip...@yahoo.in)*
*(nikamip...@facebook.com nikamip...@way2sms.com)*
***(amipara_nik...@daiict.ac.in 201001...@daiict.ac.in)*

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Can somebody link an example of using Amazon S3?

2013-06-10 Thread Gaurav Matta
Follow and comment if you like
http://itfeast.blogspot.in/2013/05/upload-files-to-amazon-s3simple-storage.html?m=1
Hell there!

I'm new to Cake, and I'm working on a download site. I have it in my mind
to use Amazon S3. Can any of you link me to fairly clear examples of
implementing this? I'm sure there's a great explanation of how this is
done, but a few examples or a step by step explanation would clear up the
mystery fairly quickly.

I've found this: https://github.com/robmcvey/cakephp-amazon-s3 which looks
simple but is a little old as well as
https://github.com/mikesmullin/CakePHP-AWS-S3-Plugin which looks a bit more
up to date. (maybe some of guys have relevant experience with either or
those?)

The things most mysterious to me:

1) The first link references a local file. Is it necessary to upload the
file being uploaded by the user to my server, then to Amazon, or can it be
uploaded to Amazon directly?
2) How would I go about implementing a system where each downloaded file
has it's own page (specified via URL)? I'm sure this is done via get
requests, but I am just on the
tip of imagining exactly how it would be implemented.

Thanks for tolerating my dumb questions, and thank you for any smart
replies you might give.

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Please help!!! migration of user database from cakephp to core php

2013-05-08 Thread Gaurav Rajan
Dear Friends,

We are working on a project into social networking. The website has 
been built in Cake PHP. 

My questions are:

1. Will it be possible to migrate all user specific database from cake php 
tp core php?
2. This being a social networking website, how the user activities will get 
affected?
3. Will the users get to know about there accounts being shifted ? Will 
there be any loss of information?
4. Give me some idea about the cost that it might call for


Thanks,
Gaurav  

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Output to PDF with elements and styles

2013-01-24 Thread Gaurav Matta
Try mpdf
On Jan 22, 2013 10:46 PM, Jeremy Burns jeremybu...@classoutfit.com
wrote:

 I have an existing view that I want to output to PDF. I've looked at
 Ceeram's plugin and dompdf but they don't hit the mark for me. The existing
 view is built using elements which are not pulled in and there is no CSS.
 Am I missing something huge here or is this just really difficult? Do I
 have to rebuild the view and include the raw code from the elements (which
 isn't very DRY) and how do I include style sheets?

 Any help or guidance is much 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 post to this group, send email to cake-php@googlegroups.com.
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com.
 Visit this group at http://groups.google.com/group/cake-php?hl=en.




-- 
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 post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: help with layout error message

2008-07-19 Thread Gaurav Sharma
Yes,

I actually had 3 forms on the page. 2 of them nested with JS for submit. I
have now removed the forms and things look fine so far.

On Sat, Jul 19, 2008 at 5:45 PM, . [EMAIL PROTECTED] wrote:

 Do you have more than 2 forms on a single page? I believe this was what
 caused this issue for me. I had 2 forms, and 2 buttons. The buttons called a
 javascript function, which then did the form submit. I think the JS script
 was confused which form to submit. After I fixed this, I haven't seen this
 anymore. For me, the issue was only reproducible in IE6, but not IE7 or
 Firefox.

 On Sat, Jul 19, 2008 at 12:56 PM, __g [EMAIL PROTECTED] wrote:


 Did you figure out? I am having a similar problem. It seems like the
 default layout is missing in the action and it renders only the view
 file for that action. I also have a couple of forms on the page with
 links 'onclick=document.form_name.submit()'

 As reported originally, it happens randomly. The page works fine most
 of the time, but once it gets messed up, it stays like that for 5-10
 minutes. I see this on both IE 7.0 and FF. I wonder if it has
 something to do with cache rebuilding or something else periodic. I am
 also using Memcache.

 g

 On Jul 14, 3:53 am, . [EMAIL PROTECTED] wrote:
  It seems to happen in IE7, but not Firefox. hmm..
 
  On Mon, Jul 14, 2008 at 3:41 AM, . [EMAIL PROTECTED] wrote:
   i seem to be getting this same error message every now and then. Even
 on my
   live test server... Anyone has seen this error? Array.ctp view cannot
 be
   found?
 
   On Fri, Jul 11, 2008 at 1:44 AM, Marc MENDEZ 
 [EMAIL PROTECTED]
   wrote:
 
   Absolutely no idea, and it may be hard to find why since this kind of
   behavior is difficult to reproduce
 
   Happy it works again !
 
   . a écrit :
I just restarted the Apache server and mysql server, and it worked!
 I
am still curious why this though. Any ideas? I am using XAMPP.
 
On Fri, Jul 11, 2008 at 1:12 AM, . [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
 
This seems to happen in all of my controllers where the view
 has a
form submit. after I submit the form (any form) i get this
 error.
 
On Fri, Jul 11, 2008 at 1:07 AM, . [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
 
Hi
 
I do not have a var $layout or any setLayout in the
 controller.
 
The wierd thing is this was working just yesterday...
 
On Fri, Jul 11, 2008 at 1:00 AM, Marc MENDEZ
[EMAIL PROTECTED] mailto:
 [EMAIL PROTECTED]
wrote:
 
Hi,
 
Look in the controller containing the action which
 raised
this error, if
you don't use a $layout variable or call setLayout() ?
 
. a écrit :
 I am not referring to any Array.ctp whatsoever. Why
 do I
get this
 error? Thanks
 
 On Fri, Jul 11, 2008 at 12:42 AM, . 
 [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 
   wrote:
 
 I need help with this error message please. I do
 not
have any
 Array.ctp layout file. Why am I getting this all
 of
a sudden?
 
 Missing Layout
 
 *Error: *The layout file
 /C:\xampp\htdocs\app\views\layouts\Array.ctp/ can
not be found or
 does not exist.
 
 *Error: *Confirm you have created the file:
 /C:\xampp\htdocs\app\views\layouts\Array.ctp/
 
 *Notice: *If you want to customize this error
message, create
 app\views\errors\missing_layout.ctp



 


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



Re: I want gData

2007-11-06 Thread Gaurav Sharma
I second that. I think having wrappers for gData API will help spread cake
as well.

On Nov 6, 2007 7:11 PM, Mr-Yellow [EMAIL PROTECTED] wrote:


 https://trac.cakephp.org/ticket/723

 I don't think it matters that gData is proprietry as it is now
 becoming a foundation for more open standards

 For example OpenSocial.

 For a CakePHP developer to create an AtomPub backend for OpenSocial
 they will likely need a gData generator/wrapper.

 -Ben


 


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



RequiresPost method

2007-06-19 Thread Gaurav

Hi, I am new to Cake and to PHP as well.  I  haev a question about
reuiresPost() method which supposedly takes list of actions which can
only be triggered by a POST request. The way Cake bakes the code it
uses same edit and add methods to do 2 things:

1.) present form to user to add or edit (if form data is null)  using
http://yourhost:/blah/edit/1  GET request
2.) It also adds or edits the users when form of posted  using
http://yourhost:/blah/edit/1  POST request

 So If I use RequiresPost (edit) then my Get reuest would not go
through as action is still the same. Obvioulsy I can define my first
detp in separate action but what is the norm generally since I like to
use clean URIs.

Thanks.


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