Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

[an error occurred while processing this directive] (5 posts)

Started 8 months, 4 weeks ago by: christophg

  • Profile picture of christophg christophg said 8 months, 4 weeks ago:

    Hello all! So I have been tinkering with a feedback plugin designed by @justbishop (as described here: http://wordpress.org/support/topic/any-plugin-similar-to-ebays-user-feedback-member-rating-feedback?replies=2). It works well but i need to set a conditional that causes it to only create a feedback page for members with an s2member level 1.

    I changed:

    add_action ( 'user_register', 'create_feedback_page' );
    
    function create_feedback_page(){
    
           create_feedback_page($user_id);
    
    		$user_info = get_userdata($user_id); }

    To:

    add_action ( 'user_register', 'create_feedback_page' );
    
    function create_feedback_page(){
    
    	if (!current_user_can('access_s2member_level1')) 
    
           create_feedback_page($user_id);
    
    		$user_info = get_userdata($user_id); }

    It worked at first but then I tested it a second time and upon clicking on the registration confirmation email i got the message “[an error occurred while processing this directive]” and when that page is refreshed it leads me to a page that asks for a valid activation code. I know it has to do with the changes I made to this plugin because when I reverse it all goes well. Any ideas on how to remedy this? ANY input would be GREATLY appreciated!

  • Profile picture of christophg christophg said 8 months, 4 weeks ago:

    im sorry, I lied. The original file was:

    add_action ( 'user_register', 'create_feedback_page' );
    
    function create_feedback_page($user_id){
    
    $user_info = get_userdata($user_id);

    and i changed that to:

    add_action ( 'user_register', 'create_feedback_page' );
    
    function create_feedback_page(){
    
    	if (!current_user_can('access_s2member_level1')) 
    
           create_feedback_page($user_id);
    
    		$user_info = get_userdata($user_id); }

    sorry for the double post.

  • Profile picture of christophg christophg said 8 months, 3 weeks ago:

    Anyone have ANY theories at all???

  • Profile picture of christophg christophg said 8 months, 2 weeks ago:

    did i perhaps not phrase the conditional correctly? been looking but cant find the answer.

  • Profile picture of justbishop justbishop said 7 months, 2 weeks ago:

    Wish I could help! Hope someone wiser than I comes along soon :)