• Resolved servicefly

    (@servicefly)


    As admin with full capabilities, I can’t add a new or edit my custom post type! What I can do is use Quick Edit on the list of posts, use Gravity Forms to create a post, and edit the post as the author on the front-end.

    Here is what I’ve tried:

    -Enabled Roles and Capabilities then made sure Administrator had all capabilities checked… No go!

    -Added this code to Snippets Plugin (functions.php) –

    add_filter("pods_admin_capabilities", function ($pods_admin_capabilities, $cap) {
    
        $pods_admin_capabilities[] = "administrator";
    
        return $pods_admin_capabilities;
    
    }, 10, 2);

    No go!

    -Then tried this code to Snippets Plugin (functions.php) –

    function access_for_all_admins( $access ) {
    
        if ( !$access && current_user_can( 'manage_options' ) ) {
            $access = true;
        }
    
        return $access;
    
    };

    No go!

    -Then tried this code to Snippets Plugin (functions.php) –

    add_filter( 'pods_is_admin', 'slug_let_admins_admin', 10, 3 );
    function slug_let_admins_admin( $has_access, $cap, $capability ) {
    	$capability = 'admin';
    	return $capability;
    }

    No go!

    -Tried all the above codes with Roles and Capabilities enabled & disabled… No go!

    -First I tried the typical plugin conflict scenario; disable all plugins but PODS and tried with generic theme… No go!

    I’ve combed the Web for permissions problems for PODS and just WordPress, have gone through the code with bugged out eyes. At this point I’m probably missing something simple.

    I believe the update to latest wordpress caused the problem; however, many updates happened at the same time and the client updated without telling me, so I don’t know what caused it. Finally, here is a very specific account to what occurs:

    As Admin I can click on the post from the list in the admin panel. I can see everything on the edit screen. I can change values. I can click the “Update” button, but nothing happens. When I click the preview button, the spinny icon next to the “Update” button appears, but then the whole saving/updating process freezes. I can’t add a new post from the admin panel. Hopefully, that clears up the situation.

    Has anyone had this problem and solved it? I can provide a support login to PODS Devs if needed.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor Jim True

    (@jimtrue)

    You shouldn’t have to jump through those kind of hoops, honestly.

    Are you on a Network Multisite?
    Are you running non post/page Capabilities on your Pods? (ie custom capabilities or capabilities based on post or page)
    Are you using some kind of roles/capabilities manager?
    Are you running any caching plugins, Pods Alternative Cache?

    Can you get into the Pods Admin on the site itself?

    Thread Starter servicefly

    (@servicefly)

    Thanks for the reply:

    Are you on a Network Multisite?

    I am not running multisite. I actually got one of the snippets of code to solve another’s issue who was running multisite.

    Are you running non post/page Capabilities on your Pods? (ie custom capabilities or capabilities based on post or page)

    I am not; however, I did enable the Roles & Capabilities component of PODS to try to fix this issue. I tested with it enabled & disabled. I also had the problem after disabling all plugins on generic theme.

    Are you using some kind of roles/capabilities manager?

    No, just tested it with PODS component.

    Are you running any caching plugins, Pods Alternative Cache?

    I’m pretty sure I disabled all caching, especially in mu-plugins.

    Can you get into the Pods Admin on the site itself?

    I’ll clear a few more things up; I am able to save and edit all other post types except the one created with PODS and, yes I can access everything to do with PODS and the post type I created through the admin panel. You wouldn’t be able to tell there is anything wrong until you tried to add a new post or edit an existing post specifically for the post type in PODS.

    I’m happy to answer any more questions.

    Plugin Contributor Jim True

    (@jimtrue)

    If you can save and edit every other post type other than the ones you created with pods AND you can get into the Pods Admin just fine, it sounds like you’ve got Custom Capabilities setup for this post type:

    https://docs.pods.io/advanced-topics/roles-capabilities-in-wordpress/

    Check out that doc and it’s information on setting Custom Capabilities in Advanced Options for your Pods you’ve created. I, personally, never use our Roles & Capabilities ‘capability’ manager as it’s not been touched in a while and I trust Members by Justin Tadlock more for making sure nothing ‘hinky’ is going on with my Roles & Capabilities setups.

    If you’re not on a Multisite, you shouldn’t need any of those special PHP configurations.

    Thread Starter servicefly

    (@servicefly)

    I understand this as I’ve used your plugin quite a bit. Unfortunately, I can only access the custom posts if the 2 following settings are in place:

    1. User Capability = post

    &

    2. Additional User Capabilities = checked

    Any other configuration only allows admin to view the post.

    Thread Starter servicefly

    (@servicefly)

    Solved!

    Thank you for trying to help. After massive frustration I manually re-installed WordPress and it fixed the problem. I want to yell at WordPress so bad, but they work hard too.

    Thread Starter servicefly

    (@servicefly)

    Dang! Not Solved… After I manually re-installed WordPress I was able to edit one of the posts in my custom post type. As soon as I logged out and then back in this morning the problem was back. I believe something is broken with User Capabilities or Roles but really haven’t enough evidence yet to know for sure. I’m going to create another post type just for testing. I’ll update this when I have more results.

    Plugin Contributor Jim True

    (@jimtrue)

    Yep, this has everything to do with User Capabilities and Roles, based on your descriptions above. That’s why we did our little document and stay out of that particular mess.

    Somehow, if you have setup Custom Capabilities, someone has messed up the Roles & Capabilities. As an Admin, you should be able to take that Custom Capability (check Members Plugin, because it’s easiest there) and you’ll see that Custom Capability stand out. Then you can turn on all settings for Admin.

    Plugin Contributor Jim True

    (@jimtrue)

    We’ve not heard back from you on this one, so we have to assume the issue is now resolved. If you’re still having issues, please reply and mark the issue as ‘unresolved’ but for now, we’re closing this ticket.

    Have a great day!

    Thread Starter servicefly

    (@servicefly)

    Sorry for the delay, I have been overworking to find this issue. After extensive testing, I finally narrowed it down to a plugin called “Simple Locator.” I will seek their help in figuring this out. I can tell you it was not a roles and capabilities problem. Thanks again.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Admin can’t add or update post’ is closed to new replies.