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
0
votes
1 answer

associated data in Mailer in CakePHP 3

I'm working on CakePHP 3.4 I have a contact_messages table to save message via form on website. I want to send user an email whenever a new message is saved. For that, I have created mailer class like
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
1 answer

CakePHP3: cannot display a virtual field in a Form

In a beforeMarshall(), I create an additionnal field in my entity. In my controller, I debug($myEntity) just before assigning the data to the view, and I see my field. I even created a getter like follow: protected function _getTmpImage() { if…
fralbo
  • 2,534
  • 4
  • 41
  • 73
0
votes
1 answer

Connectionmanager connect returning fatal error instead of redirect in CakePHP 3

I'm working in CakePHP 3.4 In my component, I'm checking if database connection could be installed or not. If database connection couldn't be established, redirect user to Installation plugin to setup database configuration. This is how I'm checking…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
2 answers

calling plugin's controller from AppController in CakePHP 3

I have written a plugin for CakePHP 3.4.*. This plugin will check for Database configuration has been set or not, if not then It you move user through a GUI interface to setup database configuration just like wordpress. The plugin is working…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
2 answers

create a separate database config file in CakePHP 3

I'm using CakePHP 3.4 default database settings exists in config/app.php I want to separate out or override database configuration outside app.php say in config/my_db.php and load it in bootstrap.php file. This setting will now override default…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
0 answers

Parsley server side validation response

I am using Cakephp3.4, Bootstrap, jQuery for my project. For client side validation, I am using Parsley JS. For server side validation I am relying on Cakephp validations. To save data I send Ajax request of Form data and get json response of…
karmicdice
  • 1,063
  • 9
  • 38
0
votes
1 answer

group by on associated model in CakePHP

I'm working in CakePHP 3.4 I have two models skills and skill_categories and their association are like skill_categories->hasMany('skills'); skills->belongsTo('SkillCategories', 'joinType' => 'INNER') and skills is having an association with users…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
0 answers

How to embed external images into a PDF file using CakePDF and Dompdf?

I'm using CakePHP 3.4 and CakePdf to generate pdf files using domPdf plugin. also using QrCode plugin to generate QR Code on the go. I want to use generated QR Code in my pdf file without saving them on disk. This is what I have…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
0 answers

cakephp 3.4.5 Authntication issue

I have just configured the cakephp 3.4 (by oven) . I am trying to ingrate authentication to my application, so I have configured users table, model, controller and app controller setup. But I am getting "SQLSTATE[42S02]: Base table or view not…
0
votes
1 answer

Mailer afterSave not sending email in CakePHP 3

I'm working in CakePHP 3.4 I have setup Mailer to send verification email to user after registration. /src/Mailer/UserMailer.php
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
1 answer

cakephp 3 contain same model twice with different conditions without association

I have three tables ServerScans, QueuedJobs, ReportMalware ReportMalware has a column type which contain values like mail, abc. I am querying ServerScans as $scan = $this->ServerScans->get($id, [ 'contain' => [ 'QueuedJobs', …
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
1 answer

CakePHP3.4: don't understand error saving a belongsToMany association

I try to input a belongsToMany association in a Form but a quite particular association description. Because my entity Site can use Languages for 2 different usages, I use 2 join tables. So the schema is the following Relationship …
fralbo
  • 2,534
  • 4
  • 41
  • 73
0
votes
1 answer

ajax validate specific column in cakephp 3

I'm working in CakePHP 3.4 I have a users model and columns having username, email, mobile, name and password. username, email and mobile fields are having some validation rules including all three are unique value. I'm using Ajax call on change of…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
0 answers

CakePHP 3.x remove field from validation

Is there a simple way to ignore a filed from being validated in CakePHP 3.x Controller? I know two ways: First one is specify fieldListin patchEntity second one is use validate => myCustomValidater I do not want to use none of them, is there a…
J mana
  • 11
  • 4
0
votes
2 answers

record not found on contain model in CakePHP 3

I am using CakePHP 3.4 I am retrieving information of user like $user = $this->Users->get($id, [ 'contain' => [ 'UserAddresses.States.Countries' => ['conditions' => [ 'UserAddresses.deleted' => false]], ], ]); Here,…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285