Skip to content

Conversation

@spsiddarthan
Copy link
Contributor

@spsiddarthan spsiddarthan commented May 17, 2022

Fixes #24383

Changes proposed in this Pull Request:

  • Get rid of AJAX checks and check only for auto-save and quick-edit

Jetpack product discussion

p1652771316583739-slack-C02JJ910CNL

Does this pull request change what data or activity we track or use?

No

Testing instructions:

  • Without this change, try publicizing a post via the elementor plugin. The post won't get publicized.
  • With this change, try publicizing a post via the elementor plugin. The post will get publicized.
  • To test the changes wrt quick edit, create a post in draft mode. Quick edit the post from the wp-admin postl list view, and set the post_status to 'Publish'. The Post should not get publicized.

@github-actions
Copy link
Contributor

github-actions bot commented May 17, 2022

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.


Jetpack plugin:

  • Next scheduled release: June 7, 2022.
  • Scheduled code freeze: May 31, 2022.

@github-actions github-actions bot added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label May 17, 2022
@jeherve jeherve added [Type] Bug When a feature is broken and / or not performing as intended [Pri] High labels May 17, 2022
@jeherve jeherve modified the milestones: jetpack/11.0, jetpack/10.9.1 May 17, 2022
@spsiddarthan spsiddarthan requested a review from a team May 17, 2022 10:11
@spsiddarthan spsiddarthan added [Status] Needs Team Review Obsolete. Use Needs Review instead. and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. labels May 17, 2022
@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello spsiddarthan! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer and confirm D80924-code works as expected before merging this PR. Once this PR is merged, please commit the changes to WP.com. Thank you!
This revision will be updated with each commit to this PR

@github-actions github-actions bot added [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Feature] Publicize Now Jetpack Social, auto-sharing labels May 17, 2022
@spsiddarthan spsiddarthan changed the title Publicize: Allow publicizing via elementor. Publicize: Allow publicizing via AJAX requests, except for auto-save and quick edits. May 17, 2022
Copy link
Contributor

@pablinos pablinos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How easy do you think it would be to add a test for this? I suspect not that easy, but if we can add one, it would be great.

@spsiddarthan
Copy link
Contributor Author

How easy do you think it would be to add a test for this? I suspect not that easy, but if we can add one, it would be great.

I played around with this for a bit, but looks like we need to mock a post request with form data to the admin-ajax endpoint. So, it is not very straightforward, so perhaps we can revisit this later?

@kraftbj
Copy link
Contributor

kraftbj commented May 17, 2022

With the timeline, let's pass on the test for time and add it in a follow-up PR. @pablinos is the one comment on the did_action the only blocker at this point?

@spsiddarthan spsiddarthan requested a review from pablinos May 18, 2022 08:14
@pablinos
Copy link
Contributor

With the timeline, let's pass on the test for time and add it in a follow-up PR. @pablinos is the one comment on the did_action the only blocker at this point?

Yeah, it was just a thought if it was quick to add, but it isn't! I think this is all good. Just need to do a bit more testing.

Copy link
Contributor

@pablinos pablinos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. Tested that publishing in Elementor triggers Publicize, but also that quick edit and bulk edit don't.

@pablinos pablinos added [Status] Needs Review This PR is ready for review. and removed [Status] Needs Team Review Obsolete. Use Needs Review instead. labels May 18, 2022
Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to test well for me. 🚢

@jeherve jeherve added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels May 18, 2022
@spsiddarthan spsiddarthan merged commit b653fcc into master May 18, 2022
@spsiddarthan spsiddarthan deleted the fix/elementor-publicize branch May 18, 2022 10:04
@github-actions github-actions bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label May 18, 2022
@github-actions
Copy link
Contributor

Great news! One last step: head over to your WordPress.com diff, D80924-code, and deploy it.
Once you've done so, come back to this PR and add a comment with your changeset ID.

Thank you!

@spsiddarthan
Copy link
Contributor Author

r245861-wpcom

jeherve pushed a commit that referenced this pull request May 19, 2022
… for auto-save and quick edits. (#24387)

* Fix post not getting publicized when published via elementor.

* changelog

* Change logic to DOING_AUTOSAVE from DOING_AJAX

* changelog

* Removed comment.

* Don't allow publicizing on quick edits.

* Added check to publicize.php as well

* Fix the action for quick-edit.

* Changed comment to check if fusion is picking up the change.
@jeherve
Copy link
Member

jeherve commented May 19, 2022

Cherry-picked to jetpack/branch-10.9 in 6ce373a

@jeherve
Copy link
Member

jeherve commented May 19, 2022

Package was updated in the release branch in d800479

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Publicize Now Jetpack Social, auto-sharing [Package] Publicize [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] High Touches WP.com Files [Type] Bug When a feature is broken and / or not performing as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publicize: not publishing with Elementor and Jetpack 10.9+

7 participants