WPML

Übersicht über das Problem

Wenn WPML mit dem Applications-Add-on von WP Job Manager verwendet wird, zeigt das Job-Dashboard fälschlicherweise Bewerbungsformulare aus allen Sprachen an, anstatt nur die Formulare in der aktuellen Sprache anzuzeigen. Dies betrifft das Job-Bearbeitungsformular und führt zu Verwirrung bei den Benutzern.

Problemumgehung

Dieses Problem ist behoben. Ein Update auf die neueste Version behebt dies auf Ihrer Website, daher benötigen Sie diese Problemumgehung nur, wenn Sie noch nicht aktualisieren können.

Bitte stellen Sie sicher, dass Sie über ein vollständiges Website-Backup Ihrer Website verfügen, bevor Sie fortfahren.

  • Öffnen Sie die Datei …/\wp-content/plugins/wp-job-manager-applications/includes/wp-job-manager-applications-functions.php.
  • Suchen Sie nach Zeile 302.
  • Ersetzen Sie:
    function get_application_forms() {
    	$posts = new WP_Query(
    		array(
    			'post_type'        => 'job_application_form',
    			'posts_per_page'   => - 1,
    			'suppress_filters' => true,
    			'orderby'          => 'title',
    			'order'            => 'ASC',
    		)
    	);
    
    	$default_form = WP_Job_Manager_Applications_Default_Form::get_default_form();
    
    	if ( $posts->post_count <= 1 ) {
    		return null;
    	}
    	$application_forms = [];
    
    	if ( array_key_exists( 'ID', $default_form ) ) {
    		$application_forms[ $default_form['ID'] ] = $default_form['post_title'];
    	}
    
    	foreach ( $posts->posts as $post ) {
    		$application_forms[ $post->ID ] = $post->post_title;
    	}
    	return apply_filters( 'job_application_forms', $application_forms );
    }
  • Durch:
    // WPML Workaround for compsupp-7797
    function get_application_forms() {
    	$posts = new WP_Query(
    		array(
    			'post_type'        => 'job_application_form',
    			'posts_per_page'   => - 1,
    			'suppress_filters' => false, // replace true with false
    			'orderby'          => 'title',
    			'order'            => 'ASC',
    		)
    	);
    
    	$default_form = WP_Job_Manager_Applications_Default_Form::get_default_form();
    
    	if ( $posts->post_count < 1 ) { // replace <= with <
    		return null;
    	}
    	$application_forms = [];
      /* comment out this part if you don't want to see the default form in other languages
    	if ( array_key_exists( 'ID', $default_form ) ) {
    		$application_forms[ $default_form['ID'] ] = $default_form['post_title'];
    	}*/
    
    	foreach ( $posts->posts as $post ) {
    		$application_forms[ $post->ID ] = $post->post_title;
    	}
    	return apply_filters( 'job_application_forms', $application_forms );
    }

Alle bekannten Probleme

Tritt dieses Problem weiterhin auf?

Wenn das Update das Problem nicht behebt, stellen Sie eine Support-Anfrage und wir sehen uns das gemeinsam mit Ihnen an.