Skip to content

Commit 44bd63a

Browse files
committed
Merge branch 'main' into perf/autosave-form-state
2 parents 0cb77d1 + 5e433aa commit 44bd63a

File tree

267 files changed

+1593
-529
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

267 files changed

+1593
-529
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,5 +331,7 @@ test/databaseAdapter.js
331331
test/.localstack
332332
test/google-cloud-storage
333333
test/azurestoragedata/
334+
/media-without-delete-access
335+
334336

335337
licenses.csv

docs/configuration/collections.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ The following options are available:
141141
| `livePreview` | Enable real-time editing for instant visual feedback of your front-end application. [More details](../live-preview/overview). |
142142
| `components` | Swap in your own React components to be used within this Collection. [More details](#custom-components). |
143143
| `listSearchableFields` | Specify which fields should be searched in the List search view. [More details](#list-searchable-fields). |
144-
| `pagination` | Set pagination-specific options for this Collection. [More details](#pagination). |
144+
| `pagination` | Set pagination-specific options for this Collection in the List View. [More details](#pagination). |
145145
| `baseFilter` | Defines a default base filter which will be applied to the List View (along with any other filters applied by the user) and internal links in Lexical Editor, |
146146

147147
<Banner type="warning">

docs/custom-components/custom-views.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export function MyCustomView(props: AdminViewServerProps) {
158158

159159
<Banner type="success">
160160
**Tip:** For consistent layout and navigation, you may want to wrap your
161-
Custom View with one of the built-in [Template](./overview#templates).
161+
Custom View with one of the built-in [Templates](./overview#templates).
162162
</Banner>
163163

164164
### View Templates

docs/database/indexes.mdx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,22 @@ export const MyCollection: CollectionConfig = {
6363
],
6464
}
6565
```
66+
## Localized fields and MongoDB indexes
67+
68+
When you set `index: true` or `unique: true` on a localized field, MongoDB creates one index **per locale path** (e.g., `slug.en`, `slug.da-dk`, etc.). With many locales and indexed fields, this can quickly approach MongoDB's per-collection index limit.
69+
70+
If you know you'll query specifically by a locale, index only those locale paths using the collection-level `indexes` option instead of setting `index: true` on the localized field. This approach gives you more control and helps avoid unnecessary indexes.
71+
72+
```ts
73+
import type { CollectionConfig } from 'payload'
74+
75+
export const Pages: CollectionConfig = {
76+
fields: [{ name: 'slug', type: 'text', localized: true }],
77+
indexes: [
78+
// Index English slug only (rather than all locales)
79+
{ fields: ['slug.en'] },
80+
// You could also make it unique:
81+
// { fields: ['slug.en'], unique: true },
82+
],
83+
}
84+
```

docs/database/mongodb.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,21 +60,21 @@ You can access Mongoose models as follows:
6060

6161
## Using other MongoDB implementations
6262

63-
You can import the `compatabilityOptions` object to get the recommended settings for other MongoDB implementations. Since these databases aren't officially supported by payload, you may still encounter issues even with these settings (please create an issue or PR if you believe these options should be updated):
63+
You can import the `compatibilityOptions` object to get the recommended settings for other MongoDB implementations. Since these databases aren't officially supported by payload, you may still encounter issues even with these settings (please create an issue or PR if you believe these options should be updated):
6464

6565
```ts
66-
import { mongooseAdapter, compatabilityOptions } from '@payloadcms/db-mongodb'
66+
import { mongooseAdapter, compatibilityOptions } from '@payloadcms/db-mongodb'
6767

6868
export default buildConfig({
6969
db: mongooseAdapter({
7070
url: process.env.DATABASE_URI,
7171
// For example, if you're using firestore:
72-
...compatabilityOptions.firestore,
72+
...compatibilityOptions.firestore,
7373
}),
7474
})
7575
```
7676

77-
We export compatability options for [DocumentDB](https://aws.amazon.com/documentdb/), [Azure Cosmos DB](https://azure.microsoft.com/en-us/products/cosmos-db) and [Firestore](https://cloud.google.com/firestore/mongodb-compatibility/docs/overview). Known limitations:
77+
We export compatibility options for [DocumentDB](https://aws.amazon.com/documentdb/), [Azure Cosmos DB](https://azure.microsoft.com/en-us/products/cosmos-db) and [Firestore](https://cloud.google.com/firestore/mongodb-compatibility/docs/overview). Known limitations:
7878

7979
- Azure Cosmos DB does not support transactions that update two or more documents in different collections, which is a common case when using Payload (via hooks).
8080
- Azure Cosmos DB the root config property `indexSortableFields` must be set to `true`.

docs/local-api/overview.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@ const result = await payload.find({
162162
})
163163
```
164164

165+
<Banner type="info">
166+
`pagination`, `page`, and `limit` are three related properties [documented
167+
here](/docs/queries/pagination).
168+
</Banner>
169+
165170
### Find by ID#collection-find-by-id
166171

167172
```js

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "payload-monorepo",
3-
"version": "3.51.0",
3+
"version": "3.52.0",
44
"private": true,
55
"type": "module",
66
"workspaces": [

packages/admin-bar/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@payloadcms/admin-bar",
3-
"version": "3.51.0",
3+
"version": "3.52.0",
44
"description": "An admin bar for React apps using Payload",
55
"homepage": "https://payloadcms.com",
66
"repository": {

packages/create-payload-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-payload-app",
3-
"version": "3.51.0",
3+
"version": "3.52.0",
44
"homepage": "https://payloadcms.com",
55
"repository": {
66
"type": "git",

packages/db-mongodb/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@payloadcms/db-mongodb",
3-
"version": "3.51.0",
3+
"version": "3.52.0",
44
"description": "The officially supported MongoDB database adapter for Payload",
55
"homepage": "https://payloadcms.com",
66
"repository": {

0 commit comments

Comments
 (0)