86 questions
0
votes
0
answers
50
views
How to update a large number of mongodb documents in a tree structure?
I'm using mongo db with payloadcms and I have tree like structure.
We have a collection called nodes. A node have children as array and a parent id.
Now I want to change the node status like marking ...
0
votes
0
answers
37
views
How to fix DrizzleQueryError when deploying Payload Website Starter one click deployment?
I am getting this below error when using one click vercel payload deployment.
https://vercel.com/templates/next.js/payload-website-starter
All the connection strings are added properly(automatically).
...
1
vote
1
answer
73
views
Payload CMS: Internal links are not rendered correctly
i am trying to save my Lexical richText field to a lexicalHTMLField inside a payload CMS Block, but my links are not rendered correctly. All internal links are just shown as <a href="#"&...
0
votes
0
answers
42
views
Add Custom Ordered List to PayloadCMS RTE
My previous post was being closed by its own, though it's still not solving my problem
HERE
the current RTE toolbar already provide a numerical ordered list, and I want to add more (alphabetical and ...
0
votes
0
answers
75
views
Custom Toolbar in PayloadCMS RTE
I would need some help regarding creating a custom toolbar for PayloadCMS RTE.
The current version is PayloadCMS 3.49.1, and linked with @payloadcms/richtext-lexical version of 0.28.0.
My goal is to ...
2
votes
0
answers
96
views
Payload CMS - i18n not working for REST API error messages
I'm using Payload CMS with a Next.JS frontend and axios for fetching data via the provided REST API. I need i18n support for the content as well as the interface, e.g. error and validation messages.
...
0
votes
0
answers
61
views
Payload's 'first-register' Endpoint Returning 404 When Using Non-Default Collection
I've set up a payload app with two auth enabled collections - admin and students. Admin is specified in payload.config.ts as being the collection with admin panel access as shown here:
admin: {
...
0
votes
0
answers
104
views
Looking for an example of Payload 3.47 running without NextJS, if that's standard, or to know if it's non-standard
I'm new to Payload CMS, and I'm trying to use it headless. IDK what's true right now, but ChatGPT is telling me that to use Payload headless in a mono-repo with backend and frontend totally separate ...
0
votes
0
answers
42
views
Weird dropdown field at `/create-first-user` screen
I have a typical relationship between Users and Posts
Users:
export const Users: CollectionConfig = {
slug: 'users',
admin: {
useAsTitle: 'email',
},
auth: true,
fields: [
{
...
1
vote
0
answers
227
views
Can't seem to generate payloadcms types or importmaps
I'm using payloadcms in a project but i'm having issues generating types and importmaps. It says its conflicting with css files used in @payloadcms/ui.
node:internal/process/promises:394
...
0
votes
0
answers
37
views
How to mutate a nested object in the beforeChange hook in a collection?
I'm trying to mutate a nested object in the beforeChange hook of a Payload CMS collection definition:
const newContent = structuredClone(props.data.content);
const newData = await props.req.payload({....
0
votes
0
answers
47
views
Payload V2 custom view components
I'm developing with Payload a customized views inside the admin panel.
views: {
SupervisorView: {
Component: SupervisorPage,
path: '/supervisor-list',
exact: true,
},
},
I found ...
0
votes
1
answer
232
views
Payload CMS UI fields with i18n, does not accept translate function
I am trying to add payloadcms/translations from payload to my cms written with payload cms and next,
"@payloadcms/translations": "^3.42.0",
"@payloadcms/ui": &...
1
vote
0
answers
42
views
Error: cannot connect to Postgres Docker build Generating static pages (2/11)
I'm trying to build my app with Docker. All processes look pretty fine, but in the last stage, while NextJS is building static pages, an error happens "errno": -111, "code": "...
0
votes
1
answer
137
views
Missing props, on Field component payload cms
I am trying to render an url field that users can change, and next to it a custom component that will display the currently selected image.
The issue appears on the edit view for the elements on the ...
0
votes
2
answers
179
views
How to set up an HTML view?
I'm working with Payload CMS integrated in a Next.js app.
Currently there is a field with the following structure:
{
name: 'content',
type: 'richText',
editor: lexicalEditor({
features: ({ ...
2
votes
1
answer
1k
views
How to solve this build error in payloadcms
still very new to payload, this is my first project in it. when I try to build my payloadcms app that was based on the blank template I get this:
I tried looking online but I could not find any answer ...
2
votes
1
answer
2k
views
Whenever i am trying to run payload generate:types i get the error Cannot find Users module [closed]
i tried running yarn payload generate type from my terminal to generate types for my new collection but i keep running into this error my Users collection file is intact but for some reasons it is ...
0
votes
1
answer
48
views
How can I combine Cloudinary colour extraction and AWS Rekognition auto-tagging in my Payload CMS media uploads?
I’m using Payload CMS (v3.35.1) with a Next.js frontend and PostgreSQL on Render. I'm trying to fully integrate Cloudinary for media uploads using @jhb.software/payload-cloudinary-plugin.
I’ve gone ...
0
votes
3
answers
49
views
How to define prop as one of an array of objects, defined in generated interface
Payload CMS has generated this interface for me:
export interface Page {
id: number;
Title?: string | null;
slug?: string | null;
slugLock?: boolean | null;
sections?:
| (
| {
...
0
votes
0
answers
142
views
How to use Paylaod CMS Jobs Queue
I am new to Paylaod CMS & trying to use Jobs Queue, just trying to send email every minute and testing on local machine.
Here is my payload.config.ts:
export default buildConfig({
jobs: ...
2
votes
1
answer
498
views
How to show meaningful error message on PayloadCMS when validating page save?
I want to validate on PayloadCMS page beforeSave action:
On page I call the revalidateDarkPage hook:
hooks: {
beforeChange: [revalidateDarkPage],
},
here is the custom hook
export const ...
2
votes
1
answer
140
views
Is it possible to write a typeguard for an arbitrary amount of generic types?
In payload CMS, polymorphic relationship many fields have a type like the following:
interface TypeA { a: 1 }
interface TypeB { b: 2 }
interface TypeC { c: 3 }
type Example = {
items:
| (
...
1
vote
1
answer
486
views
How do I create sub folders/directories with PayloadCMS media uploads and the Vercel blob storage?
Here is my current media collection config:
import type { CollectionConfig } from "payload";
export const Media: CollectionConfig = {
slug: "media",
...
access: {
read: () ...
0
votes
0
answers
28
views
My Payload CMS collection is converting data correctly to desired format before save on MongoDB, but not saving as required
My below payload cms collection named Queries is converting data to desired format correctly before saving... (Checked in console.log)... but it's not saving as required in MongoDB...
e.g. it console....
0
votes
1
answer
69
views
Why do I get a localhost URL in response to video upload?
import { CollectionConfig } from 'payload'
import { GetVideoUrl, VideoReward } from '@/endpoints/video.rewards'
export const Videos: CollectionConfig = { //this is video collection
slug: 'videos',
...
0
votes
0
answers
47
views
Payload CMS admin app how to use quill editor?
I using payload cms with next.js. I had a form and add a richText field. When I use the richText, I didn't use some features. For example, change font size, text color etc. I will make the custom ...
-1
votes
1
answer
833
views
TypeError: Cannot destructure property 'auth' of 'undefined' as it is undefined
I'm running a next.js site with Payload CMS backend and am having some issues. Can anyone help with why this auth destructuring issue is occurring?
I see that auth is related to the JTW identification ...
0
votes
1
answer
236
views
Payload CMS Docker build error: failed to solve: archive/tar: unknown file mode ?rwxr-xr-x
I am trying to deploy my Payload CMS app to Azure App Service as a container using Docker but I am facing issues with docker build command. I am trying to deploy the basic website template with no ...
1
vote
1
answer
565
views
How to upload file using Payload CMS REST API
I am working with playload cms & trying to create a doc in collection with a file, following this payload documentation article https://payloadcms.com/docs/upload/overview#uploading-files
...
2
votes
3
answers
1k
views
Issues integrating S3Storage plugin in PayloadCMS
Been busy trying to setup payload in my application but ran into a roadblock with the S3Storage plugin and I'm at a loss to figure out why this doesn't work with my application but it does work with a ...
1
vote
1
answer
138
views
How to remove error message "Type 'FC<{ path: string; }>' is not assignable to type '(CustomComponent & PayloadComponent<FieldClientComponent)"
I'm new to TypeScript and converting my site from WordPress to Payload and I'm getting an error code that I can't find anywhere to fix. The code works but I would like to have the error message go ...
1
vote
0
answers
210
views
Payload CMS on Next.js 15 (Serverless, Vercel) Exceeding MongoDB Atlas M2 Connection Limits
I am using Payload CMS (v3.20.0) with Next.js 15, deployed on Vercel (serverless runtime), and using MongoDB Atlas (M2 cluster) as my database.
Problem
Each time I refresh my home page, I receive the ...
-1
votes
1
answer
114
views
Payloadcms v3 custom endpoint wildcard bug
Hey I am migrating to v3 rn.
Im having issues with the custom endpoints.
previously i could use path: '/find-by-path/*'.
So i had a wildcard in the end of my path that i could use to capture the rest ...
0
votes
1
answer
81
views
Payload: Access<TData> how do I get TData from Users collection?
Hey i am migrating from v2 to v3 rn.
I have a access function that needs to validate based of field value of user.
This is the old v2 code:
export function roleAccess(slug: Slug, type: Type): Access&...
0
votes
0
answers
737
views
In Payload CMS, how can I have the defaultValue of a field be assigned as the description, automatically?
I've inherited a Payload CMS project and I have a component like this.
I want to get the the defaultValue, which is a global string, and show it as the description value. Then you don't have to ...
8
votes
0
answers
687
views
Error Using useField in a Custom Field Component for Payload CMS [closed]
I’m working on a custom field component for a Payload CMS array field. I followed the Payload CMS docs and attempted to use useField to manage the field's value. Here's the code:
'use client'
import {...
0
votes
0
answers
465
views
In Payload CMS, sometimes using 'Force Unlock' does not unlock the user
So The user gets locked by entering consecutive wrong passwords
and everything looks normal including the lockUntil having a ISO Date.
I then hit force unlock. and the server returns a successful ...
0
votes
0
answers
101
views
Executing server-side code in Payload CMS
We have a page that invokes a RESTful request and we need to keep the URL and credentials hidden. Meaning, we can't execute it from the client side.
Is there a straightforward way to run server-side ...
0
votes
1
answer
300
views
How to make supabase reflect whatever is on my payload cms
I’m using payload cms with supabase
I connected my app to the database without issues and when i add something it reflect on supabase normally but when i delete something from my admin panel it does ...
0
votes
0
answers
63
views
ayload CMS Form Block causing Jest worker errors in frontend, admin panel works fine
I'm experiencing an issue with Payload CMS where adding a form block causes Jest worker errors in the frontend, while the admin panel works fine. Here's my setup:
Environment:
Next.js (15.1.3)
...
0
votes
0
answers
147
views
Nextjs 15 and Payloadcms config file
I've currently used next.config.js with withBundleAnalyzer:
import withPlugins from "next-compose-plugins";
const plugins = [
withBundleAnalyzer({
enabled: process.env.ANALYZE === &...
0
votes
0
answers
17
views
Payload with Postgres: There is not enough information to infer relation [duplicate]
Payload version: 2.0.0 using db-postgres
With nested blocks, Postgres/Drizzle seems to be unable to create implicit tables. For example, my collection GlobalElements (elements that are the same for ...
0
votes
1
answer
237
views
How to manually deploy a NodeJS application to an azure wep app service (linux) via FTPS
I am trying to manually deploy payloadcms to azure web app services. I have locally run "npm run build" and created the build and dist folders. I then ftps into our server and copy the build ...
1
vote
0
answers
64
views
What could be causing: MongoServerError: Regular expression is invalid: UTF-8 error: byte 2 top bits not 0x80
I get this MongoDB error when trying to query from the DB using regex, which is supposed to ignore diacritics in the fields. I believe the RegExp query is the part causing the error. Is there anything ...
0
votes
0
answers
154
views
Issue with Live Preview on EC2 Instance in Combination with 'pnpm run build/start'
Issue with Live Preview and Preview Functionality on EC2 Instance in Combination with 'pnpm run build/start'
Hi everyone,
I'm facing an issue with the live preview and preview functionality in a ...
0
votes
1
answer
944
views
Using live preview with Payload CMS with Vue
I am trying to incorporate live preview with my Payload CMS, using Vue 3 as front end. I have followed this "tutorial" starting at around 11:00 but this CMS is usually more geared towards ...
1
vote
1
answer
609
views
Is there any way to call forgotPassword function of payloadcms manually?
Now I'm using payloadcms to create my web application.
You know, it supports built-in password recovery which can be used like this:
forgotPassword: {
generateEmailHTML: async ({ req, token, user }...
1
vote
0
answers
166
views
Next.Js Payload Express.js App On Cloudflare not returning json for api req
I followed a tutorial from yt Josh tried coding
https://www.youtube.com/watch?v=06g6YJ6JCJU
I am trying to make an app to manage entries. The functionality itself locally is in the pipeline. But due ...
0
votes
1
answer
173
views
Playload CMS how to use endpoint without authentication?
I have headless cms Payload and want to display a list of posts. But looks like it requests cookie authentication. I have found the disableLocalStrategy flag but It does not work I'm making postman ...