• I downloaded this plugin without a page titled “sermon”, and received a fatal error on activation. This is on a fresh new install of wordpress (3.4.2) on a WAMP server on my home laptop. Everything installed correctly, but could not be activated.

    Here is the error that I get:

    array( 'name' => __( 'Sermons' ), 'singular_name' => __( 'Sermon' ), 'add_new' => __( 'Add a new sermon' ), 'add_new_item' => __( 'Add a new sermon' ), 'edit_item' => __( 'Edit a sermon' ), 'new_item' => __( 'Edit a sermon' ), 'view_item' => __( 'View sermon information' ), ), 'supports' => array( 'title', 'editor', 'author'), 'capability_type' => 'post', 'public' => true, 'has_archive' => true, 'rewrite' => array('slug' => 'sermons'), 'register_meta_box_cb' => 'add_sermon_metaboxes' ) ); } function add_sermon_metaboxes() { add_meta_box('wpt_sermon_upload', 'Upload sermon file', 'wpt_sermon_upload', 'easysermon', 'side', 'default'); add_meta_box('wpt_sermon_url', 'Sermon file location', 'wpt_sermon_url', 'easysermon', 'side', 'default'); } function wpt_sermon_url() { global $post; // Noncename needed to verify where the data originated echo ''; // Get the location data if its already been entered $url = get_post_meta($post->ID, '_url', true); // Echo out the field echo ''; } function wpt_sermon_upload() { global $post; // Noncename needed to verify where the data originated echo ''; // Get the location data if its already been entered $url = get_post_meta($post->ID, '_upload', true); // Echo out the field echo ''; echo ''; echo '
    
    Upload an audio file. Please be aware that some hosts have limits on the size of file that you can upload.
    '; } // Save the Metabox Data function wpt_save_sermon_meta($post_id, $post) { // verify this came from our screen and with proper authorization, // because save_post can be triggered at other times if ( !wp_verify_nonce( $_POST['sermonmeta_noncename'], plugin_basename(__FILE__) )) { return $post->ID; } // Is the user allowed to edit the post or page? if ( !current_user_can( 'edit_post', $post->ID )) return $post->ID; // OK, we're authenticated: we need to find and save the data // We'll put it into an array to make it easier to loop though. $sermon_meta['_upload'] = $_POST['_upload']; $sermon_meta['_url'] = $_POST['_url']; // Add values of $events_meta as custom fields foreach ($sermon_meta as $key => $value) { // Cycle through the $sermon_meta array! if( $post->post_type == 'revision' ) return; // Don't store custom data twice $value = implode(',', (array)$value); // If $value is an array, make it a CSV (unlikely) if(get_post_meta($post->ID, $key, FALSE)) { // If the custom field already has a value update_post_meta($post->ID, $key, $value); } else { // If the custom field doesn't have a value add_post_meta($post->ID, $key, $value); } if(!$value) delete_post_meta($post->ID, $key); // Delete if blank } } add_action('save_post', 'wpt_save_sermon_meta', 1, 2); // save //Template fallback add_action("template_redirect", 'easy_sermon_redirect'); function easy_sermon_redirect() { global $wp; global $posts; global $post; $plugindir = dirname( __FILE__ ); // Sermon page if ($wp->query_vars["post_type"] == 'easysermon') { $templatefilename = 'archive-sermons.php'; if (file_exists(TEMPLATEPATH . '/' . $templatefilename)) { $return_template = TEMPLATEPATH . '/' . $templatefilename; } else { $return_template = $plugindir . '/themefiles/' . $templatefilename; } easy_sermon_do_redirect($return_template); } if (is_page('sermons')) { $templatefilename = 'archive-sermons.php'; if (file_exists(TEMPLATEPATH . '/' . $templatefilename)) { $return_template = TEMPLATEPATH . '/' . $templatefilename; } else { $return_template = $plugindir . '/themefiles/' . $templatefilename; } easy_sermon_do_redirect($return_template); } } function easy_sermon_do_redirect($url) { global $post, $wp_query; if (have_posts()) { include($url); die(); } else { $wp_query->is_404 = true; } } ?>
    ( ! ) Parse error: syntax error, unexpected T_ENDWHILE in C:\wamp\www\wp-content\plugins\easy-sermon\displayArchive.php on line 71
    Call Stack
    #	Time	Memory	Function	Location
    1	0.0033	975824	{main}( )	..\plugins.php:0
    2	1.7434	35055624	plugin_sandbox_scrape( )	..\plugins.php:156
    3	1.7440	35085880	include( 'C:\wamp\www\wp-content\plugins\easy-sermon\easy-sermon.php' )	..\plugins.php:154

    Hope this can be resolved.

    http://wordpress.org/extend/plugins/easy-sermon/

  • The topic ‘[Plugin: Easy Sermon] Fresh new install (fatal error)’ is closed to new replies.