When I tried to update I was getting (after activating the plugin):
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in /home/xxx/public_html/wp-includes/class-wp-user.php on line 739
And also PHP Warning: array_key_exists(): The first argument should be either a string or an integer in /home/xxx/public_html/wp-content/plugins/types-access/application/controllers/permissions_post_types.php on line 447 in the error_log
Using Duplicator I had to download as a DupArchive (i.e. creates a custom archive format - archive.daf). I then also managed to create an ordinary archive by ticking the Attempt Network Keep Alive in Duplicator - so you will also have a zip file.
Please do NOT work on my live site unless just browsing/looking because it's being constantly used during the week. Thank you.
In my local tests, I was able to install this Duplicator clone and update Access to the latest version successfully. I will keep working on this and give you an update tomorrow, perhaps it's a PHP version or MySQL version difference.
Hello again, I was running a few more tests today and found that the Dynamik-Gen child theme seems to a contributing factor in my local instance. If I activate the parent Genesis theme, then I can update and activate Access successfully. Then I am able to switch back to Dynamik-Gen without triggering any errors. Do you have a staging environment available to test this temporary workaround? If not, could you try the fix on the live site?
I tried the fix on the live website and it appears to have worked. Many thanks.
Just a quick question, do you know how I could remove 'I want to add more roles to this user' from the profile. I want them to be able to change roles, but don't want this additional link to show.
I've tried using in a function I've used to remove other unnecessary profile headings etc but can't seem to get this to work
For example this works:
function remove_personal_options(){
if ( current_user_can('my_admin') ) {
echo '<script type="text/javascript">jQuery(document).ready(function($) {
$(\'h2:contains("User Permissions"), h2:contains("Author Archive Settings"), h2:contains("Layout Settings") \').remove(); // remove the "User Permissions", "Author Archive Settings", "Layout Settings"
});</script>';}
}
add_action('admin_head','remove_personal_options');
So I tried targeting a.js-taccess-show-additionl-roles but this doesn't work.
and also in the above function:
$( "#profile-page table" ).eq( -2 ).css( "display", "none" );
But of course in this case targeting the class js-taccess-show-additionl-roles (again doesn't work).
I've also tried calling a css file to make changes to the back end (which works for other things)
.js-taccess-show-additionl-roles {
display: none;
}
But again doesn't work.
Could you advise or if you can't can I put in a request that we could hide this new option if not required - even if they have the promote_users capability.
I don't know of a way to disable that link using any options or plugin settings, but the pure CSS solution should work while you file a feature request - https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/
How exactly have you added the CSS? This code works for me:
.js-taccess-show-additionl-roles {
display: none;
}
I added that to a CSS file called admin-style.css, in my child theme directory. Then in functions.php I registered and enqueued that admin stylesheet:
function load_custom_wp_admin_style() {
wp_register_style( 'custom_wp_admin_css', get_stylesheet_directory_uri() . '/admin-style.css', false, '1.0.0' );
wp_enqueue_style( 'custom_wp_admin_css' );
}
add_action( 'admin_enqueue_scripts', 'load_custom_wp_admin_style' );
You can see in the inspector screenshot here the stylesheet is loaded, the CSS rule is applied to the link, and the link is hidden as expected.
My issue is resolved now. Thank you!