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

Post "update" transition not logged when using Block Editor. #1195

Closed
rheinardkorf opened this issue Oct 26, 2020 · 4 comments
Closed

Post "update" transition not logged when using Block Editor. #1195

rheinardkorf opened this issue Oct 26, 2020 · 4 comments
Labels

Comments

@rheinardkorf
Copy link
Contributor

rheinardkorf commented Oct 26, 2020

Bug Report

Expected Behavior

When updating a post, page or custom post type with the Block Editor I expect the activity to be logged by Stream.

Actual Behavior

Activity for updates are not getting logged.

Steps to Reproduce the Problem

  1. Open an existing post for editing with the Block Editor.

  2. Make a change to the content (or the title).

  3. Click on "Update"

Steps to Verify the Problem

  1. Install and Activate "Classic Editor".

  2. Open an existing post for editing with the Classic Editor.

  3. Make a change to the content (or the title).

  4. Click on "Update"

Classic Editor results in the expected behaviour, Block Editor does not.

System Information

  • Stream plugin version: 3.6.0
  • WordPress version: 5.5.1
  • PHP version: 7.4.1
  • Browser: Chrome + Safari
  • Computer operating system: MacOS
@kidunot89
Copy link
Contributor

kidunot89 commented Nov 3, 2020

@rheinardkorf I did some digging and confirm that this is a minor design issue. Gutenberg saves post using the REST API which is consider the backend or frontend. The post connection is a backend only connector.

It's pretty much the Posts connector is simply not being registered because this conditional returns false on REST requests. You can confirm this by changing this boolean to true and running thru your steps again to see the record be made this time.

@kasparsd @dero Any recommendations on the solution this? Could add a flag and conditional to the \WP_Stream\Connectors::load_connectors() for specifying if active on REST request or something else along those lines. Just fishing for ideas 🤷‍♂️.

@spencerm
Copy link

spencerm commented Jan 4, 2021

@kidunot89 Is there a way to flip that boolean that wouldn't break when Stream updates?

@kidunot89
Copy link
Contributor

@spencerm Possibly, but it will require making some changes to the Post Connector class.

@kasparsd
Copy link
Contributor

kasparsd commented Mar 8, 2022

Fixed in #1264.

@kasparsd kasparsd closed this as completed Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants