Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last month. Improve this question how do I display cakephp query result in editable form such that it is displayed in an input form for edit.
Tag: cakephp
Enabling null on many FKs to same associated table
I have multiple fields setup as FK to the same table. The FK can also be NULL. I keep getting this error: Database structure: Column definition (ie. late_agreement_exception_outcome_recommendation_id): Column relationship (ie. late_agreement_exception_outcome_recommendation_id): ExceptionTable: FK setup to ExceptionOutcomes Edited rules attempting to enable entry of a null value for the field value: Update #1 I changed the association name like so:
CakePHP 3.9 Routing prefixes
I have the following path inside my / Scope: And on my src/Controller/UsersController.php i have api_index() But when i go to the url api/Users/index it says Controller not found, because is asking me to add another UsersController inside a subfolder named Api on Controller folder. Untill Cakephp 2.x using this behavior worked fine for me, how can i achieve the
Protocol being switched during redirects
In my CakePHP 3.10 application, the redirects are changing the protocols and breaking the app. This is being deployed to an App Service (PHP 7.4) in Azure. I’m not seeing this on another LAMP stack (RHEL, Apache 2.4, PHP 7.3, https configured) on premise. Example, logging out of the application. During inspection of the traffic (via Edge’s > Inspect >
CakePHP4 Edit doesnt update record
Version: 4.2.9 My edit view is populating my inputs with the data, but when I change them and click on save, its not saving but giving me “user has been saved” message. UsersController.php edit function my edit.php Answer Your update code is not complete, you have omitted the patchEntity method.
cakePHP use of I18 Time addMinutes function updates every related variable, not just the current instance
I’ve been trying to set start times for different flights of competitors. The addMinutes function seems to update every variable associated with the “ONE” I’m trying to alter. Is this the expected result, or am I missing something really simple? Thanks for your assistance, srcControllerTestsController.php (line 89) ‘BTIME: 9/14/21, 6:09 PM USETIME: 9/14/21, 6:09 PM’ ‘ MYTIME: 9/14/21, 6:24 PM
Checkbox HTML array syntax doesn’t work in CakePHP 4
I have an application in CakePHP 4 where I’m doing the equivalent of what’s described in Make array from checkbox form The markup I have is simple: So somebody could for example check “Service 1” and “Service 3” and omit “Service 2”, e.g. I’ve used the Form Helper in CakePHP to generate the HTML above. The code looks like this
How do I manage read and write AWS Aurora host endpoints in CakePHP?
I am working with a CakePHP based API that utilizes AWS Aurora to manage our MySQL database. The CakePHP application has many large read queries that that requires a separate Reader Endpoint to not exhaust the database resources. The way this works is that AWS gives you separate endpoints to use in the host field when you connect CakePHP to
ERROR: POST http://localhost:8765/users/delete/delete8 403 (Forbidden)
I’m using cakephp4. trying to add some sweetalert. Sweetalert is popping up when the delete button is clicked but when I click confirm for delete it’s not deleting the data. template/layout/Users/index.php template/layout/Users/index.php delete method is as follows in my UsersController.php UsersController.php Route File is here config/route.php }); Answer I am sure it’s the CSRF token. Try to replace with Also
How to upload files to S3 bucket from url directly
I am getting some MMS messages from my users. Those MMS are coming via twilio. So twilio storing those files into their server and I can visit those files from twilio. But in my case, I need to store those files into S3 and show into our system from S3. I can store those files into my local folder or