Post Expirator
Notices & Site Breaking (3 posts)

  1. Travis Smith
    Posted 4 years ago #

    In a multisite installation, the plugin generated 348 characters of unexpected output during activation on a single site.

    Also with WP_DEBUG, on the post-new screen, it generated this notice:
    Notice: Undefined variable: enabled in /HOME/USERNAME/public_html/wp-content/plugins/post-expirator/post-expirator.php on line 196

    When I try to save a post, I get the white screen of death and these notices:
    Notice: Undefined index: expirationdate_category in /HOME/USERNAME/public_html/wp-content/plugins/post-expirator/post-expirator.php on line 338

    Notice: Undefined index: expirationdate_category in /HOME/USERNAME//public_html/wp-content/plugins/post-expirator/post-expirator.php on line 338

    Warning: Cannot modify header information - headers already sent by (output started at /HOME/USERNAME/public_html/wp-content/plugins/post-expirator/post-expirator.php:338) in /HOME/USERNAME/public_html/wp-includes/pluggable.php on line 881


  2. Travis Smith
    Posted 4 years ago #

    To clear the characters during activation, it appears that you are missing a global var. Line 127ff add global $current_blog;:
    global $current_blog;

    if (postExpirator_is_wpmu())
    	add_action ('expirationdate_delete_'.$current_blog->blog_id, 'expirationdate_delete_expired_posts');
    	add_action ('expirationdate_delete', 'expirationdate_delete_expired_posts');

    Then to clear the notice on line 196, add $enabled = ''; at about line 184.

    if (empty($expirationdatets)) {
    	$defaultmonth = date('F');
    	$defaultday = date('d');
    	$defaulthour = date('H');
    	$defaultyear = date('Y');
    	$defaultminute = date('i');
    	$enabled = '';
    	$disabled = ' disabled="disabled"';
    	$categories = get_option('expirationdateCategoryDefaults');
    } else {
    	$defaultmonth = date('F',$expirationdatets);
    	$defaultday = date('d',$expirationdatets);
    	$defaultyear = date('Y',$expirationdatets);
    	$defaulthour = date('H',$expirationdatets);
    	$defaultminute = date('i',$expirationdatets);
    	$categories = get_post_meta($post->ID,'_expiration-date-category',true);
    	$enabled = ' checked="checked"';
    	$disabled = '';
  3. Aaron Axelsen
    Plugin Author

    Posted 4 years ago #

    Take a look at the development version - I believe all of these and a few others are addressed.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Post Expirator
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic