Questions tagged [cakephp-3.4]

Questions about the 3.4.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.4

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

Version 3.4.0 was released in February 2017.

Resources

138 questions
1
vote
1 answer

Cakephp 3.4 - Usage of setMatching() and getMatching()

I have upgraded to CakePHP 3.4 and I’m checking through the 3.4 deprecation list, the migration guide says getMatching() will have to be called after setMatching() to keep the old behavior I'm confused and couldn’t find any documentation on sample…
EssEss
  • 73
  • 10
0
votes
0 answers

Why $this->request->getParam('_csrfToken') is returning false instead of a CSRF token in CakePHP 3 application

This piece of code $this->request->getParam('_csrfToken') is generating CSRF token in my production application and not in local and test server. Something is wrong and not working in my local app.
ParminderBrar
  • 145
  • 1
  • 3
  • 13
0
votes
0 answers

Fetch Data from Okta XML using PHP

I am trying to get tags-wise values from the given XML, like the Location tags value using PHP/CakePHP 3.4, for that, I have tried the below ways. file_get_contents with try 1, it returns the below response simplexml_load_file with this, it…
Amit Joshi
  • 456
  • 1
  • 8
  • 21
0
votes
0 answers

How to receive files in the cakephp 3 that are passed through an angular http post method?

iam sending the file through http post method in angular 13 before sending file iam appending file and file.name to formData() and sending it. Now how to receive that file in the backend of cakephp 3.0
0
votes
1 answer

How can I validate fields and criteria at execute override?

We have a c (central) server and several d (district servers), such as d1, d2, d3, d4, d5. There are some tables that are to be replicated. For the sake of simplicity, let's assume that we have a tblFoo table that exists on d1, d2, d3, d4, d5 and c…
Lajos Arpad
  • 64,414
  • 37
  • 100
  • 175
0
votes
1 answer

How to save images in cakephp 3.4.0 with cakephp-upload while being immutable

I'm working on my cakephp project and I am currently upgrading from 3.3.16 to 3.4.0 The project uses the cakephp-upload plugin to save an image. The Upload plugin needs an existing entity to attach a file to it. A modification of the request is…
0
votes
0 answers

How to set dynamic model association without foreign key cakephp3

I am using cakephp 3.4. I need to retrieve the data from two tables where no any association between them. I need to have solution where I can bind 2 models dynamically for that particular query. There is an option to bind-unbind model, but that is…
H Arif
  • 431
  • 4
  • 7
0
votes
0 answers

Alternative of using **joinType** for hasMany and BelongsToMany model

I want to get results of left side model/table, if and only if the condition satisfy in the right/contain model for hasMany and BelongsToMany association. As per my knowledge, joinType is not available for hasMany and BelongsToMany association, so…
bikash.bilz
  • 821
  • 1
  • 13
  • 33
0
votes
0 answers

Unable to find table class for current entity error in cakephp 3

In my below code when I am getting complete zero result pr zero rows that time I am getting this error: Unable to find table class for current entity error And if any row is coming in the pagination that time everything is working fine. Where I am…
Devendra
  • 219
  • 2
  • 22
0
votes
0 answers

How can I load a theme plugin only for a few, selected users?

I have a CakePHP 3.4 application, which has been developed a couple of years ago and has a few thousands users. I am currently working on a new version of this application, and my client wants it to be visible only by a few selected users before we…
ToX 82
  • 1,064
  • 12
  • 35
0
votes
1 answer

How to send email in cakephp 3.6.7..?

I am using cakephp3.6.7 while configuring app.php it will show error. Error: Could not send email: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() Please help…
0
votes
1 answer

How to read session variable in bootstrp.php file in Cakephp3

I have to read session variable into bootstrap.php file and have to assign this to a variable. When I am accessing session variable I am getting error: Error: Call to a member function session() on null. Below is my code. …
Devendra
  • 219
  • 2
  • 22
0
votes
0 answers

multiple login in cakephp 3

I have to create on seperate login screen for user vendor type. Under the Appcontroller I have added public function beforeFilter(Event $event){ $this->Auth->allow(['login', 'logout','vendor_login','vendor_logout']); } …
0
votes
1 answer

Add multiple record in add controller in cakephp 3

I have to same multiple row in add form(controller) but it's not saving multiple record. Do i have to move save under the foreach? or what I can do to save multiple row? $boldNumberRequest = $this->BoldNumberRequest->newEntity(); …
Devendra
  • 219
  • 2
  • 22
0
votes
0 answers

How to simplify my result in Cakephp 3

My code is: $costSheetQuery = $this->CostSheets->find('all')->where(['id IN' => $criteria]);; $costSheetData = $costSheetQuery->all(); I print the array $costSheetData and it gives me the following relust: Cake\ORM\ResultSet Object ( [items]…
Abdus Sattar Bhuiyan
  • 3,016
  • 4
  • 38
  • 72