Questions tagged [cakephp-2.2]

This tag relates to the 2.2.x branch of the CakePHP MVC framework.

The release of CakePHP 2.2 beta was announced CakePHP official site on April 30, 2012.

Following hot on the heels of 2.1.0, the CakePHP 2.2.0-beta was launched directly as beta as the new features were expected to be relatively stable, and could be generally transparent when upgrading.

Main features added are:

  1. Timezone support for CakeTime utility.
  2. Support pagination for complex custom finders.
  3. ACL methods now part of Permission model.
  4. New Hash class.

The latest CakePHP 2.2.x stable version is 2.2.1 release was published on July 14, 2012.

Official site: cakephp.org

Documentation: book.cakephp.org

See also:

250 questions
36
votes
3 answers

How to declare the type for local variables using PHPDoc notation?

I use Zend Studio to develop in PHP with CakePHP, and one of the problems with CakePHP is that the views all reference undeclared local variables. So for example, in the controller you would $this->set('job',new MyJobObject()); Then in the view you…
Reactgular
  • 52,335
  • 19
  • 158
  • 208
21
votes
6 answers

CakePHP Error: Unable to configure the session, setting session.auto_start failed

I'm getting this error: Error: [CakeSessionException] Unable to configure the session, setting session.auto_start failed. I'm using Cakephp 2.2.4. EDIT It seems this guy had the same issue: Cakephp Session error on live site and using…
Marcos
  • 4,643
  • 7
  • 33
  • 60
11
votes
2 answers

Load Javascript files in CakePHP Layout at "bottom"

Currently, I have a big CakePHP application with a layout and a lot of views. In the layout, I load Javascript files in the head which are needed by most views. In the views themself, I either load additional Javascript files (e.g., load a library…
akohout
  • 1,802
  • 3
  • 23
  • 42
10
votes
1 answer

CakePHP Validation depending on other field

I wonder if it is possible with CakePHP validation rules to validate a field depending on another. I have been reading the documentation about custom validation rules but the $check param only contains the value of the current field to validate. For…
Alvaro
  • 40,778
  • 30
  • 164
  • 336
9
votes
1 answer

URL Rewrite create subdomain in cakephp

I am using Cakephp framework 2.2.2. I want to create a personalized URL for the user. For example, if a user enters username=pragnesh, then they can access my site like: http://pragnesh.mylocalhost.com, same as in blinksale.com My URL:…
Pragnesh Chauhan
  • 8,363
  • 9
  • 42
  • 53
9
votes
4 answers

How to return JSON from a CakePHP 2.2 controller?

I'm invoking a controller function: $.get("http://localhost/universityapp/courses/listnames", function(data){ alert("Data Loaded: " + data); }); And in my Controller: public function listnames() { $data = Array( "name" => "Sergio", …
sergserg
  • 21,716
  • 41
  • 129
  • 182
8
votes
4 answers

CakePHP Xml utility library triggers DOMDocument warning

I'm generating XML in a view with CakePHP's Xml core library: $xml = Xml::build($data, array('return' => 'domdocument')); echo $xml->saveXML(); View is fed from the controller with an array: $this->set( array( 'data' => array( …
Álvaro González
  • 142,137
  • 41
  • 261
  • 360
8
votes
4 answers

Theme Asset Not working In CakePHP 2.2.4

I have seen many questions regarding linking to theme assets in CakePHP and none of them are resolving my issue and also the most recent post was in 2012 so I thought I'd float my question out there. I have implemented themes in my CakePHP 2.2.4…
bowlerae
  • 924
  • 1
  • 14
  • 37
7
votes
3 answers

How to inherit parent class array properties by merging array?

I often use properties in my classes that store an array of options. I'd like to be able to somehow merge those options from defaults declared in a parent class. I demonstrated with some code. class A { public $options =…
Reactgular
  • 52,335
  • 19
  • 158
  • 208
7
votes
0 answers

Class 'Dispatcher' and class ''Router'' not found

What I did: I make a project in CakePHP 2.2.3. It worked fine till I did some changes in css. What happened When i refreshed the page in browser I get following error Fatal error: Class 'Dispatcher' not found on my site path/app/webroot/index.php on…
6
votes
4 answers

Ocasional error warning when CakePHP is writing to the cache

I'm developing a CakePHP 2.2 site locally with MAMP. Every so often, I get one or more warnings similar to this, about not being able to write to one or more cache files: Warning:…
joshua.paling
  • 13,762
  • 4
  • 45
  • 60
6
votes
1 answer

Triggering event manually in JS Helper CakePHP

I stuck in a situation. I am using JS Helper. I used the following code. Js->get('#client_id') ->event('change', $this->Js->request(array('action' => '../ajax/get_client_location_and_process'), array('update'…
Arun Jain
  • 5,476
  • 2
  • 31
  • 52
6
votes
2 answers

CakePHP Defining Constants

I want to include Google API in my app. I want to Define Outh2 Key, Secret Key and Developer Keys as Constants which i can call and use in the App controller. Which is the best place to define the same ?
Harsha M V
  • 54,075
  • 125
  • 354
  • 529
5
votes
3 answers

CakePHP validation rule automatically adding a required attribute to the field

I am using a custom validation rule in CakePHP to be sure a value is entered into a field when a corresponding checkbox is marked: Here's the validation rule within my model's validation array... 'tv_price'=>array( 'check'=>array( …
CSamp
  • 113
  • 1
  • 4
  • 10
5
votes
2 answers

Configuration setting 'Security.level' in CakePHP 2.x still used?

I can't find any reference to the Security.level configuration setting from Cake 1.3 in the CakePHP 2.2 manual. I also can't find any reference to this setting in the migration guide. This setting had a big impact on the session timer in Cake…
Reactgular
  • 52,335
  • 19
  • 158
  • 208
1
2 3
16 17