Questions tagged [cakephp-3.0]
Questions about the 3.0.x branch of the CakePHP MVC framework. Use this tag in combination with the general [cakephp] tag.
cakephp-3.0
4,474
questions
0
votes
1
answer
69
views
Alternative to $this->requestAction in CakePHP 4
In CakePHP 4, I've facing issue on $this->requestAction
I get an error which is error: [Error] Call to undefined method App\View\AppView::requestAction()
My Code:
<?php
if(empty($newsfeed) || ...
0
votes
0
answers
31
views
Modifying belongsTo contain condition on the fly?
What I have
In my OrdersTable.php:
$this->belongsTo('OrderStatuses', [
'foreignKey' => ['order_status_id', 'language_id'],
'joinType' => 'INNER',
'className' => 'OrderStatuses',...
0
votes
0
answers
45
views
fetching result from database in specific format cakephp5
I am currently in the process of migrating from CakePHP 2.8 to CakePHP 5.x. In CakePHP 2.8, I used to retrieve results in the following format:
$this->find('all', array(
'contain' => array('...
0
votes
0
answers
45
views
CakePHP shows 500 Internal Server Error when project running locally then showing this type of error
CakePHP Version: 2.9
I Have set database in App/Config/database.php , when the project i am running locally then showing this type of error
my.htaccess file like below
<IfModule mod_rewrite.c&...
0
votes
0
answers
28
views
CakePHP authentication 3 quick start, does it actually create add.php?
Following the CakePHP authentication quick start guide, it ends with
You should now be able to go to /users/add and register a new user.
When I go to that URL, it says
The view for UsersController::...
0
votes
1
answer
27
views
Mixing values in `INSERT INTO ... SELECT` query
Say I want to insert a comment, the comments table needs a customer_id but I only have email. I do not want to select the customer in a separate query beforehand.
The INSERT INTO ... SELECT query from ...
0
votes
0
answers
25
views
Radio no return
I am creating a form where the person will need to answer a questionnaire with some questions, knowing that they will all be of the radio type, being able to select only one answer from those listed (...
-1
votes
1
answer
18
views
Where to locate code to be used by many Model->Tables. Can't find AppModel
Looking for AppModel to create a function that would be used by many different Tables.
Since AppModel doesn't seem to exist anymore, where do I put common functions for Tables, like I use ...
0
votes
0
answers
29
views
My SQL #1064 Error (Query generated in CAKEPHP 3)
Query generated by cakephp 3 but i got error #1064
INSERT INTO pows_watch_diagnosis (
pows_lead_id, lead, created, modified,
id
)
VALUES
(
'1081d669-a4db-4c54-a33f-09bf674be46e',
'a:...
0
votes
0
answers
99
views
How do I upgrade version of cakephp2.0 to cakephp3 and cakephp4 step by step?
According to the topic, I want to upgrade the cakephp2.0 version to next cakehp3.0 version.
Change version as soon as possible. I have tried but there were change all the files of project and this ...
0
votes
0
answers
38
views
cakephp user saved but the save method returns false
after working with Cakephp for a while, I never had before an issue like this, I am struggling for a few hours and I cannot understand what is happening here. I will try to explain as better as I can:
...
0
votes
0
answers
20
views
SMTP email give compact() Undefined variable: etagMatches & timeMatches error on cakephp 3 [duplicate]
I'm having problem when trying to send SMTP mail via cakephp3 with php 7.4
Notice: Notice (8): compact() [<a href='http://php.net/function.compact'>function.compact</a>]: Undefined ...
1
vote
1
answer
237
views
Cakephp 3 Missing Route issue
I am working on CakePHP 3 web application in which routes are not working for root '/'. I have gone through several questions related to this issue but the issue is not resolved.
Below is the ...
0
votes
1
answer
34
views
Applying ucwords(strtolower(name)) to form data before submitting to DB in CakePHP
Assume a user fills a form and puts his name like AndReW(Mixed lower and uppercase), I want to get this form data, convert it to a form like this Andrew, and then submit it to the database.... I dont ...
0
votes
0
answers
45
views
I want to display product information by grouping them as one in cakephp
I have a product table with id, product_name and added_date.
I want to display product_name and added_date but I have the following condition to display the results
For product_name column: if ...