Custom Capabilities not working

Support MB Custom Post Type Custom Capabilities not workingResolved

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #27442
    MorganMorgan
    Participant

    Hi!

    I created a CPT called 'Portfolio', set the Capability type to 'Custom', and then it disappears from my admin control panel. I installed User Role Editor and I see that the Admin profile is listed as having access to all of the Custom capabilities under the Portfolio CPT.

    I also installed the Members plugin just to make sure that User Role Editor wasn't wrong, and the Members plugin also says admin has full access to all of the capabilities for this CPT... but I still cannot see it on the admin panel.

    If I change the CPT capability back to Post, it shows up immediately after saving.

    Help?

    #27456
    Long NguyenLong Nguyen
    Moderator

    Hi Morgan,

    Thank you for reaching out.

    Please go to User > User Role Editor > Select the user role and post type > Make sure all capabilities checked and click Update. Screenshot https://share.getcloudapp.com/2NuwvkR7

    #27461
    MorganMorgan
    Participant

    Hi.

    As I said very clearly in my original post, I've already done this. I have access to all capabilities for the CPT but it does not show up in the UI.

    I believe it may be related to this other issue that you acknowledged a few weeks ago - https://support.metabox.io/topic/faulty-capability_type-argument/

    The Custom Post type capabilities are being logged in the database as "custom". If I update the database to change 'custom' to 'portfolio', I am able to see the CPT in the UI, but then I only get 5 new capabilities in the CPT in User Role Editor plugin instead of 10, and I am no longer able to insert a new record into the CPT.

    I believe this plugin is broken, have you tested this yourself?

    #27462
    MorganMorgan
    Participant

    Hi again. My apologies, I have some additional information.

    It seems like Custom Capabilities for a CPT is working with every new CPT I create except for the first one I created two days ago (Portfolio). No matter what I do, the Portfolio CPT with Custom capability doesn't work correctly, but if I create new CPTs with Custom Capability and then update the Admin profile they all work perfectly.

    Any ideas why one specific CPT would not be working correctly?

    #27463
    MorganMorgan
    Participant

    I figured it out! the Portfolio CPT was using the same name for the Plural Name and Singular Name fields. Both fields were set to 'Portfolio', which was causing it to not work correctly even with all capabilities assigned to the admin profile.

    Would you consider this a bug?

    #27489
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Thank you for your feedback.

    I'm going to escalate this issue to the development team to fix it in future updates.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.