cakephp-2.0 Questions

4

Solved

I'm not sure of the best way to load models in CakePHP 2.0 now. Question 1 I have a model where more than one database field is related to another model. customers table has the fields country...
Sapienza asked 6/3, 2012 at 12:56

9

Solved

In View, I can get action by using $this->action But, I cannot get controller name by $this->controller What is the proper way to get current controller in View?
Pushup asked 23/10, 2012 at 15:43

3

Solved

I have a function that I want all of my controllers to be able to use, so I have defined it in AppController. Now part of what this function will do has no business being in a controller and so it ...
Quinlan asked 13/2, 2014 at 21:25

2

Solved

I have have this dropdown menu where you can select multiple values. Now let's say I want to edit my info and make a dropdown menu with multiple selected values. Trying to figure out how it goes, b...
Lavonna asked 19/9, 2012 at 9:32

2

Solved

I would like to make use of a plugin component from my shell class. I am trying to use: App::import('Component', 'Myplugin.Mycomponent'); $this->Mycomponent =& new MycomponentComponent(); ...
Rosemarie asked 4/6, 2012 at 11:44

3

Solved

In my model's beforeSave method, how can I check if the save operation is going to be an INSERT or an UPDATE? I want to add to the model data, but only if it's inserting a new row.
Impulse asked 4/12, 2012 at 12:46

2

Solved

I found this similar question but my problem is different. I moved my CakePHP 2.2 application to another server. There exists no problem before migration. Most of the things works fine after migr...
Recede asked 5/2, 2013 at 20:7

2

Solved

I'm using CakePHP 2.3. and I'm trying to cache my home page view. But After caching it to home.php, I can't load cached view because of error: Error: Class 'AuthComponent' not found File: C:\wamp\...
Defoliate asked 2/7, 2013 at 7:19

4

Solved

In my CakePHP 2 application i have a problem with beforeFilter. In this thread it worked well. Because of old version of CakePHP. In my code, If user is not authorized, I want to show him "another...
Terza asked 27/5, 2012 at 9:52

2

Solved

I'm getting the following error: Strict (2048): Non-static method Controller::referer() should not be called statically, assuming $this from incompatible context [APP/View/Questions/admin_edit.ctp...
Aphelion asked 17/4, 2013 at 20:48

8

Solved

can anyone give me an example on how to create Sessions and write data to it. I've seen syntax on how to write data to a session using write command. But how to create a session and retrieve the va...
Extracanonical asked 7/7, 2009 at 8:31

7

Solved

when I update data in the User model, the Auth data is not updated. How can I "refresh" the data which is returned by $this->Auth->user() when I am updating user model ? and I don't want to use ...
Bashan asked 18/11, 2012 at 13:57

4

Solved

I am using this query to get all the data but I also need add in it how many rows it's returning. Here is my code: function getUsers($id){ $users = $this->User->find('all', array('conditio...
Overreach asked 10/5, 2012 at 1:50

6

Solved

I have a site that has some strict requirements for SEO purposes. The main one is redirecting all http requests to https which I have done by adding this into the AppController: public function f...
Lithiasis asked 12/8, 2014 at 23:43

3

I keep getting this error... Wondering what this means Error: [MissingControllerException] Controller class CssController could not be found. any suggestions?
Allard asked 5/3, 2013 at 17:57

7

Solved

How can I detect if the user is on the homepage of my website with CakePhp? May I use $this->webroot? The goal is to do something only if the current page is the homepage.
Pecksniffian asked 14/8, 2013 at 8:8

3

Solved

I am new to CakePHP. When I am using Model Field Validations then it is showing error message infront of each required form field. I want to show it in a div at the top of the form. How I can imple...
Check asked 24/7, 2012 at 11:58

3

Solved

CakePHP creates a div that automatically wraps any of its input tags that are built with the formhelper as followed: $this->formhelper->input('something'); Such that the output looks about...
Enact asked 16/10, 2013 at 15:27

4

Solved

Is there a way of accessing the current session in the AppModel class? I want to save the ID of the currently logged in user to almost every INSERT/UPDATE action.
Tartrate asked 4/1, 2012 at 21:9

3

Solved

Billing with Stripe i have a form and i submit information and place the order following error has occured.... Unexpected error communicating with Stripe. If this problem persists, let us know at ...
Fume asked 11/12, 2013 at 7:32

3

Solved

I have a view file which have two forms in it at different positions say, one form is at the left corner and the other at the right corner. once the form is submitted successfully , a success mes...
Multiple asked 8/2, 2013 at 4:30

8

Solved

I am working on a CakePHP 2 project. It originally started out in 2.0.x and then recently migrated to 2.1.0. Throughout the whole development process, I have been receiving the error message below....
Squelch asked 16/3, 2012 at 7:32

8

In Codeigniter I do this $p=$this->input->post(); to get all objects posted but I don't know if there is something similar in cakephp to get all posted variables from a form ? I am writing...
Corps asked 7/3, 2012 at 8:33

3

Solved

I have a question which is driving me crazy and I have to admit I am not that experienced in CakePHP. As mentioned in this question, Using DISTINCT in a CakePHP find function, using DISTINCT this w...
Javier asked 23/6, 2012 at 15:52

3

Solved

For CakePHP errors I know that there exists CakeError and AppError solutions. But I need to make a redirection within controller. In AppController there exists: function afterFilter() { if ($thi...

© 2022 - 2024 — McMap. All rights reserved.