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

fix: set correct post context for author hooks #4011 #4037

Merged
merged 1 commit into from
Aug 2, 2023

Conversation

preda-bogdan
Copy link
Contributor

Summary

The Feedzy uses the global $post inside the hook that changes the Author.
In order to allow hooks that rely on the global to work properly, I changed the context while rendering the template part
with the post that is dynamically passed.
Also, a cleanup was added at the end to preserve the original global for further code execution.

Will affect the visual aspect of the product

NO

Screenshots

Import Feed (Pic 1)

image

Map Content (Pic 2)

image

Map Content (Pic 3)

image

Import Posts (Pic 4)

image

Featured Posts Sticky (Pic 5)

image

Correct Sticky Frontend (Pic 6)

image

Test instructions

  1. Create a fresh Neve instance
  2. Install Feedzy and Feedzy PRO
  3. Go to Feedzy > Import Posts, and create a New Import
  4. Inside Source Configuration add https://www.techzone.ro/rss-stiri-hardware as a source, or any other RSS feed. (see Pic 1)
  5. Under Map Content for the General tab set the options as in Pic 2
  6. Under Map Content > Advanced Options, toggle the save options for the Post Author (see Pic 3)
  7. Save the import, and select Run Now on the Import Posts list (see Pic 4)
  8. Check that posts are imported with the author from the source RSS
  9. Set one of the posts as Sticky
  10. Enable inside the Customizer, under Layout > Blog Archive the Featured Post featured and set it to Sticky (see Pic 5)
  11. Check the front-end
  12. Create a new Post and set it to sticky as well, check that the author is correct for each sticky post. (see Pic 6)

Video with the bug can be found here for comparison: https://vertis.d.pr/v/uJ03Oa

Check before Pull Request is ready:

Closes #4011.

@pirate-bot pirate-bot added the pr-checklist-incomplete The Pull Request checklist is incomplete. (automatic label) label Jul 14, 2023
@preda-bogdan preda-bogdan linked an issue Jul 14, 2023 that may be closed by this pull request
@preda-bogdan preda-bogdan added the pr-checklist-skip Allow this Pull Request to skip checklist. label Jul 14, 2023
@pirate-bot pirate-bot added pr-checklist-complete The Pull Request checklist is complete. (automatic label) and removed pr-checklist-incomplete The Pull Request checklist is incomplete. (automatic label) labels Jul 14, 2023
@pirate-bot
Copy link
Collaborator

Plugin build for 79f4bcc is ready 🛎️!

@irinelenache
Copy link
Contributor

@preda-bogdan Tested and the issue is fixed, didn't find any other problem 🚀

@cristian-ungureanu cristian-ungureanu merged commit 9aa9879 into development Aug 2, 2023
@cristian-ungureanu cristian-ungureanu deleted the fix/feedzy_incorrect_author branch August 2, 2023 10:31
@pirate-bot
Copy link
Collaborator

🎉 This PR is included in version 3.6.6 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Aug 3, 2023
@preda-bogdan preda-bogdan mentioned this pull request Nov 2, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-checklist-complete The Pull Request checklist is complete. (automatic label) pr-checklist-skip Allow this Pull Request to skip checklist. released Indicate that an issue has been resolved and released in a particular version of the product.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect Author Displayed on sticky posts with Feedzy pro Plugin
5 participants