Questions tagged [cakephp-2.5]

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

CakePHP 2.5 was released on May 12, 2014.

CakePHP 2.5 is a fully API compatible upgrade from 2.4.

You should add the generic tag in addition to this one.

Useful links:

238 questions
0
votes
1 answer

CakePHP, want to use the findById($my_id) instead of findById($id) but got error:

In my RedpCategory table I use cat_id as primaryKey, something like in my model below in RedpCategory model:
Siemhong
  • 381
  • 1
  • 3
  • 19
0
votes
1 answer

Fatal error: Cannot unset string offsets in AuthComponent.php on line 781

Error: Cannot unset string offsets File: /var/www/lib/Cake/Controller/Component/AuthComponent.php Line: 781 Code: if (isset($this->request->data['User'])) { $this->Auth->login(); } Any idea why this error happens?
gattsbr
  • 3,762
  • 1
  • 22
  • 34
0
votes
1 answer

find result structure changed once migrate to php 5.4

here is my problem : using cakePHP on a PHP 5.3 system, when we upgraded to php 5.4, the structure of a find resultat changed : for example, having a modele "Foo" mapping a table "foo" after a find, the columns was under a "Foo" index, now it is…
Bruno
  • 1,088
  • 1
  • 13
  • 31
0
votes
0 answers

CakePHP multiple controllers use same models

In CakePHP 2.5 I have these controllers: - CommonsController extends AppController { ... } - MyController extends CommonsController { ... } - GoodController extends CommonsController { ... } I have this Models: - Work1 extends…
trante
  • 33,518
  • 47
  • 192
  • 272
0
votes
0 answers

Cakephp session timeout does not affect session expiration

This questions did not solve my problem Session timeout doesn't work + cakephp Modify session cookie expiry and session timeout for a CakePHP session CakePHP Session Timeout on Inactivity only I wanted to test if session timeouts work fine, I…
dav
  • 8,931
  • 15
  • 76
  • 140
0
votes
1 answer

Multiple form with TinyMCE on one page

I have multiple form (loaded in a loop) in one page and each form have a TinyMCE input but actually only the first is formatted with TinyMCE, the others are ordinary input. I use this helper (cakephp 2.5 project) :…
hidewak
  • 299
  • 1
  • 4
  • 16
0
votes
1 answer

CakePHP appending to form data on submit

I have page that adds people. A person has a name, date of birth, etc. A person can also have many phone numbers, and many addresses (Home and/or Postal). In my view I have some jQuery which allows the user to add additional phone numbers and…
nuutrino
  • 131
  • 3
  • 13
0
votes
1 answer

CakeDc User $hasMany not returning Associated model

I am using the CakeDc Users plugin 2.0 and on the plugins admin_index view I would like to see the associated Books for the users. I have added $hasMany to User.php Model public $hasMany = array( 'Book' => array( 'className' => 'Book', …
Keith Power
  • 13,891
  • 22
  • 66
  • 135
0
votes
1 answer

Cakephp components inside another component performance

there is identical question about this Cakephp: Load components in components posted about 3 years ago, which should be for 1.3 version. I have a big component, (about 3-4 thousand lines), lets call it BigComponent.php. I am using it a couple of…
dav
  • 8,931
  • 15
  • 76
  • 140
0
votes
2 answers

How to increment date format variable?

I need to look up for agreements from '2014-06-01' to $today. I am trying to make loop. $today=date('Y-m-d 00:00:00'); $first_day=$my_counter['Counter']['created']; $pointer = $first_day; while ($pointer < $today) : echo…
tomas3man
  • 29
  • 7
0
votes
1 answer

CakePHP testAction returns null after redirect

I test a controller action. I pass data to it via the POST method. After saving a data into DB I do redirect to a main page where I display a message about of the action result. I want to test whether a text of the message equal to expected, but I…
user3731174
0
votes
1 answer

CakePHP 2.5 plugin routes not loading

I'm attempting to update a site to CakePHP 2.5 from 2.4 but for some reason it is ignoring the routes from my plugins. I've figured out that CakePlugin::loadAll needs updating to the following:- CakePlugin::loadAll(array(array( 'MyPlugin' =>…
drmonkeyninja
  • 8,490
  • 4
  • 31
  • 59
0
votes
2 answers

cakephp timeHelper isToday

I am using cakePHP time format to change a date to the users timezone. Then I wish to check if it is today. When I pass $currentDate into $this->Time->isToday I get nothing back, even thought it is todays date. If I pass in date("d/m/Y"); it works…
Keith Power
  • 13,891
  • 22
  • 66
  • 135
0
votes
1 answer

cakePHP link broken with routes cakeDC users plugin and admin prefix

I have a link with Html helper in a admin_add.ctp view inside the cakeDC users plugin. My problem is the action is not used and the controller value is used for the action instead and 'users' is used as the controller. I think it may be because…
Keith Power
  • 13,891
  • 22
  • 66
  • 135
0
votes
1 answer

How do I set up cakephp on nginx?

I am trouble setting up cakephp-2.5.2 on a nginx server. I have been looking at questions on this site and else where that are similar, but the answers don't seem that good. I can't use url rewriting, because I don't own the server, so I don't have…
user1296259
  • 521
  • 1
  • 13
  • 33