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

Cakephp with ajax post request get error

I have in Cakephp a form which is loaded by an ajax request. After sending the form via another ajax request, the magic is done in the controller and the controller is sending back new html code. So far so good. It works pretty well as long as I…
FishWave
  • 308
  • 2
  • 16
0
votes
1 answer

Cakephp 2.x: how to paginate data from an existing array (json, etc)?

I use a remote API to retrieve data (in xml, json format), which I'm caching. But I need to properly paginate this data before render. I don't want to store this data in database. I'm OK to recreate a PHPPaginator component and do the data…
mattspain
  • 723
  • 9
  • 18
0
votes
2 answers

CakePHP Upload Plugin: Programmatic File Retrieval without a Form

I use CakePHP-Upload plugin, now need to use the upload without form, following this example: Programmatic File Retrieval without a Form All my upload are stored in the associated model, called the Attachment. So when I save the article, at the same…
Salines
  • 5,674
  • 3
  • 25
  • 50
0
votes
1 answer

Cakephp 2.5.5 Jquery Autocomplete in Foreign Key input

Need some help again! I have seen many tutorials but they couldn`t help me.Then I decided to ask. I`m using cakephp 2.5.5 I have this relationship: Vendor has_many EventVendor EventVendor belongs_to Vendor in View\EventVendors\edit.ctp I have this…
0
votes
1 answer

Cakephp 2.x Unittest for delete in controller: What to assert for?

I start to write unittests for controllers in cakephp 2.5 and struggle with a testmethod for the the delete method. Controller: public function delete($id = null) { $this->Content->id = $id; if (!$this->Content->exists()) { throw new…
Calamity Jane
  • 2,189
  • 5
  • 36
  • 68
0
votes
1 answer

Cache for Cakephp queries

I want to implement a cache functionnality for cakephp 2.5.3, related to find queries, but I want to invalidate cache on all events related to the tables (update, delete, ...). I coded this into AppModel.php, can you tell me what do you think about…
zeflex
  • 1,487
  • 1
  • 14
  • 29
0
votes
1 answer

CakePHP 2.x HABTM find data which have relationship by condition

I have a HABTM association between the Models Sdirectory and User like this: class Sdirectory extends AppModel { public $actsAs = array('Containable'); public $hasAndBelongsToMany = array( 'User' => array( …
Zeussi
  • 571
  • 1
  • 9
  • 22
0
votes
1 answer

what is better way to add features to product

I am developing e-commerce website in cakephp 2.5 ,(answer is more suggestive than technical) the main issue, i am facing to add feature to product, i'm little bit confused to take decision to do this. because there are 5-7 type of products. each…
coder
  • 156
  • 3
  • 23
0
votes
2 answers

Auth($this->auth->login()) return false in cakephp 2.5.6

$this->auth->login() always returns false. I must use model PintiplanAutore model in my view correctly displays the sql query SELECT PintiplanAutore.idautor, PintiplanAutore.idfacebook, PintiplanAutore.nombre, PintiplanAutore.correo,…
Reumo
  • 31
  • 6
0
votes
1 answer

CakePHP 2.x Accessing Another Model

Noob to cakePHP here. Bicycle belongsTo Stand Stand hasMany Bicycle Stand belongsTo Station Station hasMany Stand I've baked the CRUDs and now I want to display the station name when I view a bicycle. How should I define the bicycle - station…
BrotherBarnabas
  • 343
  • 1
  • 3
  • 9
0
votes
1 answer

cakephp group on assosiated model / table

Short background: I have orders that contains products called 'Komplexes'. Komplexes have different sizes (height and width) if there are multiple Komplexes with the same measures in an order they have to be grouped and a counter must be added to…
Axx
  • 116
  • 2
  • 7
0
votes
1 answer

how to create multiple models against multiple function in single controller in CakePHP

i think, In "CakePHP" one model is against each controller but i have multiple functions in single controller and each function represent different page and database table. i.e public function manage_categories(){} public function…
0
votes
1 answer

I want to run my cakephp code

Im started learning cakephp, and I did something but how I can run it? Where I can see what im made and see does it works ? I tried typing just /app/View/Posts/index.ctp in to URL bar. Thanks!
Erki
  • 59
  • 9
0
votes
1 answer

Missing Plugin error in Cakephp

I am developing a site in cakephp2.5. I have two plugin Webmaster and debugKit. When I write CakePlugin::load('Webmaster', array('bootstrap' => false, 'routes' => false)); CakePlugin::load('webmaster'); CakePlugin::load( 'DebugKit'); The site works…
RN Kushwaha
  • 2,081
  • 3
  • 29
  • 40
0
votes
1 answer

CakePHP error with a program to make an array

I make a program to create an array with the range of my hero : public function surface($fighterId,$porte_max,$porte_min){ $porte = $porte_max; $longeur = 0; $surface; $i =0; $coordonne_x=$this->findById($fighterId,…