[email protected]
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
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.
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!
Same problem here with Job Manager plugin 0.7.20/Wordpress 3.5, haven’t found a fix yet. Here is the site: https://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.
Viewing 3 replies - 1 through 3 (of 3 total)