[5.x] Only apply the published filter when not in preview mode#11652
[5.x] Only apply the published filter when not in preview mode#11652jasonvarga merged 8 commits intostatamic:5.xfrom
Conversation
duncanmcclean
left a comment
There was a problem hiding this comment.
Would you be able to add a test for this?
|
Sure, i'll setup a test for checking if draft entries are received with a token and omitted without a token. 👍 |
|
I've added the testcase. While running the test I also needed to fix a line where the filters would default to |
|
@duncanmcclean have you had a chance to review the changes? 😃 |
|
Sorry, I don't normally review PRs, beyond giving them a quick look over, so I don't have an ETA for when we'll review this pull request. In the meantime, you can pull this PR into your project with a composer patch. |
… the token isnt the thing making it work
|
I've adjusted this so that it only applies to the single entry query. This is consistent with the rest api. |
|
Thanks for the merge! 🔥 |
Possible fix for issue #6134
Checks if we're in
isLivePreviewbefore appending$filters['status'] = 'published';Works similar as the fix made for the REST API #10229