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 HAVING SUM Query superslow - where is room for improvement?

This query kills the whole page (90% of the request time): /** * Checks if a conversation exists containing these users (at least two!) * //TODO: fixme! SUPER-SLOW! 5s on a 6s page load total * * @param array $users Users to check on * @param…
mark
  • 21,691
  • 3
  • 49
  • 71
0
votes
1 answer

Load Vendor javascript files CakePHP 2

does everybody know how to load javascript files (as opposed to php classes) from a third party library (placed in app/Vendor/LibraryName). I tried to look into App::import(), but apparently it's only to import classes. I'm trying to use Jssor…
user765368
  • 19,590
  • 27
  • 96
  • 167
0
votes
0 answers

Exception and SessionFlash Cake

I've got a problem showing $this->Session->flash();. In my controller just for testing purpouse I set a session flash and then I throw a new Exception, but in my view the session flash is not showing. I'm throwing an error because I'm using ajax to…
0
votes
1 answer

if i upload image then edit work fine but if i update other field and not image that time it display array to sting erro in cakephp2.4.5

it will display error if i update other filed and not image. public function edit($id = null) { $this->helpers = array('TinyMCE.TinyMCE'); $this->layout = 'adminpanel'; if (!$id) { throw new NotFoundException(__('Invalid…
newsurt
  • 43
  • 1
  • 9
0
votes
0 answers

Cakepdf running Wkhtml Engine can't use View Helpers for some reason custom or core

I am having an issue where the Wkhtml pdf rendering engine is choking when it encounters View Helpers. It winds up throwing an internal server error and doesn't let you know that that is the code causing the problem this simple snippet of code in a…
GatorGuy023
  • 297
  • 2
  • 3
  • 11
0
votes
1 answer

Cakephp-2.5 next navigation url without html code

How can I get next navigation url without html code ? $this->Paginator->next(); //output Next I just need url only.
inarli
  • 3
  • 2
0
votes
1 answer

Why do conditions in model associations not filter the find results in the controller in CakePHP?

I have two models: Users and Lessons User has one Teacher User has and belongs to many Students Both Teachers and Students are Users In my Users model I have this association: public $hasMany = array( 'Lesson' => array( 'className' =>…
Chaim
  • 2,109
  • 4
  • 27
  • 48
0
votes
1 answer

How to use an external Library as a view Helper in CakePHP?

I'm using a third party library to format data in a specific way. I managed to create a component from that library doing the following: App::uses('Component', 'Controller'); App::import('Vendor','csformat'…
kshaaban
  • 1
  • 3
0
votes
1 answer

Cakephp Auth login REST response

public function login() { if($this->request->is('post')){ if($this->Auth->login()){ var_dump('Logged in successfully'); }else{ var_dump('Log in failed'); } } } When I'm writing the above…
0
votes
1 answer

CakePHP, Shell: how to define an indefinite number of argument

In a CakePHP shell, I need to use an indefinite number of arguments. For example: cake MyShell mycommand inputFile inputFile2 inputFileN outputFile In my case, I know for sure that should be at least 2 arguments (inputFile and outputFile), so the…
Mirko Pagliai
  • 1,220
  • 1
  • 19
  • 36
0
votes
1 answer

Accessing the post data sent to Auth.redirect

I am facing an issue with Auth.redirect functionality in Cakephp 2.5.3. Following is the Scenario: Scenario There is an action (controller=>TalkComments, action=>add) which is login protected. The data is submitted to this action using POST HTML…
addicted20015
  • 644
  • 7
  • 16
0
votes
0 answers

CakePhp 2.5.3 Sessions are lost randomly

I have issues sometimes with CakePhp. 1 - When they users logged in, I save the username in Session, and also do some Cache logic to avoid some useless queries: $cacheTime = '24h'; $cacheKey = md5(self::SITE_NAME . ' - ' . $login); …
zeflex
  • 1,487
  • 1
  • 14
  • 29
0
votes
1 answer

Cakephp Meta Tags

I am trying to set up Meta Tags and Description for my website. The client wants to have for every page (CMS) different meta Tags. Like the Set Title from the Action. Can i add the META tags for every action?
Harsha M V
  • 54,075
  • 125
  • 354
  • 529
0
votes
2 answers

Cakephp Model ignoring database settings

Update: please see my EDIT section below where I explain what I have discovered after testing I'm working on a website with CakePHP 2.5.1, and I'm experiencing a very strange behavior: one of the 2 models I have seems to refuse to use a different…
Albert
  • 1,516
  • 3
  • 24
  • 55
0
votes
1 answer

Remove the mysql output from the Cakephp 2.5 default layout

Is there anyway to remove the mysql output from the cakephp default layout without the need to change the complete default layout?
Aex Sun
  • 337
  • 5
  • 13