# Latest

**URL:** https://discourse.cakephp.org/latest.md?page=2

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

**Page:** 3

---

## [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 …

---

## [Clarify cache behavior affecting entity Mutators and Accessors](https://discourse.cakephp.org/t/clarify-cache-behavior-affecting-entity-mutators-and-accessors/12724)

<div class="topic-metadata">

**Author:** [@xtraPaul](https://discourse.cakephp.org/u/xtraPaul)\
**Replies:** 3\
**Last updated:** [October 15, 2025, 12:36pm UTC](https://discourse.cakephp.org/t/clarify-cache-behavior-affecting-entity-mutators-and-accessors/12724 "2025-10-15T12:36:03Z")

</div>

When I add or modify mutator methods (e.g., \_setX) in an Entity class, these changes may not be recognized immediately due to cached model metadata stored in tmp/cache/models/. This can lead to confusion and wasted devel…

---

## [Document errors](https://discourse.cakephp.org/t/document-errors/12726)

<div class="topic-metadata">

**Author:** [@phillipaldridge](https://discourse.cakephp.org/u/phillipaldridge)\
**Replies:** 1\
**Last updated:** [October 15, 2025, 11:38am UTC](https://discourse.cakephp.org/t/document-errors/12726 "2025-10-15T11:38:48Z")

</div>

Hi, in the documents book.cakephp.org I think there is an error on the page Date& Time $newTime = $time-\>subDays(5) -\>addHours(-2) -\>addMonth(1); The addMonth method should be addMonths

---

## [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…

---

## [Cake Auth Policies advice](https://discourse.cakephp.org/t/cake-auth-policies-advice/12707)

<div class="topic-metadata">

**Author:** [@met](https://discourse.cakephp.org/u/met)\
**Replies:** 1\
**Last updated:** [September 22, 2025, 12:30am UTC](https://discourse.cakephp.org/t/cake-auth-policies-advice/12707 "2025-09-22T00:30:18Z")

</div>

I’m familiar with entity policy (canAdd, canEdit) but I’m not sure how to apply canView in a (possibly) non standard case where my data isn’t an entity (or rather, has been transformed after retrieval). I have a scenari…

---

## [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…

---

## [Cakephp5 Paginate with CustomFinderOptions](https://discourse.cakephp.org/t/cakephp5-paginate-with-customfinderoptions/12706)

<div class="topic-metadata">

**Author:** [@yousuo](https://discourse.cakephp.org/u/yousuo)\
**Replies:** 2\
**Last updated:** [September 15, 2025, 8:44am UTC](https://discourse.cakephp.org/t/cakephp5-paginate-with-customfinderoptions/12706 "2025-09-15T08:44:16Z")

</div>

Hi, Based on Pagination - 5.x I couldn’t get the passed params in my finder // in my controller $customFinderOptions = \[ 'tags' =\> 'here are my tags' \]; $settings = \[ 'finder' =\> \[ 'PricesForListing' =\>…

---

## [Complex custom hasMany relationship](https://discourse.cakephp.org/t/complex-custom-hasmany-relationship/12703)

<div class="topic-metadata">

**Author:** [@Kez](https://discourse.cakephp.org/u/Kez)\
**Replies:** 0\
**Last updated:** [September 10, 2025, 10:18am UTC](https://discourse.cakephp.org/t/complex-custom-hasmany-relationship/12703 "2025-09-10T10:18:20Z")

</div>

I have a database structure like so: \> Contracts hasMany ContractsTitles \> ContractsTitles hasMany Rates \> Rates belongsTo Formats For a given Contract, I would like to know how many distinct Formats are assigned to it…

---

## [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…

---

## [Generic approach for read after write](https://discourse.cakephp.org/t/generic-approach-for-read-after-write/12683)

<div class="topic-metadata">

**Author:** [@manbor](https://discourse.cakephp.org/u/manbor)\
**Replies:** 1\
**Last updated:** [August 15, 2025, 3:31pm UTC](https://discourse.cakephp.org/t/generic-approach-for-read-after-write/12683 "2025-08-15T15:31:08Z")

</div>

CakePHP Version - 4.6.1 Application is reading data after write in multiple places. Is there any generic approach to handle this instead of specifying write role on each select query to read from write DB. @KevinPfeife…

---

## [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 …

---

## [Swagger with CakePHP 5.x](https://discourse.cakephp.org/t/swagger-with-cakephp-5-x/12605)

<div class="topic-metadata">

**Author:** [@VishalPanchal45](https://discourse.cakephp.org/u/VishalPanchal45)\
**Replies:** 2\
**Last updated:** [August 4, 2025, 12:09pm UTC](https://discourse.cakephp.org/t/swagger-with-cakephp-5-x/12605 "2025-08-04T12:09:22Z")

</div>

I am using alt3/Swagger with cakephp 4.5.9 . But now I want to upgrade cakephp to 5.x but alt3/swagger has no supported version. Please guide. Is thetre any alternative?

---

## [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…

---

## [Sitemap.xml in CakePHP 5 with incorrect http header content-type](https://discourse.cakephp.org/t/sitemap-xml-in-cakephp-5-with-incorrect-http-header-content-type/12658)

<div class="topic-metadata">

**Author:** [@hasentopf](https://discourse.cakephp.org/u/hasentopf)\
**Replies:** 4\
**Last updated:** [July 29, 2025, 12:36pm UTC](https://discourse.cakephp.org/t/sitemap-xml-in-cakephp-5-with-incorrect-http-header-content-type/12658 "2025-07-29T12:36:32Z")

</div>

Hello folks. I followed the manual description for XML Views to generate a sitemap.xml But I get an wrong content-type error: Incorrect http header content-type: “text/html; charset=UTF-8” (expected: “application/xml”…

---

## [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 …

[Previous page](https://discourse.cakephp.org/latest.md?page=1)

[Next page](https://discourse.cakephp.org/latest.md?page=3)
