Not sufficient permissions
-
Hi guys,
So I have now used more than 5 hours with trying and googling, I now try and hopefully get some help from here ??I have created a new WordPress page and now switched it to SSL.
What I basically did was following– Changed the WP_HOME and WP_SITEURL to the HTTPS URL
– Changed those entries as well in the DB
– added following to the .htaccess:<IfModule mod_headers.c> #Umleitung http zu https RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] </IfModule>
It then looked like everything worked, however i was not able to log in to my admin panel anymore because of “you do not have sufficient permissions to access this page”
So I checked all those prefixes in the DB since most of the online forms suggested that. -> Was okay. (wp_capabilities, wp_user_level etc.) Entry in the wp_capabilities is a:1:{s:13:”administrator”;b:1;}
I renamed the Plugins folder -> didn’t help.
I then added in my functions.php following code:
function codelight_all_permissions( $allcaps, $cap, $args ) { $allcaps[$cap[0]] = true; return $allcaps; } add_filter( 'user_has_cap', 'codelight_all_permissions', 0, 3 );
Funny enough, I was then able to log in to my backend. However, I’m not able to do basically anything with that function in my code. (for example edit or delete pages or posts)
I also added a new user and gave admin rights to him, but still same result. I’m totally out of ideas, any helps would be super appreciated!
What little bit irritates me as well, is that when I press mypage.com/wp-admin I get redirected to /wp-login.php?redirect_to=https%3A%2F%2Fwww.mysite.com%2Fwp-admin%2F&reauth=1
not sure however, if that is correct or incorrect.the wp_user_role in wp_options has following entry:
a:5:{s:13:"administrator";a:2:{s:4:"name";s:13:"Administrator";s:12:"capabilities";a:30:{s:13:"switch_themes";b:1;s:11:"edit_themes";b:1;s:16:"activate_plugins";b:1;s:12:"edit_plugins";b:1;s:10:"edit_users";b:1;s:10:"edit_files";b:1;s:14:"manage_options";b:1;s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:6:"import";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:8:"level_10";b:1;s:7:"level_9";b:1;s:7:"level_8";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;}}s:6:"editor";a:2:{s:4:"name";s:6:"Editor";s:12:"capabilities";a:19:{s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;}}s:6:"author";a:2:{s:4:"name";s:6:"Author";s:12:"capabilities";a:8:{s:12:"upload_files";b:1;s:10:"edit_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:4:"read";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;}}s:11:"contributor";a:2:{s:4:"name";s:11:"Contributor";s:12:"capabilities";a:4:{s:10:"edit_posts";b:1;s:4:"read";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;}}s:10:"subscriber";a:2:{s:4:"name";s:10:"Subscriber";s:12:"capabilities";a:2:{s:4:"read";b:1;s:7:"level_0";b:1;}}}
The page I need help with: [log in to see the link]
- The topic ‘Not sufficient permissions’ is closed to new replies.