Questions tagged [cakephp-2.1]

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

CakePHP is a rapid development framework for PHP that provides an extensible architecture for developing, maintaining, and deploying applications. Using commonly known design patterns like MVC and ORM within the convention over configuration paradigm, CakePHP reduces development costs and helps developers write less code.[1]

The release of CakePHP 2.1 beta was announced on CakePHP official site on 2012-01-23.

The latest CakePHP stable version is 2.1.5 Security Release resolving security issues related to the XML class.

[1] From the CakePHP home page.

1009 questions
7
votes
3 answers

CakePHP 2.1 Asset Compress Plugin not creating cached files

I'm using the CakePHP Plugin AssetCompress (v 0.7) which works fine, except that it doesn't cache any files in the directory. This is my asset_compress.ini setup: [General] writeCache = true cacheConfig = false alwaysEnableController = true debug =…
Christian Strang
  • 8,470
  • 5
  • 42
  • 53
7
votes
4 answers

CakePHP keeps logging me out

Recently i have made three Cake Apps and all three share this problem. The config is mostly stock and i use this as the session options. Configure::write('Session', array( 'defaults' => 'php', 'cookie' => 'test' )); After lots of googling…
472084
  • 17,666
  • 10
  • 63
  • 81
6
votes
1 answer

how to Update a field in Cakephp

i am newbie in Cakephp so I feel difficulties to implement the database queries .. what i want is I want to update a mobile Number where email is equal to the one the user has given .. this is the query which i want to implement "Update…
hellosheikh
  • 2,929
  • 8
  • 49
  • 115
6
votes
3 answers

how to add active class in current page in CakePhp

i have a problem similar to this question How to identify active menu link in CakePHP i have a page in my default.ctp file in which i want to add 'active' class on links. how can i identify the current url of the page and then apply the class on…
hellosheikh
  • 2,929
  • 8
  • 49
  • 115
6
votes
6 answers

Best way to implement admin panel in CakePHP

I am trying to move from CodeIgniter to CakePHP and can't figure out the best way to implement an admin panel. In CI I would create two different applications, one for the frontend and one for the admin panel. After Googling around, I have found…
Jatinder Thind
  • 202
  • 2
  • 3
  • 11
6
votes
1 answer

How to find data through foreign key in cakephp?

Product Plan ProductPlan id |name id |name id | product_id | plan_id 1 aplha 1 a 1 1 2 2 bravo 2 b 3 charlie I want to find Product name and…
usii
  • 1,113
  • 1
  • 10
  • 17
6
votes
3 answers

Error: Integrity constraint violation: 1052 Column

why I'm getting this? Error: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'favorites' in field list is ambiguous SQL Query: UPDATE `twitter`.`tractions` AS `Traction` LEFT JOIN `twitter`.`profiles` AS `Profile` ON…
Gediminas Šukys
  • 7,101
  • 7
  • 46
  • 59
6
votes
2 answers

Use 'on duplicate key update' when saving record in CakePHP

My model has 2 unique indexes. The primary key, and an alphanumeric id. I only have the alphanumeric id when updating said record, so I need to add an "on duplicate key update" statement to the save function, but how do I do that? And I do not want…
Jelle De Loecker
  • 20,999
  • 27
  • 100
  • 142
6
votes
2 answers

MySQL SELECT where boolean field is NULL or false

OK I must be missing something really simple here. I just want to return all records from a table where the user_id matches (easy!) and the 'paid' field is either NULL or 0. My 'paid' field is a TinyInt (1). My CakePHP model code is: $workingRecord…
joshua.paling
  • 13,762
  • 4
  • 45
  • 60
6
votes
3 answers

CakePHP, CGI and mod_rewrite

I have to run my CakePHP 2.1 application in an environment with CGI-PHP and without the ability to declare apache aliases. I want to redirect requests to a subdomain to CakePHP with mod_rewrite, but this doesn't work out. Current setup Webroot is…
bfncs
  • 10,007
  • 4
  • 32
  • 52
6
votes
1 answer

CakePHP custom validation with a variable in the error message

Good afternoon. I have a Model that has a field called "percentage". All similar Models cannot have their percentages add up to more than 100%. Checking for this is handled during validation. I need the validation error message to say how much…
user1449855
  • 1,195
  • 2
  • 10
  • 14
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

Disable form security CakePHP

Is it possible to turn of all CakePHP security features for only 1 particular form in a view? So I don't get any hidden fields (tokens) in that form. Thank you, Bart
user1447499
  • 63
  • 1
  • 4
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
6
votes
1 answer

difference between $this->data and $this->request->data?

In cakephp 2.1 whats the difference between $this->data and $this->request->data?
Ivan Santana
  • 101
  • 1
  • 7
1
2
3
67 68