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.
Questions tagged [cakephp-4.x]
511 questions
-1
votes
1 answer
How in jquery to get the form generated by FormHelper::postLink() with option 'block' => true in Cakephp4?
I would like to manage delete in ajax with FormHelper::postLink().
The complication is that I use the option 'block' => true :
Form->postLink('',
…

Oliv
- 236
- 3
- 12
-1
votes
1 answer
i can't authenticated in Cakephp 4 , error 500
I am trying to do an authentication through the Users CLUB but I receive an error 500 internal server, I do not understand why, it only happens to me when using the authentication.maybe is it a configuration error ?
firefox console error - GET…

G-programmer
- 119
- 5
-1
votes
1 answer
Using Authorization plugin CakePHP 4.2 Controller pointing a different model
I am stuck with this problem.
Accounts controller manage all stuff from users table. But when i invoke it, got the error
The request to *** did not apply any authorization checks
So, How can i use the Authorization Plugin in a controller without a…

Ariel Ale
- 1
- 2
-1
votes
1 answer
CAKEPHP SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cms_database.users' doesn't exist. iam using cakephp 4
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cms_database.users' doesn't exist
Could this be caused by using Auto-Tables?
Some of the Table objects in your application were created by instantiating "Cake\ORM\Table" instead of any other…
-1
votes
1 answer
Element view not working in controller in CakePHP 4.x
As on CakePHP 3.x, $this->view working properly in controller.
After migration to the CakePHP 4.x version, it doesn't seems to work. Can't find any documentation under CakeBook 4.x.
Is there any syntax changes in CakePHP 4.x for $this->view or it's…

cursorrux
- 1,382
- 4
- 9
- 20
-1
votes
1 answer
How can i parse and read the excel file in CakePHP 4?
I want to read my excel file which is xlsx formate. There are some error coming. What can I do? This is cakephp 4. And there I use SimpleXLSX class. There is my index PHP file.
index.php
Upload form
-1
votes
1 answer
Cakephp 4 cannot find my element how can i find it?
soo here i tried to call an element but i get this error:
Element file BackTheme./element/menu.php could not be found.
i would like som1 to help me to solve this

Yassine Haddaj
- 25
- 1
- 7
-1
votes
1 answer
CakePHP 4 JSON column values find or set aliases
So I noticed in the CakePHP 4 documentation their isnt a way to use find on JSON field values in a JSON mySQL column. Every time i try to explain what I'm doing it seems to get lost somewhere in translation so I'll explain what I need to…

TheSwindler44
- 177
- 1
- 10
-1
votes
1 answer
How to create a button on a cakephp table to create a new table?
Hey! I need the New Location button on the main client database table to create a new database table. How do I do that?
These tables would be the client list for each location. Each client would have a location id that would place them in the…

Peralta
- 1
- 1
-1
votes
2 answers
Using ReflectionClass in CakePHP 4.0.4
I'm trying to integrate the Playfab PHP SDK into CakePHP 4.0.4,
but Cake doesn't like the following line (included in the SDK example):
$apiReflection = new ReflectionClass("PlayFab" . $PlayFabApi . "Api");
it outputs the following error:
Class…

MiquelRoan
- 23
- 3
-1
votes
1 answer
is it possible to paginate next and previous links to load page at a specific div
Do get the question clear, to make it clear let me elaborate; what i need to achieve is that i have a page where pagination is going forward -working and when ever i paginate the page, page goes to the top of the page since it did refresh but i need…

Prabhakar Siddhant
- 129
- 3
- 15
-1
votes
2 answers
Require a solution for full screen image slide show using cakephp and foundation framework
code below is long but really straight forward only require code to put forward ability to slide from first slide to last slide to that return to first slide to traverse.

Prabhakar Siddhant
- 129
- 3
- 15
-2
votes
1 answer
The try catch catches the exception but the code after runs anyway cakephp
I'm doing policy authorization in CakePHP. For all CRUD methods, I have to test if the user has the right to execute them. So I create that method to use in all the methods:
Code in SchoolsController
private function authorize(School $s){
try{
…

Alves Gustavo
- 75
- 6
-2
votes
2 answers
How to display data from another controller in pages? CakePHP 4.x
I want to connect articles to pages but i get error last screen.

Ross
- 1
- 5
-2
votes
1 answer
What kind of Changes need to do in code to upgrade from CakePHP 3 to CakePHP 4?
How Can I update the project from CakePHP 3 to CakePHP 4?
I have tried with install latest package of CakePHP 3.8 and convert to Cakephp 4 as per upgrade guide of CakePHP 4
It is not update properly, It display error as below
Missing…

Vivek Solanki
- 136
- 1
- 13