Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions src/faq/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,30 @@
"default": true
}
},
"example": {
"attributes": {
"isAccordion": true
},
"innerBlocks": [
{
"name": "blockparty/faq-item",
"innerBlocks": [
{
"name": "blockparty/faq-question",
"attributes": {
"question": "Lorem ipsum"
}
},
{
"name": "blockparty/faq-answer",
"attributes": {
"answer": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-existent answer attribute used in FAQ answer example

Medium Severity

The blockparty/faq-answer block doesn't have an answer attribute in its schema—its only attribute is isAccordion. The answer block renders its content via InnerBlocks (accepting core/paragraph, core/heading, etc.), so the example's "answer" attribute will be silently ignored and the block preview will show an empty answer panel. The content needs to be provided as a nested core/paragraph inner block with a content attribute instead.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2cb1ce4. Configure here.

}
]
}
]
},
"textdomain": "blockparty-faq",
"editorScript": "file:./index.js",
"viewScript": "file:./script.js",
Expand Down
Loading