Thanks to visit codestin.com
Credit goes to github.com

Skip to content

@payloadcms/richtext-lexical doesn't call beforeValidate hook for BlocksFeature block fields #12254

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nicobohne opened this issue Apr 29, 2025 · 0 comments
Labels
status: needs-triage Possible bug which hasn't been reproduced yet

Comments

@nicobohne
Copy link

Describe the Bug

beforeValidate hook doesn't run for @payloadcms/richtext-lexical BlocksFeature block fields. Other hooks like afterChange seem to work.

Link to the code that reproduces this issue

https://github.com/nicobohne/payload/tree/repro/richtext-lexical-before-validate

Reproduction Steps

  1. Start the admin panel.
  2. Create a new or edit an existing post.
  3. Create a rich text block with some dummy text.
  4. Save the post.
  5. Notice there is no 'beforeValidate' console.log on the server terminal, and the field text doesn't get replaced with 'Injected Value’.

Which area(s) are affected? (Select all that apply)

plugin: richtext-lexical

Environment Info

Binaries:
  Node: 22.2.0
  npm: 10.7.0
  Yarn: 1.22.19
  pnpm: N/A
Relevant Packages:
  payload: 3.33.0
  next: 15.3.0
  @payloadcms/email-nodemailer: 3.33.0
  @payloadcms/graphql: 3.33.0
  @payloadcms/next/utilities: 3.33.0
  @payloadcms/payload-cloud: 3.33.0
  @payloadcms/richtext-lexical: 3.33.0
  @payloadcms/translations: 3.33.0
  @payloadcms/ui/shared: 3.33.0
  react: 19.1.0
  react-dom: 19.1.0
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.4.0: Fri Apr 11 18:33:39 PDT 2025; root:xnu-11417.101.15~117/RELEASE_ARM64_T6020
  Available memory (MB): 32768
  Available CPU cores: 12
@nicobohne nicobohne added status: needs-triage Possible bug which hasn't been reproduced yet validate-reproduction Auto-added tag on create to tell bot to check recreation URL, removed after check. labels Apr 29, 2025
@github-actions github-actions bot removed the validate-reproduction Auto-added tag on create to tell bot to check recreation URL, removed after check. label Apr 29, 2025
@nicobohne nicobohne changed the title @payloadcms/richtext-lexical doesn't call beforeValidate hook for BlocksFeature fields @payloadcms/richtext-lexical doesn't call beforeValidate hook for BlocksFeature block fields Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs-triage Possible bug which hasn't been reproduced yet
Projects
None yet
Development

No branches or pull requests

1 participant