I started this issue so that there would be a context for the improvements that I prepared :)
The plugin does not process blocks if they are specified in the payload config and are used as blockReferences in the collection
Step to reproduce:
- Create block config:
import type { Block } from 'payload'
export const ReferenceBlock: Block = {
slug: 'ReferenceBlock',
fields: [
{
name: 'title',
type: 'text',
required: true,
},
],
}
- Add blocks section with new block to
payload.config.ts
export default buildConfig({
// ...
blocks: [ReferenceBlock],
// ...
})
- Add to collection:
{
name: 'contentRef',
type: 'blocks',
blocks: [],
blockReferences: ['ReferenceBlock'],
}
Expected result:
I see ReferenceBlock in openapi docs
Actual result
Error with text:
Invalid reference token: ReferenceBlock
I started this issue so that there would be a context for the improvements that I prepared :)
The plugin does not process blocks if they are specified in the payload config and are used as blockReferences in the collection
Step to reproduce:
payload.config.tsExpected result:
I see ReferenceBlock in openapi docs
Actual result
Error with text:
Invalid reference token: ReferenceBlock