Cannot change to the new avatar

I can upload an expert avatar just fine but can't seem to change the avatar image. When I've been trying to do so, there is a big empty white window popped up and hanged there for eternity. Please advice on this bug. Fixes coming out soon?

    • Code Injector
      • The Incredible Code Injector

      Thank you, Hoang. That's fixed it. Another problem I am having with your custom code, I have this snippet to be placed in theme functions.php or mu-plugins folder in order to hide the expired job post, it doesn't work though because after I put this code in, the job search result found nothing in all the tests.

      add_filter( 'jbp_job_search_params', 'exclude_expires_job', 20 );
      function exclude_expires_job( $args ) {
      	$jobs = JE_Job_Model::model()->all();
      	foreach ( $jobs as $job ) {
      		if ( $job->is_expired() ) {
      			$args['post__not_in'][] = $job->id;
      		}
      	}
      
      	$meta_query = array(
      		array(
      			'key'     => 'custom_job_status',
      			'value'   => 'skill_1',
      			'compare' => '=',
      		),
      	);
      
      	if ( ! isset( $args['meta_query'] ) ) {
      		$args['meta_query'] = $meta_query;
      	} else {
      		$args['meta_query'] = array_merge( $args['meta_query'], $meta_query );
      	}
      
      	return $args;
      }

      Should I remove this bit and waiting for the new official complete update? Please advice.

  • Hoang Ngo
    • Code Slayer

    Hi @Cas,

    I hope you are well today.
    Please try this

    add_filter( 'jbp_job_search_params', 'exclude_expires_job', 20 );
    function exclude_expires_job( $args ) {
    	$jobs = JE_Job_Model::model()->all();
    	foreach ( $jobs as $job ) {
    		if ( $job->is_expired() ) {
    			$args['post__not_in'][] = $job->id;
    		}
    	}
    	return $args;
    }

    If you have any additional issues, please let us know and we'll be happy to help.

    Best regards,
    Hoang

  • Code Injector
    • The Incredible Code Injector

    I have both codes tested again, turns out the both codes don't filter anything at all in search. It's displaying all the job posts I have even when I entered something nonsense like "fasdfasdlkj" and adjusted the budget price in order to narrow down the impossible which should have given me a zero search result, yet it still gives me something - actually all of the posts I have. I also completely removed the whole custom code part given here by using only the core unmodified beta plugin given yesterday, the normal search result doesn't seem to function filtering on both expired and non-expired posts at all - it shows everything.

  • Michael Bissett
    • Recruit

    Hey @Cas, Michael here!

    While I'm not seeing all of the posts with @Hoang Ngo's latest code here, I do see on my own site where a job I manually marked as expired (via the database) isn't being hidden presently.

    I've tried to work some code magic here, but it looks like we'll need Hoang's assistance for this one, I've asked him to have another look at things here. :slight_smile:

    Kind Regards,
    Michael

  • Hoang Ngo
    • Code Slayer

    Hi @Cas,

    I hope you are well today.
    Can you please try this?

    add_filter( 'jbp_job_search_params', 'exclude_expires_job', 20 );
    function exclude_expires_job( $args ) {
    	$jobs     = JE_Job_Model::model()->all();
    	$excludes = array();
    	foreach ( $jobs as $job ) {
    		if ( $job->is_expired() ) {
    			$excludes[] = $job->id;
    		}
    	}
    
    	if ( ! isset( $args['post__in'] ) || empty( $args['post__in'] ) ) {
    		$args['post__not_in'] = $excludes;
    	} else {
    		//because post__in and post__not_in can't be same query, we will filter
    		//the same key
    		$post_in = array_diff( $args['post__in'],
    			array_intersect( $args['post__in'], $excludes ) );
    
    		if ( empty( $post_in ) ) {
    			$post_in = array( - 1 );
    		}
    		$args['post__in'] = $post_in;
    	}
    	return $args;
    }

    This should works now :slight_smile:

    Best regards,
    Hoang

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.