-
Notifications
You must be signed in to change notification settings - Fork 135
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
content filtering conditions #1539
Conversation
@thomasplevy If we decide this is the way to go, we need to add back this filter, e.g. here: Right? Because ideally, we should skip the content filtering only when inserting (updating) posts either in admin or REST requests: skip when inserting, but not when returning the inserted one. Also, while this fixes all the issues you cited, in the assignment plugin we use a similar filter, which anyways doesn't produce any issues because the template it loads are fine :D |
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.
only a doc to be added.
And a consideration...
Description
I think this is a descent approach to fixing the issue(s) we've been encountering as a result of recent changes introduced into Yoast 15.8.
The changes which have caused these errors to start appearing were introduced in 15.8, specifically Yoast/wordpress-seo@9b4f7ca which loads the
$post
global.Previously, since the global wasn't setup in the conditions where we're now encountering issues (the course builder and during cloning / importing on the admin panel) we didn't have any problems. But now that the
$post
global exists on sites running Yoast (it looks like this is loaded on the admin panel by Yoast intentionally but I can't tell exactly why, nor have I tried to figure it out).This PR introduces conditional loading of our filters so that on the admin panel (generally, even though we care specifically about the course builder and course importer / cloninig function) and during REST requests the templates and restriction logic handled by
llms_get_post_content()
isn't executed.This is a WIP. I haven't finished testing it and probably even writing it. I'm hoping to get this deployed this weekend because Yoast conflict bug reports are coming in regularly since 15.8 dropped and the severity is raising for us as a result.
Fixes #1536
Fixes #1530
This should also fix https://github.com/gocodebox/lifterlms-assignments/issues/55 (but I haven't run a test against this yet, just theoretically)
How has this been tested?
Screenshots
Types of changes
Checklist: