Forum Replies Created

Viewing 15 posts - 46 through 60 (of 95 total)
  • Author
    Posts
  • edering
    Participant

    Vlad,

    Thanks for your work on this. Unfortunately, the user group in question isn’t working. If you’re able, can you create a user with the role Program Editor and assign a
    Analytics Group Name checkbox in the user profile? You should not be able to see all posts — only a limited number. The good news is that creating a post no longer fails, however, all posts should not show for non-admin roles. Are you able to take a look? Thanks for your help so far.

    edering
    Participant

    Vladimir, I create an Admin user for you. Please look for an email to set your password. I am hoping you having access to the functions file and seeing where people assign the Analytics Group Name to a User will help you.

    edering
    Participant

    Vladimir,

    I’ve determined that having the get_posts loop inside the function is causing issues, however, if I take it outside of the function, I can no longer access the values of the loop. Am I missing something?

    edering
    Participant

    Thanks. I have debugging turned on and the only errors logged are the ones are showing are the ones I’ve pasted above:
    https://www.dropbox.com/s/wa0x9v892xrf0ua/server-errors.jpg?dl=0

    I’ll try turning off plugins and making the return adjustment above.

    edering
    Participant

    Vladimir,

    Thanks for the response. I had it return early in the even tthat there the were no values assigned to the custom field. Should I not do that? Also, there are ~500 pages on the site. There are likely occasions that nearly all could be returned. Would that cause this to time out?

    edering
    Participant

    Hi Vladimir,

    I took your recommendation above and to use the ure_edit_posts_access_id_list function and created this:

    add_filter('ure_edit_posts_access_id_list', 'ure_edit_posts_access_set_id_list_cu');
    
    function ure_edit_posts_access_set_id_list_cu($list) {
    
    	$current_user = wp_get_current_user();
    
    	$ag = get_field('analytics_group_name','user_' . $current_user->ID);
    
    	if(!isset($ag)){
    
    		return; 
    
    	}else{
    
    		$posts = get_posts(array(
    			'numberposts'	=> -1,
    			'post_type'		=> 'page',
    			'meta_query'	=> array(
    				'relation'		=> 'OR',
    				array(
    					'key'	 	=> 'analytics_group_name',
    					'value'	  	=> $ag,
    					'compare' 	=> 'IN',
    				),
    			),
    		));
    
    		foreach($posts as $post){
    			$list .= $post->ID.',';
    		}
    
    		$list = rtrim($list, ',');
    
    		wp_reset_postdata();
    
        	return $list;
    	}
    }

    I’m able to return a list via echo and can see my comma separated list in the admin at the top of the page if I use init() temporarily. However, when I attempt to create a page (or any post type) as one of the role types that have a restriction by custom field, the page eventually runs out of memory (currently set to 1G) and we receive several fatal errors:
    https://www.dropbox.com/s/wa0x9v892xrf0ua/server-errors.jpg?dl=0

    This role has what I believe to be everything needed for this role to create a post type:
    create_pages
    create_posts
    create_tablepress_tables
    create_tribe_events

    Other roles that we have set up do not have this issue, only this one. Any thoughts or recommendations on what we can try to resolve this issue?

    edering
    Participant

    Wow, I never knew that. Thanks. I wonder why full Admins don’t need to do that.

    edering
    Participant

    Hi Vladimir. The host provides the Event Calendar Pro so I don’t have access to get you a download. What I did was clone our Production site to Staging (via Kinsta) and gave your support address access as an Admin (username is userroleeditor). You should get the password reset email. My suggestion is you then create another user with the Role of “IU13 Admin”. That is role that cannot add Events to Appearance > Menus. Feel free to email direct if that is better. And thanks.

    edering
    Participant

    Hi. You reference WooCommerce. We are not using WooCommerce. The main issue is Modern Tribe’s Event Calendar Pro.

    in reply to: Including Tablepress in a Role #6059
    edering
    Participant

    Vladamir, I have something similar going on for the GTranslate plugin – https://wordpress.org/support/plugin/gtranslate/. I don’t see it in Admin Menu, and when I go to Administrator and look at Admin Menu, it shows “administrator.” https://www.screencast.com/t/s87umrEtcrHG How do I add access to that for a Role created in URE (one that is not the full-rights admin)?

    in reply to: Including Tablepress in a Role #6055
    edering
    Participant

    thanks!

    edering
    Participant

    Thanks for the update

    edering
    Participant

    Hi Vladamir. I was looking for this too. I would love it. Has it been added as a Setting?

    in reply to: limit Categories to be selected for a Post #6034
    edering
    Participant

    Thanks! That did it. You are amazing. I got confused because I did something similar for the Scholarships CPT but I guess the difference is that the filter/function for Scholarships was only because I did NOT want to restrict those at all by Post/Page ID and Users that have that role ALSO have Page ID Restrictions, so that separated it. Now I get it! Thanks

    in reply to: limit Categories to be selected for a Post #6032
    edering
    Participant

    ok, I will try that. Do I get rid of only the entire add_filter line and keep the function as is? https://www.screencast.com/t/hpt7aZDzvXd

Viewing 15 posts - 46 through 60 (of 95 total)