Questions tagged [cakephp-3.3]

Questions about the 3.3.x branch of the CakePHP MVC framework. Use this tag in combination with the general [cakephp] tag. If your question applies to CakePHP more generally, use only the [cakephp] tag.

CakePHP 3.3

CakePHP is a PHP development framework using Associative Data Mapping, Front Controller and MVC design patterns.

Version 3.3.0 was released in August 2016.

Resources

49 questions
8
votes
4 answers

"Cannot convert value to string" when retrieving data (belongsToMany relationship)

I'm using CakePHP 3.3.6 and MySQL 5.7.13. I have these three tables in my database (amongst others) : collections, tags and the join table collections_tags. collections Table CREATE TABLE IF NOT EXISTS `database`.`collections` ( `id` INT UNSIGNED…
5
votes
1 answer

Custom configuration files in CakePHP 3

I have a CakePHP 3.3.14 application where I've created 2 subdirectories, webroot/data/downloads/ and webroot/data/master I want to put these paths in a custom configuration file and reference them in a Controller. But I can't see how to do…
Andy
  • 5,142
  • 11
  • 58
  • 131
4
votes
1 answer

Cake 3: column of type JSON stores a NULL as string "null"

My model is defined as follows:
Liglo App
  • 3,719
  • 4
  • 30
  • 54
4
votes
0 answers

CakePHP 3 matching and contain not returning association

I'm using CakePHP 3.3.9 and trying to use the friendsofcake/search plugin + pagination to filter a list of AssessmentLogs based on Clients.EmrSystems, in which EmrSystems is a belongsToMany association on Clients. This is all on a SQL Server…
3
votes
1 answer

How do I access SESSIONs in CakePHP's app.php?

I am using CakePHP 3.3 I am trying to set session timeout's value and other settings in app.php to a value stored in config database table. I tried using the line below but it's just stoping execution of the webpage. $myConfigs =…
Keyur Padalia
  • 2,077
  • 3
  • 28
  • 55
3
votes
2 answers

Cakephp 3 giving me Fatal error: Uncaught Error: Class 'Cake\Http\Server' not found

I have done a cakephp 2 to cakephp 3 upgrade, and that was causing problems, so I found I had to replace the app/webroot with a new set of files that were part of the cakephp 3 skeleton, but now I am getting this error: Fatal error: Uncaught Error:…
user904542
  • 6,965
  • 5
  • 20
  • 28
2
votes
1 answer

cakephp 3.3: pagination and sorting error when model is in url

I have the following Events controller: public $paginate = [ 'sortWhitelist' => ['title', 'id', 'price', 'date', 'Categories.description'], 'order' => ['date' => 'desc'] ]; and an index method: $events =…
Harris
  • 1,128
  • 4
  • 17
  • 41
2
votes
0 answers

CakePHP 3 - Joining data across multiple databases

I am trying to retrieve some data from tables which exist in two separate databases. Nothing seems to work - even the suggestions from the official documentation. Let's say we have two tables in two databases: db1 (default) - orders db2 -…
BadHorsie
  • 14,135
  • 30
  • 117
  • 191
2
votes
2 answers

Login redirecting in cakePHP 3.4

I'm trying to redirect to current page after logged in, using cakephp 3.4 but I'm getting like this localhost page isn't working, locahost page redirecting you too many times. Try clearing your cookies for 2 sec after that it's redirecting to…
Ashok
  • 184
  • 2
  • 14
2
votes
1 answer

Class 'Router' not found in cakephp 3

I am upgrading my cakephp version from 2.6.7 to 3.3.4. The following code was properly working to refer the home url: But this not working in cakephp 3.3.4 and it shows the following error message: Error: Class…
Abdus Sattar Bhuiyan
  • 3,016
  • 4
  • 38
  • 72
2
votes
1 answer

custom finder not working in CakePHP 3

I'm working on CakePHP 3.3. I want user to login using either email or mobile number along with password. I have users table with email, mobile, password, etc fields. According to CakePHP doc, I'm using custom finder auth to login. Auth component in…
Gaurav
  • 131
  • 12
2
votes
2 answers

Can't set custom status code message in HTTP Response with Cake PHP

I want to modify the reponse in a controller method. I figured out how to change the status code, but I can't change the message. The API says to give to the httpCodes method an array in which for each code, the message we want to set. Here is my…
oktomus
  • 566
  • 7
  • 28
2
votes
1 answer

How to change order of Date of Birth Fields in CakePHP 3 Form

I am comparatively new to CakePHP3. I am creating a form with a Date of Birth field in it, with dob field name. echo $this->Form->input('dob',['label'=>'Date of Birth']); Fields are rendered in Year - Month - Day sequence. I want it be rendered in…
Arvind K.
  • 1,184
  • 2
  • 13
  • 27
2
votes
2 answers

How to update to the latest CakePHP 3.3.3 and bug fixes through composer

Recently I have reported a bugfix for Cakephp and the team has fixed the bug and merged it back to the cakephp repo (version 3.3.3). I wonder how to get the version of CakePhp. In my application folder I run composer update and this is what is set…
Fury
  • 4,643
  • 5
  • 50
  • 80
2
votes
2 answers

Using SQL Functions in cakephp returns error

I am following Using SQL Functions to build my query. I tend to get the first due instalment. My query was working (on cakephp3.1) before updating the cakephp to version 3.3 (by composer). In my Controller $this->loadModel('Orders'); $order =…
Fury
  • 4,643
  • 5
  • 50
  • 80
1
2 3 4