• Resolved danaldinho

    (@danaldinho)


    Hey,

    Today I’ve received an error in the dashboard of my https://www.LilWayneHQ.com website when I go to make a new post and publish, or even when I edit a post. The error says:

    “Sorry, you are not allowed to edit posts in this post type.”

    I’m not sure why this is just now appearing, but it’s stopping me from adding anything new to the site. I haven’t installed any new plugins lately, or messed around with code.

    The other thing is that I have other WordPress blogs on my server that are more or less the same as LilWayneHQ and they are both working fine.

    LilWayneHQ is full updated with WordPress software and the plugins I have. I also tried repairing/optimizing the databases in phpMyAdmin, but still no luck.

    I even tried using the default WordPress theme with all plugins deactivated and I still got the same error.

    Does anyone know what the issue could be and how it can be fixed?

    Thanks!

Viewing 15 replies - 1 through 15 (of 15 total)
  • Moderator t-p

    (@t-p)

    Can you replicate the problem using the default Twenty Sixteen theme with all plugins deactivated?

    Thread Starter danaldinho

    (@danaldinho)

    I just tried that and I got the exact same issue.

    Moderator t-p

    (@t-p)

    Try resetting the plugins folder by FTP. Sometimes, an apparently inactive plugin can still cause problems.

    Thread Starter danaldinho

    (@danaldinho)

    I just did that also and still got the same error when trying to edit and publish a post?

    Moderator t-p

    (@t-p)

    Did this always work for you before?

    What did you do before this issue happened?

    Thread Starter danaldinho

    (@danaldinho)

    Yes and it happened today when I woke up, everything was perfect yesterday.

    Like I say, I have 2 other WordPress sites on the same server and they are still working fine.

    I haven’t touched anything with the code in a good while to be honest and I also asked my host if anything happened overnight and they said no.

    I’m also confused as to why this has happened. I googled the error I have and it looks like someone else has recently had the problem too – https://stackoverflow.com/questions/39730280/cannot-see-the-publish-options-in-wordpress-4-6-1

    But there’s still no fix.

    Moderator t-p

    (@t-p)

    I have 2 other WordPress sites on the same server and they are still working fine.

    It looks like either you don’t have or somehow you lost the capability to edit/post on this.

    • This reply was modified 8 years, 1 month ago by t-p.
    Thread Starter danaldinho

    (@danaldinho)

    My user profile says I’m an administrator still? I even created a test admin account in WordPress and they also couldn’t post.

    Moderator t-p

    (@t-p)

    Is it a CPT or all posts?

    Thread Starter danaldinho

    (@danaldinho)

    I’m not sure what CPT stands for, but it is any post.

    I can click on the Add New Post link to create a post, when I click on publish I get a re-direction to a page that says:

    Sorry, you are not allowed to edit posts in this post type.

    And on the page in the admin panel that lists all posts, if I click on “Edit” on any post, I also get directed to the WordPress error page that says:

    Sorry, you are not allowed to edit posts in this post type.

    Moderator t-p

    (@t-p)

    I would guess the permissions of ADMINS may be broken.

    See if info in this thread helps:
    https://wordpress.stackexchange.com/questions/40944/how-can-i-restore-admin-capabilities/40949#40949

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Delete all cookies related to your site and clear your browser’s cache. (Fingers crossed.)

    Moderator bcworkz

    (@bcworkz)

    The problem with all the usual debugging steps is they do not affect the DB content where capabilities are stored. If your user lost the capability to edit posts according to the DB, it will remain lost through all the usual debug steps, IF this is a DB capability issue.

    If your site had no capability adjustments beyond the default, and you can access another functioning site’s DB, also with only default capabilities in place, there is something else you can try. Access phpMyAdmin for your site’s DB. This can usually be done through cPanel, Plesk, etc. of your hosting plan. Look at the user table to determine your user ID. The first admin user created at installation should be ID #1. If this is not your user, search the table for your login to determine the ID.

    With your user ID, find the “wp_capabilities” entry for your user in the usermeta table. The meta value here is a serialized array, which looks rather convoluted, but the assigned user role should be clear. Be sure it is what it’s supposed to be. Confirm that these capabilities are NOT listed here: “edit_posts”, “edit_others_posts”, “edit_published_posts”. Normally they would not be listed. If they ARE listed, stop here, the problem lies elsewhere.

    Now go to the options table and search for the option name “wp_user_roles” and chose to edit this record. You’re just going to look right now, never try to edit components of a serialized array. Look at the option value field. It’s a complete mess of data, but you should be able to pick out your role. Scan all the capabilities that occur after your role and before the next role.

    If your role is administrator, read capabilities until you reach the editor role. You should find the following capabilities amongst many others: “edit_posts”, “edit_others_posts”, “edit_published_posts”. If these are in place, the problem lies elsewhere. Back out of the edit mode and log out of phpMyAdmin.

    If any of those capabilities are missing from your role, make a backup copy (Export) of the Options table. Locate the same record on a functioning site and wholesale copy the entire option_value field to your computer’s clipboard. Go to the problem record and completely replace ALL of the current field’s content with the content of your clipboard. Click “Go”.

    If you have any caching in place, flush, clear, or disable it. You should now be able to edit posts. Good luck!

    Thread Starter danaldinho

    (@danaldinho)

    Hey guys, sorry for the late reply! I thought I would come back and let you know the issues are now all fixed.

    My host says the problems were caused by the nginx configuration not being compatible with the latest version of WordPress. Also, it was only my LilWayneHQ website affected by the issues as it was the main install and my other websites are in sub-directories.

    So we got there in the end! Thank you to everyone who replied with suggestions, it was much appreciated ??

    Hello @danaldinho
    I just encountered this same issue. Could you describe how you fixed your nginx file?

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Sorry, you are not allowed to edit posts in this post type.’ is closed to new replies.