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

Cakephp 3 query string build encoded &

I'm using CakePHP 3.5 Url Helper to generate some Urls to be called using jQuery Ajax. I have the following Ajax: $(".container").on("change", "#select_box", function(){ url = 'Url->build(["controller" => "tools", "action"…
user765368
  • 19,590
  • 27
  • 96
  • 167
0
votes
2 answers

Putting a Where query condition in controller or model in CakePHP 3.5

I'm new in CakePHP 3.5. Please answer me nicely because I really need help in solving this problem or at least give an idea on how to solve this. I've read almost the same question but most of the answers they provide are already deprecated. My…
0
votes
1 answer

Cakephp model virtualFields not working

I already have some virtual fields working on my application, but this one is busting my mind. So I have the entity SubactivitySlots, with the following code: protected $_virtual = [ 'slots_text', ]; and protected function _getSlotsText(){ …
Cafn
  • 137
  • 1
  • 8
  • 26
0
votes
1 answer

Redirect to referrer not working after Login

After logging a user in, I want to redirect them back to where they came from but It's not working properly in CakePHP 3.5. Here are the required info's to help me figure out this problem. URL while login(session time…
bikash.bilz
  • 821
  • 1
  • 13
  • 33
0
votes
1 answer

Trying to get non-object cakephp 3.5

I'm new in cakephp 3.5. I just recently read the same question and I use those solutions. The problem is I tried the solution answered in the past question but it didn't display the needed attributes. view.ctp (client_transaction)
0
votes
0 answers

Routing with resources and scope does not work with mapped POST

What I have tried: Router::scope('/v1', function ($routes) { // ... $routes->resources('Auth', [ 'map' => [ 'login' => [ 'action' => 'login', 'method' => 'POST', 'path' =>…
Keval Domadia
  • 4,768
  • 1
  • 37
  • 64
0
votes
1 answer

How to merge two forms with two different models in one form in CakePHP 3.5?

I am a beginner of CakePHP and I'm using version 3.5. I really get confused by it. My problem is I want to merge two forms from 2 different models. In my case, I want to merge the client transaction add form and service detail add form all in one…
boldsinas101
  • 300
  • 2
  • 5
  • 22
0
votes
3 answers

How to get params from query object in CakePHP 3

How do I get the 'params' from a query object in CakePHP 3? $response = $this->getTable()->find(); // there are beforeFinds...etc that make this more complex When I debug the $response, I get this (: // ... '(help)' => 'This is a Query object, to…
Dave
  • 28,833
  • 23
  • 113
  • 183
0
votes
1 answer

Routing with regex in CakePHP#

I'm looking for help on setting up routes in CakePHP3.4.6 where urls are variable. For instance, I want the following urls: /California/Posts/view/Skateboard/Jan2nd/10 /Texas/Posts/view/Truck/Feb10th/35 to connect…
kiseragi
  • 15
  • 3
0
votes
0 answers

CakePHP producing MySQL error

I have the situation where I use the TableRegistry of CakePHP in a script that acts like a server. It first works, but if there was no trafic for around one day, the server still runs but once the TableRegistry is used, it produces the following…
marius
  • 1,118
  • 1
  • 18
  • 38
0
votes
1 answer

Email functionality in cakephp 3.5

I have to implement send mail functionality by using normal php not Smtp in cakephp 3.5. I have to send html testingreport.ctp that I have put under Template/Email/html. Below I have added controller and app.php code. I am getting error Transport…
0
votes
0 answers

Get count on associated in CakePHP 3

I'm using CakePHP 3.4+ I have three tables table_a table_b table_status and association are table_a hasMany table_b (table_b contain foreign key table_a_id) table_b belongsTo table_status (table_b contain foreign key table_status_id) Now, I'm…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
1 answer

Saving hasMany relation in add form in cakephp 3

I have a Shop that can have many Offers and I would like to create a new Shop and a number of Offers in the add form of the Shop. From what I read the fields should look something like this Form->control('offers.0.name', ['value' =>…
0
votes
0 answers

joins and virtualFields in cakephp 3.5

I need join and virtual field with the pagination in index.ctp. I wrote same code that is working cakephp 2.x but in cakephp 3.5 this below code is not working. when I am taking 'pdt' to under contain it's show error TestRequest is not associated…
0
votes
0 answers

cakePHP3 Form Authentication fails on identify() and manual DefaultPasswordHasher check()

I copied code from examples to create a basic login screen based on the table individuals with email and password. My AppController has this: $this->loadComponent('Auth', [ 'authenticate' => [ 'Form' => [ …
Sarah K
  • 363
  • 2
  • 15