[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.