# Need Help

**URL:** https://discourse.cakephp.org/c/need-help/5.md?page=1

[Latest](https://discourse.cakephp.org/latest.md) · [Categories](https://discourse.cakephp.org/categories.md) · [Tags](https://discourse.cakephp.org/tags.md)

**Page:** 2

---

## [\`$this-\>request\` vs \`$this-\>getRequest()\`](https://discourse.cakephp.org/t/this-request-vs-this-getrequest/8348)

<div class="topic-metadata">

**Author:** [@alex](https://discourse.cakephp.org/u/alex)\
**Replies:** 5\
**Last updated:** [November 2, 2025, 11:59pm UTC](https://discourse.cakephp.org/t/this-request-vs-this-getrequest/8348 "2025-11-02T23:59:51Z")

</div>

Hi everyone, I very often see people using $this-\>request, even on the (relatively) recent Stackoverflow posts (e.g. here, here). However, seeing where things have been going with the mass deprecation because of the ge…

---

## [XHR is not visible in debug kit](https://discourse.cakephp.org/t/xhr-is-not-visible-in-debug-kit/12736)

<div class="topic-metadata">

**Author:** [@shadowx.jb](https://discourse.cakephp.org/u/shadowx.jb)\
**Replies:** 3\
**Last updated:** [November 2, 2025, 8:55am UTC](https://discourse.cakephp.org/t/xhr-is-not-visible-in-debug-kit/12736 "2025-11-02T08:55:29Z")

</div>

I use PHP CAKE 5, and vanilla js, ajax loading example: try { const response = await fetch(url, { headers: { 'X-Requested-With': 'XMLHttpRequest' }, credentials: 'same…

---

## [Change a Field label](https://discourse.cakephp.org/t/change-a-field-label/12734)

<div class="topic-metadata">

**Author:** [@bgrinter](https://discourse.cakephp.org/u/bgrinter)\
**Replies:** 1\
**Last updated:** [October 28, 2025, 12:18am UTC](https://discourse.cakephp.org/t/change-a-field-label/12734 "2025-10-28T00:18:01Z")

</div>

I have fields in a model “first\_name” and “last\_name”. I’ve been asked to change these to “Given Name” and “Family Name”. This is a big app - can I set an alias in the model for a label, or do I need to update all the vi…

---

## [Chainable fixture factory scenarios?](https://discourse.cakephp.org/t/chainable-fixture-factory-scenarios/12732)

<div class="topic-metadata">

**Author:** [@Zuluru](https://discourse.cakephp.org/u/Zuluru)\
**Replies:** 3\
**Last updated:** [October 23, 2025, 3:56pm UTC](https://discourse.cakephp.org/t/chainable-fixture-factory-scenarios/12732 "2025-10-23T15:56:27Z")

</div>

I use the Fixture Factories all the time. A lot of my data is quite hierarchically nested, with hasMany relations, and I need to make deeply nested collections of records, like an A with 6 B’s, each of which have 1 or 2 …

---

## [CakePHP in a non standard port](https://discourse.cakephp.org/t/cakephp-in-a-non-standard-port/12725)

<div class="topic-metadata">

**Author:** [@dcoturel](https://discourse.cakephp.org/u/dcoturel)\
**Replies:** 4\
**Last updated:** [October 16, 2025, 6:47am UTC](https://discourse.cakephp.org/t/cakephp-in-a-non-standard-port/12725 "2025-10-16T06:47:49Z")

</div>

Hi! I have a CakePHP 4 app developed and running in several onpremises customers. In one of those, they provided me a public location consisting of an URL and a non standard port: https://application.domain.com:8091 T…

---

## [How do I upgrade cake php from 2.8.3 to the version 5](https://discourse.cakephp.org/t/how-do-i-upgrade-cake-php-from-2-8-3-to-the-version-5/12727)

<div class="topic-metadata">

**Author:** [@kovarex](https://discourse.cakephp.org/u/kovarex)\
**Replies:** 5\
**Last updated:** [October 15, 2025, 5:32pm UTC](https://discourse.cakephp.org/t/how-do-i-upgrade-cake-php-from-2-8-3-to-the-version-5/12727 "2025-10-15T17:32:49Z")

</div>

Hello, I’m trying to migrate page using cake php to a new server, which is also using up to date version of php. Based on the error messages and search, it seems like I can’t use 2.8.3 version anymore as it won’t work …

---

## [Errors trying build an application using CakePHP 5.x](https://discourse.cakephp.org/t/errors-trying-build-an-application-using-cakephp-5-x/12619)

<div class="topic-metadata">

**Author:** [@ferretti.abel](https://discourse.cakephp.org/u/ferretti.abel)\
**Replies:** 7\
**Last updated:** [October 15, 2025, 1:50pm UTC](https://discourse.cakephp.org/t/errors-trying-build-an-application-using-cakephp-5-x/12619 "2025-10-15T13:50:34Z")

</div>

Hi everybody. I’m trying to build an application using CakePHP 5.x and I’m having trouble. I’m getting a lot of error messages, such as: “Could not find package cakephp/app with stability stable.” using command: comp…

---

## [My page is requiring login when it didn't previously](https://discourse.cakephp.org/t/my-page-is-requiring-login-when-it-didnt-previously/12704)

<div class="topic-metadata">

**Author:** [@SharonGilmore](https://discourse.cakephp.org/u/SharonGilmore)\
**Replies:** 2\
**Last updated:** [October 15, 2025, 12:45pm UTC](https://discourse.cakephp.org/t/my-page-is-requiring-login-when-it-didnt-previously/12704 "2025-10-15T12:45:09Z")

</div>

I created a site in CakePHP 5 a couple of years ago, and a couple of weeks ago my client reported that “one of the pages in the admin area isn’t working”. They last accessed it a year ago and it was ok then. The admin …

---

## [EntityTable: Reference interface, not implementation?](https://discourse.cakephp.org/t/entitytable-reference-interface-not-implementation/12713)

<div class="topic-metadata">

**Author:** [@Schroeder](https://discourse.cakephp.org/u/Schroeder)\
**Replies:** 7\
**Last updated:** [October 10, 2025, 12:13pm UTC](https://discourse.cakephp.org/t/entitytable-reference-interface-not-implementation/12713 "2025-10-10T12:13:38Z")

</div>

Hello, New to CakePHP 5 and I have some questions regarding the conventions (I suppose): I have a class Model/InvoicesTable which currently reads rows from an Excel spreadsheet. My boss communicated to me that the data…

---

## [cakePHP 5: Dependency Injection - Inject existing service into Component](https://discourse.cakephp.org/t/cakephp-5-dependency-injection-inject-existing-service-into-component/12721)

<div class="topic-metadata">

**Author:** [@der-dave](https://discourse.cakephp.org/u/der-dave)\
**Replies:** 9\
**Last updated:** [October 3, 2025, 12:27pm UTC](https://discourse.cakephp.org/t/cakephp-5-dependency-injection-inject-existing-service-into-component/12721 "2025-10-03T12:27:20Z")

</div>

Hi there, I an using cakePHP 5.2.7. and registred in my Application.php a service: $container -\>add(GenericProvider::class, function () { return new GenericProvider(\[ 'clientId' =\>…

---

## [Saving float number to MariaDB get strange rounded number](https://discourse.cakephp.org/t/saving-float-number-to-mariadb-get-strange-rounded-number/12722)

<div class="topic-metadata">

**Author:** [@general2000vn](https://discourse.cakephp.org/u/general2000vn)\
**Replies:** 3\
**Last updated:** [October 1, 2025, 5:55pm UTC](https://discourse.cakephp.org/t/saving-float-number-to-mariadb-get-strange-rounded-number/12722 "2025-10-01T17:55:40Z")

</div>

HI all, I have a model value that is caculated as: 36,758,816 However, whenever I save that number to MariaDB , it get rounded to: 36,758,800 I have checked and there is no other place in my code manipulate that numbe…

---

## [Does patchEntity support multiple \_joinData for same associations?](https://discourse.cakephp.org/t/does-patchentity-support-multiple-joindata-for-same-associations/12716)

<div class="topic-metadata">

**Author:** [@Massive](https://discourse.cakephp.org/u/Massive)\
**Replies:** 2\
**Last updated:** [October 1, 2025, 8:48am UTC](https://discourse.cakephp.org/t/does-patchentity-support-multiple-joindata-for-same-associations/12716 "2025-10-01T08:48:42Z")

</div>

POSTing data as per example in the book works fine for a single association to the same record, but not multiple. Let’s say, that you want to save multiple records for same student and course $data = \[ 'first\_name…

---

## [Check login on all pages](https://discourse.cakephp.org/t/check-login-on-all-pages/12715)

<div class="topic-metadata">

**Author:** [@efjot](https://discourse.cakephp.org/u/efjot)\
**Replies:** 1\
**Last updated:** [September 29, 2025, 7:01am UTC](https://discourse.cakephp.org/t/check-login-on-all-pages/12715 "2025-09-29T07:01:27Z")

</div>

Hi, I have a question. I set up a separate admin area for my app. It is on separate URL, so completely new code project. All works fine for now, but…. I would like to check access to all pages except the login and logou…

---

## [Cakephp 5 timezone configuration](https://discourse.cakephp.org/t/cakephp-5-timezone-configuration/12714)

<div class="topic-metadata">

**Author:** [@koepper](https://discourse.cakephp.org/u/koepper)\
**Replies:** 1\
**Last updated:** [September 23, 2025, 2:38pm UTC](https://discourse.cakephp.org/t/cakephp-5-timezone-configuration/12714 "2025-09-23T14:38:46Z")

</div>

I have created a cakephp 5 app with a mysql database running in UTC time. I want all datetime fields in the database in UTC. But the user resides in the timezone Europe/Paris. So I show all datetime values via the i18nFo…

---

## [Run SQL in Migration to manupulate data?](https://discourse.cakephp.org/t/run-sql-in-migration-to-manupulate-data/12702)

<div class="topic-metadata">

**Author:** [@general2000vn](https://discourse.cakephp.org/u/general2000vn)\
**Replies:** 3\
**Last updated:** [September 16, 2025, 1:27am UTC](https://discourse.cakephp.org/t/run-sql-in-migration-to-manupulate-data/12702 "2025-09-16T01:27:56Z")

</div>

Hello everyone. I have a table which has 1 column name type (varchar 25), now I am writing Migration, adding another column named type\_id (int). What I also want is migration automatically add value for existing data b…

---

## [Controller on other pages, cell?](https://discourse.cakephp.org/t/controller-on-other-pages-cell/12705)

<div class="topic-metadata">

**Author:** [@shadowx.jb](https://discourse.cakephp.org/u/shadowx.jb)\
**Replies:** 5\
**Last updated:** [September 15, 2025, 3:19pm UTC](https://discourse.cakephp.org/t/controller-on-other-pages-cell/12705 "2025-09-15T15:19:40Z")

</div>

What is the best solution when I have a controller linked to a form… so if I insert the form on any page, the route no longer matches the controller. I would like to display ApplicationsController.php on the route /cont…

---

## [Unauthorized access redirect to URL without App.base value](https://discourse.cakephp.org/t/unauthorized-access-redirect-to-url-without-app-base-value/12697)

<div class="topic-metadata">

**Author:** [@ken.s](https://discourse.cakephp.org/u/ken.s)\
**Replies:** 5\
**Last updated:** [September 10, 2025, 4:53am UTC](https://discourse.cakephp.org/t/unauthorized-access-redirect-to-url-without-app-base-value/12697 "2025-09-10T04:53:30Z")

</div>

Hello. I setup my app in a subdirectory, say it’s ‘/my\_app’. The authentication and authorization are working well except unauthorized page direction. I want to show a message so that a user can see the message saying …

---

## [CakePHP 5 - Run Authorization checks on user against a secondary table?](https://discourse.cakephp.org/t/cakephp-5-run-authorization-checks-on-user-against-a-secondary-table/12180)

<div class="topic-metadata">

**Author:** [@BrendonKoz](https://discourse.cakephp.org/u/BrendonKoz)\
**Replies:** 6\
**Last updated:** [September 8, 2025, 5:22pm UTC](https://discourse.cakephp.org/t/cakephp-5-run-authorization-checks-on-user-against-a-secondary-table/12180 "2025-09-08T17:22:23Z")

</div>

I’m feeling rather deflated and defeated at the moment. I presume my problem is quite simplistic to solve in its nature, but am still stuck. I am attempting to upgrade a CakePHP v2 application to v5. The “upgrade” proces…

---

## [Identity from Custom Authentication](https://discourse.cakephp.org/t/identity-from-custom-authentication/12694)

<div class="topic-metadata">

**Author:** [@Jim.Lohiser](https://discourse.cakephp.org/u/Jim.Lohiser)\
**Replies:** 8\
**Last updated:** [September 4, 2025, 8:25pm UTC](https://discourse.cakephp.org/t/identity-from-custom-authentication/12694 "2025-09-04T20:25:16Z")

</div>

Hello everyone. I am hoping someone can point me in the right direction. I am working on migrating a project from CakePHP 3 to CakePHP 5. The old project used a custom Auth component and I am struggling to migrate this t…

---

## [Generate multiple PDFs](https://discourse.cakephp.org/t/generate-multiple-pdfs/12693)

<div class="topic-metadata">

**Author:** [@bgrinter](https://discourse.cakephp.org/u/bgrinter)\
**Replies:** 1\
**Last updated:** [August 30, 2025, 8:38am UTC](https://discourse.cakephp.org/t/generate-multiple-pdfs/12693 "2025-08-30T08:38:33Z")

</div>

In CakePHP2 we had an form that would print multiple PDFs for a list of people The form had a few fields to complete and a list of members, when you checked a member and ran the form, it would generate individual PDFs. …

---

## [Cake\\ORM\\Marshaller::\_mergeAssociation(): Argument #1 ($original) must be of type Cake\\Datasource\\EntityInterface|array|null, int given,](https://discourse.cakephp.org/t/cake-orm-marshaller-mergeassociation-argument-1-original-must-be-of-type-cake-datasource-entityinterface-array-null-int-given/12632)

<div class="topic-metadata">

**Author:** [@smoeckel](https://discourse.cakephp.org/u/smoeckel)\
**Replies:** 10\
**Last updated:** [August 24, 2025, 8:07am UTC](https://discourse.cakephp.org/t/cake-orm-marshaller-mergeassociation-argument-1-original-must-be-of-type-cake-datasource-entityinterface-array-null-int-given/12632 "2025-08-24T08:07:45Z")

</div>

Tried to post more details. Forum response was: An error occurred: Sorry, new users can only mention 2 users in a post. Version: 5.2.5 Same code works in Version: 4.5.8 This is not a migration, clean install. I have s…

---

## [Is it possible for CakePHP to use 2 separate tables for reading/writing?](https://discourse.cakephp.org/t/is-it-possible-for-cakephp-to-use-2-separate-tables-for-reading-writing/7381)

<div class="topic-metadata">

**Author:** [@akkaweb](https://discourse.cakephp.org/u/akkaweb)\
**Replies:** 2\
**Last updated:** [August 14, 2025, 12:09pm UTC](https://discourse.cakephp.org/t/is-it-possible-for-cakephp-to-use-2-separate-tables-for-reading-writing/7381 "2025-08-14T12:09:40Z")

</div>

I have an API written using CakePHP and one of the tables contain data for AppUsers. The request is to place the AppUsers table into a separate database but somehow maintain the App working as it is one Database. I need …

---

## [How to replace loadIdentifier() in Authenticator 3.3.0 to add a field in Authentication with AuthenticationService](https://discourse.cakephp.org/t/how-to-replace-loadidentifier-in-authenticator-3-3-0-to-add-a-field-in-authentication-with-authenticationservice/12666)

<div class="topic-metadata">

**Author:** [@hasentopf](https://discourse.cakephp.org/u/hasentopf)\
**Replies:** 4\
**Last updated:** [August 1, 2025, 11:33am UTC](https://discourse.cakephp.org/t/how-to-replace-loadidentifier-in-authenticator-3-3-0-to-add-a-field-in-authentication-with-authenticationservice/12666 "2025-08-01T11:33:23Z")

</div>

Hello all! This is my current implementation to check beside Username and Password that the User is enabled: src/Model/Table/UsersTable.php: /\*\* \* Add the 'enabled' fields in authentication with Authenticatio…

---

## [Upgrade from 3.\* to 4: stuck between PHP versions](https://discourse.cakephp.org/t/upgrade-from-3-to-4-stuck-between-php-versions/12659)

<div class="topic-metadata">

**Author:** [@bankai](https://discourse.cakephp.org/u/bankai)\
**Replies:** 1\
**Last updated:** [July 29, 2025, 6:27am UTC](https://discourse.cakephp.org/t/upgrade-from-3-to-4-stuck-between-php-versions/12659 "2025-07-29T06:27:32Z")

</div>

I am (finally) upgrading an old CakePHP 3.\* project to something more recent. I have installed PHP 7.4, 8.2 and 8.4 on my system. I managed to get the project to CakePHP 3.10, but the upgrade to 4.0 fails because PHP is …

---

## [Backed Enums in CakePHP 4.6](https://discourse.cakephp.org/t/backed-enums-in-cakephp-4-6/12655)

<div class="topic-metadata">

**Author:** [@perseus](https://discourse.cakephp.org/u/perseus)\
**Replies:** 1\
**Last updated:** [July 25, 2025, 4:25am UTC](https://discourse.cakephp.org/t/backed-enums-in-cakephp-4-6/12655 "2025-07-25T04:25:24Z")

</div>

I want to use backed enums in my CakePHP project like so: enum ArticleStatus: int { case DRAFT = 1; case PUBLISHED = 2; } $article = $this-\>Articles-\>find()-\>where(\['status' =\> ArticleStatus::DRAFT\])-\>first();…

---

## [CakePHP 5 Custom Routing Issue with Paginator Links](https://discourse.cakephp.org/t/cakephp-5-custom-routing-issue-with-paginator-links/12649)

<div class="topic-metadata">

**Author:** [@hasentopf](https://discourse.cakephp.org/u/hasentopf)\
**Replies:** 2\
**Last updated:** [July 22, 2025, 12:49pm UTC](https://discourse.cakephp.org/t/cakephp-5-custom-routing-issue-with-paginator-links/12649 "2025-07-22T12:49:14Z")

</div>

Hello everyone. I want to create a custom (SEO-friendly) routing for a multi-language web app. The original route looks like this: /institutions/category/3/example-entry I want to add the current language and change i…

---

## [SMTP Error: 454 4.7.1](https://discourse.cakephp.org/t/smtp-error-454-4-7-1/12650)

<div class="topic-metadata">

**Author:** [@Klaus](https://discourse.cakephp.org/u/Klaus)\
**Replies:** 3\
**Last updated:** [July 22, 2025, 12:00pm UTC](https://discourse.cakephp.org/t/smtp-error-454-4-7-1/12650 "2025-07-22T12:00:26Z")

</div>

Hi, could someone please help out? My cake 4.5.3 application is delivering mails. Some addresses are processed but some are not delivered and I have no glew why. In the error-log I see a SmtpTransport problem. The f…

---

## [Saving data with join table](https://discourse.cakephp.org/t/saving-data-with-join-table/12584)

<div class="topic-metadata">

**Author:** [@efjot](https://discourse.cakephp.org/u/efjot)\
**Replies:** 3\
**Last updated:** [July 16, 2025, 5:02am UTC](https://discourse.cakephp.org/t/saving-data-with-join-table/12584 "2025-07-16T05:02:55Z")

</div>

I saw several threads here with the same question but no one helped me. I try to save data in an object with jointable. First object is a worker And the worker has many PLZ $this-\>belongsToMany('PLZ', \[ '…

---

## [Many Tables with the same schema](https://discourse.cakephp.org/t/many-tables-with-the-same-schema/12622)

<div class="topic-metadata">

**Author:** [@deanoj](https://discourse.cakephp.org/u/deanoj)\
**Replies:** 4\
**Last updated:** [July 15, 2025, 8:12am UTC](https://discourse.cakephp.org/t/many-tables-with-the-same-schema/12622 "2025-07-15T08:12:17Z")

</div>

I have a need to have many tables, all with the same schema. Imagine many Customers, and each Customer has Products - lots of them - far too many to put in a single table. What I want to avoid is having to bake a lot of…

---

## [I am Confused About CakePHP Routing – Can Someone Explain?](https://discourse.cakephp.org/t/i-am-confused-about-cakephp-routing-can-someone-explain/12615)

<div class="topic-metadata">

**Author:** [@mitasali](https://discourse.cakephp.org/u/mitasali)\
**Replies:** 1\
**Last updated:** [July 9, 2025, 10:40am UTC](https://discourse.cakephp.org/t/i-am-confused-about-cakephp-routing-can-someone-explain/12615 "2025-07-09T10:40:29Z")

</div>

Hey everyone, I am still pretty new to CakePHP & stuck trying to set up some custom routes. I am working with CakePHP 4.x & want to create a URL such as /blog/category/tech that goes to a category() method inside my Pos…

[Previous page](https://discourse.cakephp.org/c/need-help/5.md)

[Next page](https://discourse.cakephp.org/c/need-help/5.md?page=2)
