-
Notifications
You must be signed in to change notification settings - Fork 116
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
Posts Connector: Enable on the front end to ensure logging happens for REST API events #1264
Conversation
Post creation and updating that happens through the REST API is not considered to occur in the "admin" even if the request is made from the block editor. Therefore, these events aren't getting logged because the Posts connector is disabled for the frontend. I don't know what the rationale is for disabling it, but by _not_ doing that, post creation gets logged. Fixes #1250
Thanks for opening a pull request @coreymckrill! Can you please check if this is solving the same problem as #1223? |
@kasparsd I think that it is. This solution is a lot simpler, but I don't know what the original reasoning was for turning off the Posts connector on the front end. |
@coreymckrill The original reasoning (which pre-dates Gutenberg's existence) for restricting the Posts Connector from the operating on the Front-end was to avoid recording unnecessary records when @kasparsd @coreymckrill Maybe the solution to this issue is adding toggleable option |
@kidunot89 Ah, thanks for clarifying!
Would it work to differentiate between frontend requests and rest api requests? |
#1269 is an attempt to implement the idea above, differentiating between frontend and api requests. |
@kidunot89 @kasparsd Any chance of moving this forward at all? Stream not capturing post/page edits/creations/etc is a pretty major bug and I'd love not to have to move to a different plugin if I can help it.. |
Sorry for missing all the messages on this issue. Will look at the changeset again. |
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 don't see any immediate issues with allowing the post connector to run on all requests.
This changeset somehow made this unit test fail: https://app.travis-ci.com/github/xwp/stream/jobs/562444098#L1671
stream/tests/tests/connectors/test-class-connector-edd.php Lines 172 to 193 in 305583d
|
Post creation and updating that happens through the REST API is not considered to occur in the "admin" even if the request is made from the block editor. Therefore, these events aren't getting logged because the Posts connector is disabled for the frontend. I don't know what the rationale is for disabling it, but by not doing that, post creation gets logged.
Fixes #1195
Fixes #1250
Checklist
Project documentation has been updated to reflect the changes in this pull request, if applicable.contributing.md
).