WordPress.org

Ready to get started?Download WordPress

Forums

Post Expirator
Not working, cron is firing (seems a problem with meta data) (3 posts)

  1. Stephen S
    Member
    Posted 1 year ago #

    hi I have a problem with your latest version not moving posts to draft status when they are expired. I have enabled debugging and can see that cron is running properly. What SEEMS to be happening is that the plugin sets meta_key "_expiration-date-processed" meta_value = "1", and then promptly ignored changing anything because it thinks these are already processed.

    If I go directly into the DB and change the meta values for that key to "0", teh next time post expirator runs it will correctly move all posts to draft when expired. But then it is broken again after that.

    Any ideas? The last (3) debug(s) is below:

    2012-09-30 13:33:58 END - DURATION: 0
    2012-09-30 13:33:58 PROCESSED POST IDS: Array ( [0] => 489 [1] => 323 [2] => 327 [3] => 346 [4] => 384 [5] => 351 [6] => 353 [7] => 380 [8] => 374 [9] => 385 [10] => 388 [11] => 393 [12] => 399 [13] => 401 [14] => 402 [15] => 407 [16] => 408 [17] => 414 [18] => 415 [19] => 418 [20] => 430 [21] => 440 [22] => 446 [23] => 463 [24] => 475 [25] => 477 [26] => 480 [27] => 484 [28] => 488 [29] => 490 [30] => 491 [31] => 492 [32] => 494 [33] => 496 [34] => 497 [35] => 498 [36] => 499 [37] => 501 [38] => 503 [39] => 504 [40] => 506 [41] => 507 [42] => 508 [43] => 509 [44] => 511 [45] => 512 [46] => 513 [47] => 515 [48] => 519 [49] => 520 [50] => 521 [51] => 524 [52] => 525 [53] => 526 [54] => 527 [55] => 528 [56] => 529 [57] => 531 [58] => 532 [59] => 533 [60] => 536 [61] => 537 [62] => 538 [63] => 540 [64] => 541 [65] => 543 [66] => 544 [67] => 545 [68] => 546 [69] => 548 [70] => 550 [71] => 551 [72] => 552 [73] => 555 [74] => 556 [75] => 557 [76] => 559 [77] => 560 [78] => 561 [79] => 562 [80] => 563 [81] => 564 [82] => 565 [83] => 567 [84] => 568 [85] => 569 [86] => 570 [87] => 571 [88] => 572 [89] => 573 [90] => 574 [91] => 575 [92] => 576 [93] => 577 [94] => 578 [95] => 579 [96] => 580 [97] => 581 [98] => 582 [99] => 583 [100] => 584 [101] => 585 [102] => 586 [103] => 587 [104] => 588 [105] => 589 [106] => 590 [107] => 591 [108] => 592 [109] => 593 [110] => 594 [111] => 595 [112] => 596 [113] => 597 [114] => 598 [115] => 599 [116] => 600 [117] => 601 [118] => 602 [119] => 603 [120] => 604 [121] => 605 [122] => 606 [123] => 607 [124] => 608 [125] => 609 [126] => 610 [127] => 611 [128] => 612 [129] => 613 [130] => 614 [131] => 615 [132] => 616 [133] => 617 [134] => 619 [135] => 618 [136] => 620 [137] => 621 [138] => 622 [139] => 623 [140] => 624 [141] => 625 [142] => 626 [143] => 627 [144] => 628 [145] => 629 [146] => 630 [147] => 631 [148] => 632 [149] => 633 [150] => 634 [151] => 635 [152] => 637 [153] => 638 [154] => 639 [155] => 640 [156] => 641 [157] => 642 [158] => 643 [159] => 644 [160] => 646 [161] => 647 [162] => 649 [163] => 651 [164] => 652 [165] => 653 [166] => 654 [167] => 656 [168] => 657 [169] => 658 [170] => 659 [171] => 660 [172] => 661 [173] => 662 [174] => 664 [175] => 665 [176] => 666 [177] => 667 [178] => 668 [179] => 669 [180] => 671 [181] => 672 [182] => 673 [183] => 674 [184] => 676 [185] => 677 [186] => 678 [187] => 679 [188] => 680 [189] => 681 [190] => 682 [191] => 683 [192] => 684 [193] => 685 [194] => 686 [195] => 688 [196] => 689 [197] => 691 [198] => 692 [199] => 693 [200] => 694 [201] => 695 [202] => 696 [203] => 697 [204] => 698 [205] => 699 [206] => 700 [207] => 701 [208] => 702 [209] => 703 [210] => 704 [211] => 705 [212] => 706 [213] => 707 [214] => 708 [215] => 709 [216] => 710 [217] => 711 [218] => 712 [219] => 713 [220] => 714 [221] => 715 [222] => 716 [223] => 717 [224] => 718 [225] => 719 [226] => 720 [227] => 721 [228] => 722 [229] => 723 [230] => 724 [231] => 725 [232] => 726 [233] => 727 [234] => 735 [235] => 736 [236] => 737 [237] => 738 [238] => 739 [239] => 740 [240] => 741 [241] => 743 [242] => 744 [243] => 745 [244] => 746 [245] => 747 [246] => 748 [247] => 749 [248] => 751 [249] => 752 [250] => 753 [251] => 754 [252] => 755 [253] => 756 [254] => 757 [255] => 758 [256] => 760 [257] => 761 [258] => 762 [259] => 764 [260] => 765 [261] => 766 [262] => 767 [263] => 768 [264] => 770 [265] => 769 [266] => 771 [267] => 772 [268] => 773 [269] => 774 [270] => 775 [271] => 776 [272] => 777 [273] => 778 [274] => 779 [275] => 780 [276] => 781 [277] => 782 [278] => 783 [279] => 784 [280] => 785 [281] => 786 [282] => 787 [283] => 789 [284] => 790 [285] => 791 [286] => 792 [287] => 793 [288] => 797 [289] => 800 [290] => 802 [291] => 807 [292] => 809 [293] => 811 [294] => 812 [295] => 815 [296] => 819 [297] => 820 [298] => 822 [299] => 828 [300] => 832 [301] => 834 [302] => 836 [303] => 840 [304] => 841 [305] => 843 [306] => 850 [307] => 852 [308] => 854 )
    2012-09-30 13:33:58 SQL PROCESSED: select post_id from pejobs_postmeta where meta_key = "_expiration-date-processed" AND meta_value = "1"
    2012-09-30 13:33:58 SQL EXPIRE: select post_id, meta_value from pejobs_postmeta as postmeta, pejobs_posts as posts where postmeta.post_id = posts.ID AND posts.post_status = "publish" AND postmeta.meta_key = "expiration-date" AND postmeta.meta_value <= "1349012038"
    2012-09-30 13:33:58 START
    2012-09-30 13:31:12 END - DURATION: 0
    2012-09-30 13:31:12 PROCESSED POST IDS: Array ( [0] => 489 [1] => 323 [2] => 327 [3] => 346 [4] => 384 [5] => 351 [6] => 353 [7] => 380 [8] => 374 [9] => 385 [10] => 388 [11] => 393 [12] => 399 [13] => 401 [14] => 402 [15] => 407 [16] => 408 [17] => 414 [18] => 415 [19] => 418 [20] => 430 [21] => 440 [22] => 446 [23] => 463 [24] => 475 [25] => 477 [26] => 480 [27] => 484 [28] => 488 [29] => 490 [30] => 491 [31] => 492 [32] => 494 [33] => 496 [34] => 497 [35] => 498 [36] => 499 [37] => 501 [38] => 503 [39] => 504 [40] => 506 [41] => 507 [42] => 508 [43] => 509 [44] => 511 [45] => 512 [46] => 513 [47] => 515 [48] => 519 [49] => 520 [50] => 521 [51] => 524 [52] => 525 [53] => 526 [54] => 527 [55] => 528 [56] => 529 [57] => 531 [58] => 532 [59] => 533 [60] => 536 [61] => 537 [62] => 538 [63] => 540 [64] => 541 [65] => 543 [66] => 544 [67] => 545 [68] => 546 [69] => 548 [70] => 550 [71] => 551 [72] => 552 [73] => 555 [74] => 556 [75] => 557 [76] => 559 [77] => 560 [78] => 561 [79] => 562 [80] => 563 [81] => 564 [82] => 565 [83] => 567 [84] => 568 [85] => 569 [86] => 570 [87] => 571 [88] => 572 [89] => 573 [90] => 574 [91] => 575 [92] => 576 [93] => 577 [94] => 578 [95] => 579 [96] => 580 [97] => 581 [98] => 582 [99] => 583 [100] => 584 [101] => 585 [102] => 586 [103] => 587 [104] => 588 [105] => 589 [106] => 590 [107] => 591 [108] => 592 [109] => 593 [110] => 594 [111] => 595 [112] => 596 [113] => 597 [114] => 598 [115] => 599 [116] => 600 [117] => 601 [118] => 602 [119] => 603 [120] => 604 [121] => 605 [122] => 606 [123] => 607 [124] => 608 [125] => 609 [126] => 610 [127] => 611 [128] => 612 [129] => 613 [130] => 614 [131] => 615 [132] => 616 [133] => 617 [134] => 619 [135] => 618 [136] => 620 [137] => 621 [138] => 622 [139] => 623 [140] => 624 [141] => 625 [142] => 626 [143] => 627 [144] => 628 [145] => 629 [146] => 630 [147] => 631 [148] => 632 [149] => 633 [150] => 634 [151] => 635 [152] => 637 [153] => 638 [154] => 639 [155] => 640 [156] => 641 [157] => 642 [158] => 643 [159] => 644 [160] => 646 [161] => 647 [162] => 649 [163] => 651 [164] => 652 [165] => 653 [166] => 654 [167] => 656 [168] => 657 [169] => 658 [170] => 659 [171] => 660 [172] => 661 [173] => 662 [174] => 664 [175] => 665 [176] => 666 [177] => 667 [178] => 668 [179] => 669 [180] => 671 [181] => 672 [182] => 673 [183] => 674 [184] => 676 [185] => 677 [186] => 678 [187] => 679 [188] => 680 [189] => 681 [190] => 682 [191] => 683 [192] => 684 [193] => 685 [194] => 686 [195] => 688 [196] => 689 [197] => 691 [198] => 692 [199] => 693 [200] => 694 [201] => 695 [202] => 696 [203] => 697 [204] => 698 [205] => 699 [206] => 700 [207] => 701 [208] => 702 [209] => 703 [210] => 704 [211] => 705 [212] => 706 [213] => 707 [214] => 708 [215] => 709 [216] => 710 [217] => 711 [218] => 712 [219] => 713 [220] => 714 [221] => 715 [222] => 716 [223] => 717 [224] => 718 [225] => 719 [226] => 720 [227] => 721 [228] => 722 [229] => 723 [230] => 724 [231] => 725 [232] => 726 [233] => 727 [234] => 735 [235] => 736 [236] => 737 [237] => 738 [238] => 739 [239] => 740 [240] => 741 [241] => 743 [242] => 744 [243] => 745 [244] => 746 [245] => 747 [246] => 748 [247] => 749 [248] => 751 [249] => 752 [250] => 753 [251] => 754 [252] => 755 [253] => 756 [254] => 757 [255] => 758 [256] => 760 [257] => 761 [258] => 762 [259] => 764 [260] => 765 [261] => 766 [262] => 767 [263] => 768 [264] => 770 [265] => 769 [266] => 771 [267] => 772 [268] => 773 [269] => 774 [270] => 775 [271] => 776 [272] => 777 [273] => 778 [274] => 779 [275] => 780 [276] => 781 [277] => 782 [278] => 783 [279] => 784 [280] => 785 [281] => 786 [282] => 787 [283] => 789 [284] => 790 [285] => 791 [286] => 792 [287] => 793 [288] => 797 [289] => 800 [290] => 802 [291] => 807 [292] => 809 [293] => 811 [294] => 812 [295] => 815 [296] => 819 [297] => 820 [298] => 822 [299] => 828 [300] => 832 [301] => 834 [302] => 836 [303] => 840 [304] => 841 [305] => 843 [306] => 850 [307] => 852 [308] => 854 )
    2012-09-30 13:31:12 SQL PROCESSED: select post_id from pejobs_postmeta where meta_key = "_expiration-date-processed" AND meta_value = "1"
    2012-09-30 13:31:12 SQL EXPIRE: select post_id, meta_value from pejobs_postmeta as postmeta, pejobs_posts as posts where postmeta.post_id = posts.ID AND posts.post_status = "publish" AND postmeta.meta_key = "expiration-date" AND postmeta.meta_value <= "1349011872"
    2012-09-30 13:31:12 START
    2012-09-30 13:30:01 END - DURATION: 0
    2012-09-30 13:30:01 PROCESSED POST IDS: Array ( [0] => 489 [1] => 323 [2] => 327 [3] => 346 [4] => 384 [5] => 351 [6] => 353 [7] => 380 [8] => 374 [9] => 385 [10] => 388 [11] => 393 [12] => 399 [13] => 401 [14] => 402 [15] => 407 [16] => 408 [17] => 414 [18] => 415 [19] => 418 [20] => 430 [21] => 440 [22] => 446 [23] => 463 [24] => 475 [25] => 477 [26] => 480 [27] => 484 [28] => 488 [29] => 490 [30] => 491 [31] => 492 [32] => 494 [33] => 496 [34] => 497 [35] => 498 [36] => 499 [37] => 501 [38] => 503 [39] => 504 [40] => 506 [41] => 507 [42] => 508 [43] => 509 [44] => 511 [45] => 512 [46] => 513 [47] => 515 [48] => 519 [49] => 520 [50] => 521 [51] => 524 [52] => 525 [53] => 526 [54] => 527 [55] => 528 [56] => 529 [57] => 531 [58] => 532 [59] => 533 [60] => 536 [61] => 537 [62] => 538 [63] => 540 [64] => 541 [65] => 543 [66] => 544 [67] => 545 [68] => 546 [69] => 548 [70] => 550 [71] => 551 [72] => 552 [73] => 555 [74] => 556 [75] => 557 [76] => 559 [77] => 560 [78] => 561 [79] => 562 [80] => 563 [81] => 564 [82] => 565 [83] => 567 [84] => 568 [85] => 569 [86] => 570 [87] => 571 [88] => 572 [89] => 573 [90] => 574 [91] => 575 [92] => 576 [93] => 577 [94] => 578 [95] => 579 [96] => 580 [97] => 581 [98] => 582 [99] => 583 [100] => 584 [101] => 585 [102] => 586 [103] => 587 [104] => 588 [105] => 589 [106] => 590 [107] => 591 [108] => 592 [109] => 593 [110] => 594 [111] => 595 [112] => 596 [113] => 597 [114] => 598 [115] => 599 [116] => 600 [117] => 601 [118] => 602 [119] => 603 [120] => 604 [121] => 605 [122] => 606 [123] => 607 [124] => 608 [125] => 609 [126] => 610 [127] => 611 [128] => 612 [129] => 613 [130] => 614 [131] => 615 [132] => 616 [133] => 617 [134] => 619 [135] => 618 [136] => 620 [137] => 621 [138] => 622 [139] => 623 [140] => 624 [141] => 625 [142] => 626 [143] => 627 [144] => 628 [145] => 629 [146] => 630 [147] => 631 [148] => 632 [149] => 633 [150] => 634 [151] => 635 [152] => 637 [153] => 638 [154] => 639 [155] => 640 [156] => 641 [157] => 642 [158] => 643 [159] => 644 [160] => 646 [161] => 647 [162] => 649 [163] => 651 [164] => 652 [165] => 653 [166] => 654 [167] => 656 [168] => 657 [169] => 658 [170] => 659 [171] => 660 [172] => 661 [173] => 662 [174] => 664 [175] => 665 [176] => 666 [177] => 667 [178] => 668 [179] => 669 [180] => 671 [181] => 672 [182] => 673 [183] => 674 [184] => 676 [185] => 677 [186] => 678 [187] => 679 [188] => 680 [189] => 681 [190] => 682 [191] => 683 [192] => 684 [193] => 685 [194] => 686 [195] => 688 [196] => 689 [197] => 691 [198] => 692 [199] => 693 [200] => 694 [201] => 695 [202] => 696 [203] => 697 [204] => 698 [205] => 699 [206] => 700 [207] => 701 [208] => 702 [209] => 703 [210] => 704 [211] => 705 [212] => 706 [213] => 707 [214] => 708 [215] => 709 [216] => 710 [217] => 711 [218] => 712 [219] => 713 [220] => 714 [221] => 715 [222] => 716 [223] => 717 [224] => 718 [225] => 719 [226] => 720 [227] => 721 [228] => 722 [229] => 723 [230] => 724 [231] => 725 [232] => 726 [233] => 727 [234] => 735 [235] => 736 [236] => 737 [237] => 738 [238] => 739 [239] => 740 [240] => 741 [241] => 743 [242] => 744 [243] => 745 [244] => 746 [245] => 747 [246] => 748 [247] => 749 [248] => 751 [249] => 752 [250] => 753 [251] => 754 [252] => 755 [253] => 756 [254] => 757 [255] => 758 [256] => 760 [257] => 761 [258] => 762 [259] => 764 [260] => 765 [261] => 766 [262] => 767 [263] => 768 [264] => 770 [265] => 769 [266] => 771 [267] => 772 [268] => 773 [269] => 774 [270] => 775 [271] => 776 [272] => 777 [273] => 778 [274] => 779 [275] => 780 [276] => 781 [277] => 782 [278] => 783 [279] => 784 [280] => 785 [281] => 786 [282] => 787 [283] => 789 [284] => 790 [285] => 791 [286] => 792 [287] => 793 [288] => 797 [289] => 800 [290] => 802 [291] => 807 [292] => 809 [293] => 811 [294] => 812 [295] => 815 [296] => 819 [297] => 820 [298] => 822 [299] => 828 [300] => 832 [301] => 834 [302] => 836 [303] => 840 [304] => 841 [305] => 843 [306] => 850 [307] => 852 [308] => 854 )
    2012-09-30 13:30:01 SQL PROCESSED: select post_id from pejobs_postmeta where meta_key = "_expiration-date-processed" AND meta_value = "1"
    2012-09-30 13:30:01 SQL EXPIRE: select post_id, meta_value from pejobs_postmeta as postmeta, pejobs_posts as posts where postmeta.post_id = posts.ID AND posts.post_status = "publish" AND postmeta.meta_key = "expiration-date" AND postmeta.meta_value <= "1349011801"
    2012-09-30 13:30:01 START

    http://wordpress.org/extend/plugins/post-expirator/

  2. Stephen S
    Member
    Posted 1 year ago #

    One other thing perhaps useful to note: the posts I am expiring are custom post types.

  3. Stephen S
    Member
    Posted 1 year ago #

    Well, it does not seem like an ideal solution, but I have temporarily built a cronjob that will run the following query once a day:

    Update postmeta set meta_value='0' WHERE meta_key = '_expiration-date-processed' AND meta_value= '1'

    And that has fixed it for now (or at least seems to have). Now the plugin will correctly expire items.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic