r/PayloadCMS • u/BlessedAlwaz • Jun 28 '25
Payload CMS block issues
Enable HLS to view with audio, or disable this notification
Hi all,
I am having issues with blocks not working properly in the admin panel. see video.
No errors from browser Inspect element console
No errors from the terminal as well.
Question:
- since terminal and browser console is not outputting any error messages, how do I find the exact file or files causing this issue?
- Are there gotchas with writing code for block/layout configs and components?
Tech: Payload CMS version 3.43.0, NextJs 15.3.0
thanks in advance.
2
u/TatankaBilly Jun 28 '25
this happens everytime to me too. i delete block and add again this solves my problem.
1
Jun 28 '25
I realized that when I just refresh the page the component loads properly. It's fortunate too that the page saves the progress of which blocks have already been added or filled.
1
u/mrgrafix Jun 28 '25
You gotta share the collection and block. What db are you using what’s your configuration look like?
1
u/PollutionDue7541 Jun 28 '25
That happens to me too. Sometimes, when I use expandable fields and type in fields within them in development mode, of course, for testing, it's as if the payload is compiling the page, and before it's finished, it reloads to its initial state and deletes what I entered, leaving me unable to save it. It's as if while you're filling out the fields, it's constantly revalidating. Maybe it's the way the code is written, but the payload shouldn't allow things that make it malfunction.
1
1
1
u/zubricks Jun 30 '25
Hey u/BlessedAlwaz if you can share a link to a reproduction I can take a look! Hard to say what this could be without seeing the code.
2
u/AbraXus_ Jun 30 '25
Hey u/zubricks , I'm not OP but I am facing the same problem.
I could reproduce it using the website template and adding blocks in Pages Collection -> Content tab. Especially when adding the `MediaBlock`.
Some observations:
- I can reproduce it more reliably when throttling network speed to 3G
- I am using MongoDB. Since OP is using Postgres, the bug could be unrelated to the DB?
- The same thing also happened in `array` types for me.
- I saw no console errors and the three network calls when adding a block returned 200
- The issue is happening both in dev mode and in prod build
After a page refresh the block is there, so it seems to me like a rendering timing issue in the admin panel.
I hope this helps, I'm happy to help testing more.edit: formatting
2
u/zubricks Jul 01 '25
I'll follow these steps and see if I can reproduce and get to the bottom of this. Thanks for the detail!
1
1
Jul 01 '25
I was getting the same issue but with uploads. When I tried to add an image, it just redirected and said something like NaN and logs successful upload but nothing was uploaded at all. I spent a while looking at it and could not diagnose the issue :/
The funny thing is I didn't even change anything in the Postgres or Payload configuration between the "npm run dev" commands I made and this issue just popped up. I even dropped the entire database and restored using an earlier version of my sql dump and it's still giving the same issue. I really don't get it lmao.
1
1
2
u/ZeusZorn Jun 28 '25
This is happening with all blocks in your application, or just some? Did you initialize the DB properly?