-
Notifications
You must be signed in to change notification settings - Fork 157
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
Add view all post types filter to External Connections. #1003
Conversation
Tagging Max on this one as he's already reviewed a separate PR #1002 for the same issue, so worth checking here to see which approach is most optimal (and can close the lessor of the two) |
@ankitrox can you please fill up the description and testing instructions for clarity? |
Added the steps to test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ankitrox
I followed your instructions and tested this branch, I faced some issues. The Posts filter shows Pages as well.
I tested by resolving the conflicts locally as well and still faced the same issue.
Please watch the video below:
Screen-2023-07-13-154244.mp4
Let me know if I'm missing any steps.
The changes in However, the good news is that the changes allow for requesting |
# Conflicts: # includes/rest-api.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've pushed a few changes to account for updates to the REST API endpoint in Distributor 2.0.0
For external connections, I am wondering if it would be best to send the local post types individually when requesting all
post types: this will allow for situations in which the external connection has post types that are not supported locally.
However, I think that might be best left fro another ticket.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@peterwilsoncc I am not getting a correct result for the View all
filter.
I noticed that in the final SQL query, WordPress adds post_author
to the current user id (rest API) when doing a query for multiple posts (i.e. all
), which means I am not getting the list of all editable posts from all post types.
Can you check?
@ankitrox thanks for the PR! Could you please fill out the PR template with description, changelog, and credits information so that we can properly review and merge this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that in the final SQL query, WordPress adds
post_author
to the current user id (rest API) when doing a query for multiple posts (i.e.all
), which means I am not getting the list of all editable posts from all post types.
I'm not seeing this issue when connected as an administrator. If Ravinder had connected the sites as a non-admin it may be an effect of the security fixes in GHSA-q43c-v867-4cfp
I think this code is good or merging.
Noticed bugs post review. NOT yet merge ready.
Closing in favor of #1002. |
Description of the Change
Introduce a "View All" post type view to the pull screen for external connections for parity with the internal connections. The new view is the default when visiting Distributor > Pull Content > [External connection].
Closes #861
How to test the Change
Changelog Entry
Credits
Props @ankitrox, @Sidsector9, @ravinderk, @jeffpaul, @peterwilsoncc
Checklist: