-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
[Block] Post Featured ImageAffects the Post Featured Image BlockAffects the Post Featured Image Block[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
This made sense when the line was written:
/**
* A post featured image block placed in a query loop
* does not have image replacement or upload options.
*/
if ( ! featuredImage && isDescendentOfQueryLoop ) {
return (
<>
{ controls }
<div { ...blockProps }>
{ placeholder() }
<Overlay
attributes={ attributes }
setAttributes={ setAttributes }
clientId={ clientId }
/>
</div>
</>
);
}But controls are used for more than that now! Since then featured image blocks have had new options added, particularly the "Link to post" toggle which sits inside this check in the controls component.
Step-by-step reproduction instructions
Use a featured post image block in a document that does not contain a query block.
In my situation I have a template part inside a query block + post template block, and because of this the featured image inside the template part does not have the option to enable post links, and wipes it if I add it manually and reopen
Screenshots, screen recording, code snippet
No response
Environment info
WordPress v6.2
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Block] Post Featured ImageAffects the Post Featured Image BlockAffects the Post Featured Image Block[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended