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

Can not access Pods Editor in WordPress 4.0 #2228

Closed
Shelob9 opened this issue Jun 10, 2014 · 5 comments
Closed

Can not access Pods Editor in WordPress 4.0 #2228

Shelob9 opened this issue Jun 10, 2014 · 5 comments
Assignees
Milestone

Comments

@Shelob9
Copy link
Collaborator

Shelob9 commented Jun 10, 2014

A user reports here that when using WordPress 4.0 when they create a new Pod they receive the “You do not have sufficient permissions to access this page.” after creating it. The Pod is being created though.

I tested with Pods 2.4 and latest WordPress trunk and I can't access the Pod Editor at all. I get the “You do not have sufficient permissions to access this page" error when logged in as admin. The other Pods Admin pages are accessible.

@Shelob9 Shelob9 added this to the Pods 2.4.1 milestone Jun 10, 2014
@pglewis pglewis self-assigned this Jun 10, 2014
@pglewis
Copy link
Contributor

pglewis commented Jun 10, 2014

A subtle change was made to WP_Query::get_posts(). In the past, we have set the post__in param to false if we're not filtering by any post IDs. get_posts() will now return no records at all if post__in evaluates to false. The permission message was simply a side-effect of this issue. When load_pods() attempts to get a count of existing pods get_posts() says there are none.

The reason for the change in WordPress trunk is unclear to me; it doesn't make much sense without seeing what ticket it was meant to address. Regardless, I think the safe fix is simply to unset the post__in param if it's false rather than pass it. Commit with candidate fix on the way.

pglewis added a commit that referenced this issue Jun 10, 2014
@pglewis
Copy link
Contributor

pglewis commented Jun 10, 2014

https://core.trac.wordpress.org/ticket/28099

Note nacin's comment number 4 ;)

@pglewis
Copy link
Contributor

pglewis commented Jun 10, 2014

Also, reminder note to get this into 3.0 before closing if/when it's verified fixed.

pglewis added a commit that referenced this issue Jun 10, 2014
@hawkrives
Copy link

I'll try out the Pods 2.x branch and report back.

@hawkrives
Copy link

I can verify that #2228 fixed this problem for me. Thanks all!

screen shot 2014-06-10 at 9 46 58 am

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

No branches or pull requests

4 participants