Skip to content
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

Curation removes some attributes postTypes but not others categories #78

Closed
Tracked by #80
renatonascalves opened this issue Oct 16, 2023 · 3 comments
Closed
Tracked by #80
Labels
enhancement New feature or request

Comments

@renatonascalves
Copy link
Contributor

Description

Curating a post removes the postTypes attributes but not the categories attribute.

Use Case

Block curating a post.

@renatonascalves renatonascalves added the enhancement New feature or request label Oct 16, 2023
@mogmarsh
Copy link
Collaborator

@renatonascalves where are these attributes removed or not removed from?

@renatonascalves
Copy link
Contributor Author

renatonascalves commented Oct 17, 2023

@mogmarsh

The attributes inside the block. The example below is the block with one post curated and with one category set.

<!-- wp:wp-curate/query {"maxNumberOfPosts":4,"minNumberOfPosts":4,"numberOfPosts":4,"posts":[180842,null,null,null],"terms":{"category":[{"id":5944,"title":"News","url":"https://site/news/","type":"category"}]}} -->

While testing, I found that by default: the postTypes query parameter is set, but any block change removes it, even though it looks like it is set in the editor. The same doesn't happen for the terms, where you get an empty array if you remove it later.

<!-- wp:wp-curate/query {"maxNumberOfPosts":4,"minNumberOfPosts":4,"numberOfPosts":4,"postTypes":["post"]} -->
Screenshot 2023-10-16 at 21 26 19

@renatonascalves
Copy link
Contributor Author

renatonascalves commented Oct 20, 2023

With #82, this is not longer relevant. But a quick note to the future: I'd expect the Query Parameters present in the sidebar to be reflected in the block attributes, but it currently does not work that way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants