Questions tagged [cakephp-3.6]

Questions about the 3.6.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.6

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

Version 3.6.0 was released in April 2018.

Resources

47 questions
2
votes
2 answers

CakePHP 3.x - Save many-to-many data

I am attempting to patchEntity with a join table, but I am unable to get it to save the associated records, and I think I have the backend code correct, but I am unsure of what the frontend code should look like... Here is the scenario, I have…
Jeffrey L. Roberts
  • 2,844
  • 5
  • 34
  • 69
2
votes
2 answers

How to tell if debug mode is on in CakePHP 3.x

I want to know how I can retrieve the var inside of the env() function... /** * Debug Level: * * Production Mode: * false: No error messages, errors, or warnings shown. * * Development Mode: * true: Errors and warnings shown. */ 'debug' =>…
Jeffrey L. Roberts
  • 2,844
  • 5
  • 34
  • 69
2
votes
0 answers

Datetime issue when switching site language CakePHP 3

I'm working on a CakePHP 3 application and the problem that I'm having right now is that I'm using the PHP date function to display dates in format like "date month year" (for example: 12 Sept 2018) like so: date('d M Y',…
user765368
  • 19,590
  • 27
  • 96
  • 167
2
votes
1 answer

CakePHP 3.6.11: Update value in table

I have this tables: customers[id, name, surname, phone, text, balance, created] service_types[id, title, price, length, is_subscription, created] customer_service_types[id, customer_id, service_type_id, price, created] When I add a new…
netdev
  • 496
  • 1
  • 5
  • 22
1
vote
0 answers

CakePHP 3.6.x CSRF Token Mismatch

I am attempting to post an AJAX request to a controller method... I have done the following per the instructions on https://book.cakephp.org/3.0/en/controllers/components/csrf.html#csrf-protection-and-ajax-requests public function beforeFilter(Event…
Jeffrey L. Roberts
  • 2,844
  • 5
  • 34
  • 69
1
vote
1 answer

'type'=> 'datetime-local' in cakephp 3.6

I'm trying to use 'type'=> 'datetime-local' in my form to create the date time picker. In the view everything works fine but cakephp can't handle the format of the result. I've tried to cast it to a Cake\I18n\Time but it ignores the set time and is…
virido
  • 41
  • 1
  • 2
1
vote
1 answer

Alternative for Recursive in CakePHP 3.6.x

In CakePHP 2.x there was the recursive setting, and depending on the setting, it would go X amount of levels deep with its queries... I took a look at the following questions, but they did not answer my question... CakePHP 3 Fetch associated data…
Jeffrey L. Roberts
  • 2,844
  • 5
  • 34
  • 69
1
vote
2 answers

Remove Trait from Parent Class

Here is the scenario I have a Login Trait... trait LoginTrait { public function login() { // some login code here } public function someOtherFunction() { // some elite code here } } I have a Base (Parent)…
Jeffrey L. Roberts
  • 2,844
  • 5
  • 34
  • 69
1
vote
1 answer

Cakephp 3.6 oauth using google-plus redirection problem

Good day Mam/Sir I would like to know why i didn't redirect to dashboard page after login using google-plus in cakephp. Everything seems fine and no error msg appears so debugging the code is very hard. During my research i found this website …
1
vote
2 answers

Values not passed from ctp file to controller in CakePHP

I have tried several solution posted in this forum and others as well but it has not helped so far. So I am posting my question finally. BTW, I am using CakePHP 3.6. I am trying to pass a variable ($product->id) via submit button in view.ctp to my…
vins
  • 449
  • 4
  • 13
1
vote
2 answers

CakePHP 3 JWT-Auth gives 401 Unauthorized error

I'm using CakePHP 3.6 and JWT Auth to enable token-based authentication in my application and frontend is written in Angular 6. My login controller is like
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
1
vote
1 answer

"'_Token' was not found in request data" with CakePHP3 on production server

I have a website made with CakePHP 3.6 that seemed to work fine on my computer (using WAMP, PHP 5.6.31, Apache 2.4.27) but has a different behaviour when put in a production server (Ubuntu 14.04, PHP 5.6.37, Apache 2.4.7). There is this one POST…
Mythique
  • 21
  • 5
0
votes
0 answers

How to integrate the SSO login in cakephp3.6.2 project?

We have set up the simplesamlphp(https://simplesamlphp.org/) for the SSO login, we have configured and it's working fine. But now we have to integrate that into our CakePHP3.6.2 project But do not have idea of how to integrate it and use it in the…
Vivek Solanki
  • 136
  • 1
  • 13
0
votes
2 answers

How to solve insecure warning after google chrome upgraded to 86

I am facing one issue on my CakePHP project. I have SSL installed into my project and it was working properly earlier. But the problem started with all the forms after google chrome upgraded to 86 stable. It is started giving insecured warning…
Fokrule
  • 844
  • 2
  • 11
  • 30
0
votes
0 answers

Access request params inside beforeFind cakePHP 3.6

I have a table object Users in a CakePHP 3.6 application that has a beforeFind callback like so: public function beforeFind(Event $event, Query $query, $options = []) { $query->where(['Users.active']); return $query; } As you can see…
user765368
  • 19,590
  • 27
  • 96
  • 167
1
2 3 4