Support » Plugin: Job Manager » Error: The plugin generated 162 characters of unexpected output during activatio

  • betocollin

    (@betocollin)


    The error below is shown on a simple local installation but on another production website I have it probably conflicted with WPML (sitepress-multilingual-cms).

    “The plugin generated 162 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.”

    Both plugins together cause 404 on every page (including homepage).

    Does anyone know a fix for it?

    Regards,

    Humberto

    http://wordpress.org/extend/plugins/job-manager/

Viewing 4 replies - 1 through 4 (of 4 total)
  • I am having this same problem.

    WordPress version: 3.5.1

    It happens right after I Install & Activate the plugin.

    My error says, “The plugin generated 158 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.”

    Same problem here with Job Manager plugin 0.7.20/Wordpress 3.5, haven’t found a fix yet. Here is the site: http://www.michanie.com/

    With debug on and the plugin activated, the messages I see at the top of the web site are:

    Notice: Trying to get property of non-object in /home/micha230/public_html/wp-content/plugins/job-manager/frontend.php on line 46
    
    Notice: Trying to get property of non-object in /home/micha230/public_html/wp-includes/post.php on line 3586
    
    Notice: Trying to get property of non-object in /home/micha230/public_html/wp-includes/post.php on line 3588
    
    Warning: Invalid argument supplied for foreach() in /home/micha230/public_html/wp-includes/post.php on line 3588
    
    Notice: Trying to get property of non-object in /home/micha230/public_html/wp-content/plugins/job-manager/functions.php on line 98
    
    Notice: Trying to get property of non-object in /home/micha230/public_html/wp-includes/post.php on line 3586
    
    Notice: Trying to get property of non-object in /home/micha230/public_html/wp-includes/post.php on line 3588
    
    Warning: Invalid argument supplied for foreach() in /home/micha230/public_html/wp-includes/post.php on line 3588

    When I deactivate job manager, all the messages go away. With debug off, when I activate I see the messages:

    The plugin generated 148 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.

    Hi,

    I solved my problem so I thought I would post it here in case it might help someone else.

    Changed wp-content/plugins/job-manager/frontend.php

    function jobman_flush_rewrite_rules() {
    	global $wp_rewrite;
    
    	$wp_rewrite->feeds[] = 'jobman';
    
    	$options = get_option( 'jobman_options' );
    
    	$root = get_page( $options['main_page'] );
    
    	$url = get_page_uri( $root->ID );

    to

    function jobman_flush_rewrite_rules() {
    	global $wp_rewrite;
    
    	$wp_rewrite->feeds[] = 'jobman';
    
    	$options = get_option( 'jobman_options' );
    	if (! $options) {
    		$root = get_page( $options['main_page'] );
    		if ($root) {
    			$url = get_page_uri( $root->ID );
    			if( ! $url )
    				return;
    		}
    		else return;
    	}
    	else return;

    and changed wp-content/plugins/job-manager/functions.php

    function jobman_page_taxonomy_setup() {
    	// Create our new page types
    	//register_post_type( 'jobman_job', array( 'exclude_from_search' => false, 'public' => true, 'show_ui' => false, 'singular_name' => __( 'Job', 'jobman' ), 'label' => __( 'Jobs', 'jobman' ) ) );
            register_post_type( 'jobman_job', array( 'exclude_from_search' => false, 'public' => true, 'show_ui' => false, 'singular_name' => __( 'Tender', 'jobman' ), 'label' => __( 'Tenders', 'jobman' ) ) );
    	register_post_type( 'jobman_joblist', array( 'exclude_from_search' => true ) );
    	register_post_type( 'jobman_app_form', array( 'exclude_from_search' => true ) );
    	register_post_type( 'jobman_app', array( 'exclude_from_search' => true ) );
    	register_post_type( 'jobman_register', array( 'exclude_from_search' => true ) );
    	register_post_type( 'jobman_email', array( 'exclude_from_search' => true ) );
    	register_post_type( 'jobman_interview', array( 'exclude_from_search' => true ) );
    
    	// Create our new taxonomy thing
    	$options = get_option( 'jobman_options' );
    
    	$root = get_page( $options['main_page'] );
    	$url = get_page_uri( $root->ID );
    
    	if( substr( $url, 0, 1 ) != '/' )
    		$url = "/$url";
    
    	register_taxonomy( 'jobman_category', array( 'jobman_job', 'jobman_app' ), array( 'hierarchical' => false, 'label' => __( 'Category', 'series' ), 'query_var' => 'jcat', 'rewrite' => array( 'slug' => $url ) ) );
    }

    to

    function jobman_page_taxonomy_setup() {
    	// Create our new page types
    	//register_post_type( 'jobman_job', array( 'exclude_from_search' => false, 'public' => true, 'show_ui' => false, 'singular_name' => __( 'Job', 'jobman' ), 'label' => __( 'Jobs', 'jobman' ) ) );
            register_post_type( 'jobman_job', array( 'exclude_from_search' => false, 'public' => true, 'show_ui' => false, 'singular_name' => __( 'Tender', 'jobman' ), 'label' => __( 'Tenders', 'jobman' ) ) );
    	register_post_type( 'jobman_joblist', array( 'exclude_from_search' => true ) );
    	register_post_type( 'jobman_app_form', array( 'exclude_from_search' => true ) );
    	register_post_type( 'jobman_app', array( 'exclude_from_search' => true ) );
    	register_post_type( 'jobman_register', array( 'exclude_from_search' => true ) );
    	register_post_type( 'jobman_email', array( 'exclude_from_search' => true ) );
    	register_post_type( 'jobman_interview', array( 'exclude_from_search' => true ) );
    
    	// Create our new taxonomy thing
    	$options = get_option( 'jobman_options' );
    	if ($options) {
    		$root = get_page( $options['main_page'] );
    		if ($root) {
    			$url = get_page_uri( $root->ID );
    
    			if( substr( $url, 0, 1 ) != '/' )
    				$url = "/$url";
    
    			register_taxonomy( 'jobman_category', array( 'jobman_job', 'jobman_app' ), array( 'hierarchical' => false, 'label' => __( 'Category', 'series' ), 'query_var' => 'jcat', 'rewrite' => array( 'slug' => $url ) ) );
    		}
    	}
    }

    Voila, no more messages!

    Actually, I later found out that doing this broke my job manager categories. Instead I suppressed the warnings in php.ini since I can’t find what anything that seems broke.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Error: The plugin generated 162 characters of unexpected output during activatio’ is closed to new replies.