Testing digest notifications

Author Message

Nathan Sharp

Monday 21 March 2005 4:58:35 pm

Hi, I've been having a great time playing around with a new site using ezPublish and have just gotten around to working on the notification e-mails. Is there a simple/easy way to force a send of a digest e-mail for testing? Having to only do 1 test per day will be slow to debug ;-)

Frederik Holljen

Wednesday 23 March 2005 1:40:03 am

Hm.. I don't quite get you. You can run the cronjob so you send out notification much more often that once a day.

Nathan Sharp

Wednesday 23 March 2005 7:07:25 pm

Perhaps I am confused also. I do run the cron job every 15 minutes, but the whole point of the digest format is that it only goes out once per day. How can I force it to go out now, even though it would normally wait until tonight so that I can debug it?

James Robertson

Wednesday 04 October 2006 3:49:06 pm

Edit eznotificationcollection_item.send_date DB field of the record you wish to send so that it is some time in the past (eg. 0).

Nathan Sharp

Monday 16 October 2006 12:55:15 pm

Thanks for the idea! It sounds like what I need. Next time I am messing with the templates, I will try it.

Petr Mifek

Tuesday 24 July 2007 2:09:24 am

That works, but at least as of 3.9.x, you can't set 0 - this won't work. You must use ie. "1". See kernel/classes/notification/eznotificationcollectionitem.php:

    function fetchByDate( $date )
    {
        return eZPersistentObject::fetchObjectList( eZNotificationCollectionItem::definition(),
                                                    null, array( 'send_date' => array( '<', $date ),
                                                                 'send_date' => array( '!=', 0 ) ) , null,null,
                                                    true );
    }

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 30 2025 21:44:41
Script start
Timing: Jan 30 2025 21:44:41
Module start 'layout'
Timing: Jan 30 2025 21:44:41
Module start 'content'
Timing: Jan 30 2025 21:44:41
Module end 'content'
Timing: Jan 30 2025 21:44:41
Script end

Main resources:

Total runtime0.0673 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 588.1250151.2109
Module start 'layout' 0.00540.0036 739.3359220.6875
Module start 'content' 0.00900.0563 960.02341,001.7891
Module end 'content' 0.06530.0019 1,961.812533.9922
Script end 0.0672  1,995.8047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00284.1393140.0002
Check MTime0.00111.5716140.0001
Mysql Total
Database connection0.00081.141810.0008
Mysqli_queries0.00223.227230.0007
Looping result0.00000.017710.0000
Template Total0.00142.010.0014
Template load0.00111.568110.0011
Template processing0.00030.459310.0003
Override
Cache load0.00060.829210.0006
General
dbfile0.035552.717480.0044
String conversion0.00000.007140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs