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 not being able to save course when Yoast SEO is activated #3866

Merged
merged 1 commit into from Jan 6, 2021

Conversation

donnapep
Copy link
Collaborator

@donnapep donnapep commented Jan 5, 2021

Fixes #3867.

Changes proposed in this Pull Request

When the Yoast SEO plugin is activated, $post is not set on the first call to some functions, resulting in a fatal error. This PR adds a check that bails early if $post is not set. I checked all other files in includes/blocks and no others are using global $post.

Testing instructions

  • Activate Yoast SEO.
  • Create a new course with some modules and lessons.
  • Save the course and ensure that saving works.
  • Check that an existing course also saves.

@donnapep donnapep added this to the 3.6.1 milestone Jan 5, 2021
@donnapep donnapep self-assigned this Jan 5, 2021
@donnapep donnapep requested a review from yscik January 5, 2021 16:37
Copy link
Contributor

@renatho renatho left a comment

Choose a reason for hiding this comment

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

Looks good to me and works well!

@donnapep donnapep merged commit d11235b into release/3.6.1 Jan 6, 2021
@donnapep donnapep deleted the fix/yoast-conflict branch January 6, 2021 13:38
donnapep added a commit that referenced this pull request Jan 7, 2021
* Check if post variable is set before accessing (#3866)

* Use proper slug data attribute (#3871)

* Release 3.6.1
renatho pushed a commit that referenced this pull request Jan 8, 2021
* Check if post variable is set before accessing (#3866)

* Use proper slug data attribute (#3871)

* Release 3.6.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants