[solved] Digest screws up

Author Message

Clemens T

Tuesday 22 November 2005 5:44:13 am

Heya all,

The digest of ezpublish 3.7.0 screws up. It does not work when I try to use it (even on a somewhat fresh install of 3.7.0). I only use the '/notification/settings' to interact with ezpublish.

Does everyone have this problem? Is it a bug/feature? Please let me know WHAT you need to help me solve this problem.. cause my customers would like the digest!

Thanks,
Clemens

Clemens T

Wednesday 23 November 2005 3:27:03 pm

The problem occurs in:
/kernel/notification/eznotificationfunctioncollection.php

on line:78

75    function eventContent( $eventID )
76    {
77        $event = eZNotificationEvent::fetch( $eventID );
78        return array( 'result' => $event->content() );
79    }

The $event variable is an array() (when running the notification cronjob), so the ->content() function cannot be called on an array ( at best at it's elements.. but that's not the case in the ezcore file). So, again: is this a bug?

Thanks,
Clemens

Frederik Holljen

Thursday 24 November 2005 1:23:03 am

What behavior do you experience? (and what do you expect?)

Clemens T

Thursday 24 November 2005 1:33:33 am

case: Ok, I have a few contentobjects.. and I'd like to know when they change. Problem is: if I change like 40 of them, my customers get 40 mails. The best thing would be to di-gest them in 1 mail, so 'they' don't see it as spam.

current di-gest behaviour:

Mail is NOT sent, and I get the following error on runcronjobs.php (with debug output):

Fatal error: Call to a member function on a non-object in /opt/guide/www.blaat.com/ezpublish-3.7.0/kernel/notification/eznotificationfunctioncollection.php on line 79 Fatal error: eZ publish did not finish its request The execution of eZ publish was abruptly ended, the debug output is present below. 

I believe this error is caused by the ->content() function on the array().. the array() is not an object, but the elements IN te array are objects.

problem is: this could lead to an inconsistent database.

note: the objects that are 'digested' still exist, so that's not the issue with the non-object fatal error.

.....

Expected behaviour:
The mail we sent to people is bundled (digested) in 1 mail which is sent on the proper time.

Nathan Sharp

Friday 09 December 2005 5:28:18 pm

I have the same problem. Looks like a bug in eznotificationevent::fetch. Edit kernel/classes/notification/eznotificationevent.php and change the fetch function to call ezpersistentobject::fetchObject instead of fetchObjectList:

    function fetch( $eventID )
    {
        return eZPersistentObject::fetchObject( eZNotificationEvent::definition(),
                                                        null,  array( 'id' => $eventID ));
    }

Clemens T

Sunday 11 December 2005 1:50:56 pm

Can't believe someone of the ezpublish crew doesn't answer this one..
I'll see if I can fix it tomorrow!

Thanks.. I'll let you know if it worked!

Kåre Køhler Høvik

Sunday 11 December 2005 11:06:06 pm

We've now started looking at it.

Kåre Høvik

Clemens T

Monday 12 December 2005 12:42:25 pm

Nathan, well done.. that seems to be the problem.

Really a tough one!
Thanks.

I'm now going to test it extensively.. to make sure it works on all possible ways. If no new subpost here.. then it's fixed.

Thanks again!!

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 18 2025 16:27:08
Script start
Timing: Jan 18 2025 16:27:08
Module start 'layout'
Timing: Jan 18 2025 16:27:08
Module start 'content'
Timing: Jan 18 2025 16:27:09
Module end 'content'
Timing: Jan 18 2025 16:27:09
Script end

Main resources:

Total runtime0.7008 sec
Peak memory usage4,096.0000 KB
Database Queries76

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 589.3359152.6250
Module start 'layout' 0.00710.0029 741.960939.4453
Module start 'content' 0.01010.6892 781.4063670.7500
Module end 'content' 0.69930.0015 1,452.156316.1641
Script end 0.7008  1,468.3203 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.5550160.0002
Check MTime0.00160.2261160.0001
Mysql Total
Database connection0.00090.132310.0009
Mysqli_queries0.637290.9201760.0084
Looping result0.00060.0880740.0000
Template Total0.670695.720.3353
Template load0.00240.343620.0012
Template processing0.668295.350020.3341
Template load and register function0.00020.024610.0002
states
state_id_array0.00110.163410.0011
state_identifier_array0.00080.116120.0004
Override
Cache load0.00220.3072460.0000
Sytem overhead
Fetch class attribute can translate value0.00090.128940.0002
Fetch class attribute name0.00110.1582100.0001
XML
Image XML parsing0.00120.164340.0003
class_abstraction
Instantiating content class attribute0.00000.0024100.0000
General
dbfile0.00100.1363210.0000
String conversion0.00000.001340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
14content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 35
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs