Questions tagged [cakephp-4.x]

Questions about 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.

511 questions
0
votes
2 answers

Cakephp 4 Windows Installation Issues

I am running into composer/installation errrors on wamp64 setup on Windows 10... had this working previously on older app but now starting new app on 4.0.3 and running into dependency issues Below is output - Any thoughts on why it's not finding any…
mk97
  • 264
  • 1
  • 6
  • 15
0
votes
2 answers

CakePHP : Object of class Laminas\Diactoros\UploadedFile could not be converted to string while file upload

I am trying to upload file in cakephp version 4. I am following this docs I have tried in controller if ($this->request->is('post')) { $image = $this->request->getData('image'); $fileName = $image->getClientFilename(); …
Niloy Rony
  • 602
  • 1
  • 8
  • 23
0
votes
1 answer

cakephp 4 - Authentication component not found when bake a new controller

I cannot use cake bake, I have an error relative to the authentication component. The application use this component. What I have missed ? Here is the full log: bin/cake bake controller styles 1 ↵ Baking…
dype
  • 500
  • 1
  • 4
  • 15
0
votes
0 answers

How to retain search string when using pagination in cakephp 4?

I am using cakePHP 4 and I want to paginate my search query. I have users index page and when I search something whose resultant data exceed the defined limit of showing data. Whenever I search something I want the search string to retain in the…
vanshika
  • 1
  • 2
0
votes
0 answers

CakePHP4 / CakeDC keeps asking to login

I'm using CakePHP 4.0.4 and the latest CakeDC plugin. My configuration: Application.php class Application extends BaseApplication { public function bootstrap(): void { ... standard CakePHP code ... …
GreyRoofPigeon
  • 17,833
  • 4
  • 36
  • 59
0
votes
1 answer

Cakephp 4 : Missing Route after tried static method

I have controller called BlogsController with method home. I have created a simple route in route.php 'Blogs', 'action' => 'home']); Now in browser for localhost/cake_myapp I…
Niloy Rony
  • 602
  • 1
  • 8
  • 23
0
votes
0 answers

using LessCss in asset_compress plugin with CakePHP4

I fail to set up LessCss filter with asset_compress plugin on a new CakePHP4 app. Read the docs: https://github.com/markstory/asset_compress/wiki There are some examples on js filters and config in general, so I set up mine like…
Yevgeniy
  • 300
  • 2
  • 7
0
votes
1 answer

Cakephp 4 : How to save hasone data

I have two database table 1) users 2) profiles profiles has a field called bank_ac I am trying to save it from user model. I have created form input like Form->create($user) ?> Form->control('profile.bank_ac'); ?>
Niloy Rony
  • 602
  • 1
  • 8
  • 23
0
votes
1 answer

Execute Function With Variables from Other DB

I'm trying to execute a function with values from other DB. I'm using Framework CakePHP 4.x with 2 DB, Postgresql and MariaDB. In Controller/Programscontroller.php: use Cake\Datasource\ConnectionManager; public function pro() { $connection =…
Mawui66
  • 3
  • 1
0
votes
0 answers

CakePHP 4 Tree Behaviour manual setting left end right (JQuery ordering)

I have used the nestedSortable jQuery plugin (https://github.com/ilikenwf/nestedSortable) to order my categories with drag and drop. Every time a category is been ordered an Ajax request is going to the controller with a post of an array with the…
David
  • 11
  • 3
0
votes
1 answer

Cakephp authentication results invalid only on stateless verification

Using the authentication plugin, I'm unable to verify my credentials via json. I can use Form, Jwt and Basic(For testing it works). The error returned is 'FAILURE_CREDENTIALS_INVALID'. Here's the sample code "simplified for brevity" public function…
back2back
  • 113
  • 11
0
votes
1 answer

CakePHP 4 : CakePHP Route Url Missing Route

I am using authentication plugin for login in cakephp. application.php , configAuth() method code protected function configAuth(): \Authentication\AuthenticationService { $authenticationService = new…
Niloy Rony
  • 602
  • 1
  • 8
  • 23
0
votes
2 answers

How to create template for cakephp paginator?

I am trying to apply bootstrap 4 pagination style in cakephp paginator helper. It is looking very hard to me. This my simple html that I want to apply in paginator helper
Niloy Rony
  • 602
  • 1
  • 8
  • 23
0
votes
1 answer

CakePHP 4 Authentication Plugin RequestAuthorizationMiddleware redirect url missing

I try to use to add the RequestAuthorizationMiddleware for some controller in my application in cake 4. In the Authorization Middleware i see a code block like this: $middlewareQueue->add(new AuthorizationMiddleware($this, [ …
wiifree
  • 55
  • 1
  • 7
0
votes
0 answers

CakePHP 4 Is it possible limit result in view using Paginator helper?

I am able to limit pagination result in controller $this->paginate = ['limit'=>2]; $products = $this->paginate($this->Products); Now a scenario I need to limit result in view file.Using paginator helper is it possible to limit data in view ?
Niloy Rony
  • 602
  • 1
  • 8
  • 23