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

Problem with Private posts #444

Open
AliMHGit opened this issue May 23, 2014 · 1 comment
Open

Problem with Private posts #444

AliMHGit opened this issue May 23, 2014 · 1 comment

Comments

@AliMHGit
Copy link

hey scribu,
i cannot get result from querying private posts but when i alter the sql request to

INNER JOIN acwp_p2p
WHERE 1 =1
AND acwp_posts.post_type
IN (
'animes', 'manga'
)
AND (
acwp_posts.post_status = 'private'
OR acwp_posts.post_status = 'private'
)
AND (
acwp_p2p.p2p_type = 'Adaptation'
AND (
(
acwp_posts.ID = acwp_p2p.p2p_to
AND acwp_p2p.p2p_from
IN (

SELECT acwp_posts.ID
FROM acwp_posts
WHERE 1 =1
AND acwp_posts.ID
IN ( 3317 )
AND acwp_posts.post_type
IN (
'animes', 'manga'
)
AND (
acwp_posts.post_status = 'private'
OR acwp_posts.post_author =1
AND acwp_posts.post_status = 'private'
)
ORDER BY acwp_posts.post_date DESC
)
)
OR (
acwp_posts.ID = acwp_p2p.p2p_from
AND acwp_p2p.p2p_to
IN (

SELECT acwp_posts.ID
FROM acwp_posts
WHERE 1 =1
AND acwp_posts.ID
IN ( 3317 )
AND acwp_posts.post_type
IN (
'animes', 'manga'
)
AND (
acwp_posts.post_status = 'private'
OR acwp_posts.post_author =1
AND acwp_posts.post_status = 'private'
)
ORDER BY acwp_posts.post_date DESC
)
)
)
)
ORDER BY acwp_posts.post_date DESC
LIMIT 0 , 30

it work.
i couldn't find any place in plugins to solve this issue.

@mikemanger
Copy link

FYI, also doesn't seem to work when previewing draft pages.

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

No branches or pull requests

2 participants