Mailing List Archive

Event removal and attendee removal
Hi,

I’m seeing in the logs the following errors :

[Mon Apr 27 09:47:50.364923 2015] [:error] [pid 15006] [client XX.XX.XX.XX:58727] ================= Stack Trace ===================
[Mon Apr 27 09:47:50.364968 2015] [:error] [pid 15006] [client XX.XX.XX.XX:58727] ===> /expert/htwebs/davical/htdocs/caldav.php[133] calls include()
[Mon Apr 27 09:47:50.364982 2015] [:error] [pid 15006] [client XX.XX.XX.XX:58727] ===> /expert/htwebs/davical/inc/caldav-DELETE.php[77] calls do_scheduling_for_delete()
[Mon Apr 27 09:47:50.364994 2015] [:error] [pid 15006] [client XX.XX.XX.XX:58727] ===> /expert/htwebs/davical/inc/schedule-functions.php[32] calls DAVResource->GetProperty()
[Mon Apr 27 09:47:50.433348 2015] [:error] [pid 15006] [client XX.XX.XX.XX:58727] PHP Fatal error: Class 'EMail' not found in /expert/htwebs/davical/inc/schedule-functions.php on line 389

I know this is due to Davical is trying to notify an organizer that the calendar owner where the event is trying to be deleted is declining the invitation. As the declining should be done to a non local
user, it’s trying to notify through mail. But it gives this errors. I think this is something done intentionally by Davical programmers or something similar, but is it possible to either make invitations work
through email or at least if this is happening just to bypass this email attempt when has failed like know without returning the 500 error?. I know it’s out of RFC… but it’s slightly annoying this kind of
errors mainly when are done in old events not having at present any kind of importance.

I await your suggestions :)

Best regards,
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Davical-general mailing list
Davical-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/davical-general
Re: Event removal and attendee removal [ In reply to ]
Hi Egon,

On Mon, Apr 27, 2015 at 11:05:06AM +0200, Egoitz Aurrekoetxea wrote:
> [Mon Apr 27 09:47:50.433348 2015] [:error] [pid 15006] [client XX.XX.XX.XX:58727] PHP Fatal error: Class 'EMail' not found in /expert/htwebs/davical/inc/schedule-functions.php on line 389

what version of Davical and AWL are you using? I think this is an error
that can only be seen when AWL is older than what's required by your
Davical version.

Florian


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Davical-general mailing list
Davical-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/davical-general
Re: Event removal and attendee removal [ In reply to ]
Hi!,

1.1.2 and 0.54

Thank you!!
> El 27/4/2015, a las 12:08, Florian Schlichting <fsfs@debian.org> escribió:
>
> Hi Egon,
>
> On Mon, Apr 27, 2015 at 11:05:06AM +0200, Egoitz Aurrekoetxea wrote:
>> [Mon Apr 27 09:47:50.433348 2015] [:error] [pid 15006] [client XX.XX.XX.XX:58727] PHP Fatal error: Class 'EMail' not found in /expert/htwebs/davical/inc/schedule-functions.php on line 389
>
> what version of Davical and AWL are you using? I think this is an error
> that can only be seen when AWL is older than what's required by your
> Davical version.
>
> Florian
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Davical-general mailing list
> Davical-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/davical-general


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Davical-general mailing list
Davical-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/davical-general
Re: Event removal and attendee removal [ In reply to ]
Hi again,

I think I have solved something….

It seemed the EMail class was not being properly included in the schedule-functions.php… perhaps some bug overthere in the AWL or Davical….

If you insert a require_once below require_once('RRule-v2.php’); it sends to the log :


[Mon Apr 27 12:35:52.834691 2015] [:error] [pid 32275] [client XX.XX.XX.XX:24812] PHP Parse error: syntax error, unexpected 'function' (T_FUNCTION) in /expert/htwebs/davical/inc/schedule-functions.php on line 25

So I have tried including it directly finally editing the schedule-functions.php leaving it as this patch describes :

--- schedule-functions.php-27042015 2015-04-27 12:36:20.000000000 +0200
+++ schedule-functions.php 2015-04-27 14:39:12.000000000 +0200
@@ -8,6 +8,250 @@
* @copyright Morphoss Ltd - http://www.morphoss.com/
* @license http://gnu.org/copyleft/gpl.html GNU GPL v2 or later version
*/
+class EMail
+{
+ /**#@+
+ * @access private
+ */
+
+ /**
+ * A comma-separated list of addresses to send To
+ * @var string
+ */
+ private $To; // To:
+
+ /**
+ * The visible sender of the e-mail.
+ * @var string
+ */
+ private $From; // etc...
+
+ /**
+ * A comma-separated list of addresses to carbon-copy to
+ * @var string
+ */
+ private $Cc;
+
+ /**
+ * A comma-separated list of addresses to blind carbon-copy to
+ * @var string
+ */
+ private $Bcc;
+
+ /**
+ * A comma-separated list of addresses to set as the Errors-to: header
+ * @var string
+ */
+ private $ErrorsTo;
+
+ /**
+ * A comma-separated list of addresses to set as the Reply-to: header
+ * @var string
+ */
+ private $ReplyTo;
+
+ /**
+ * The address to set as the sender of the e-mail.
+ * @var string
+ */
+ private $Sender;
+
+ /**
+ * The subject line of the email.
+ * @var string
+ */
+ private $Subject;
+
+ /**
+ * The body of the email.
+ * @var string
+ */
+ private $Body;
+ /**#@-*/
+
+ /**
+ * Create the e-mail, optionally assigning the subject and primary recipient.
+ * @param string $subject The subject line of the email.
+ * @param string $to A comma-separated list of addresses for the primary recipient(s).
+ */
+ function __construct( $subject = "", $to = "" ) {
+ // Initialise with some defaults
+ $this->From = "";
+ $this->Subject = $subject;
+ $this->To = $to;
+ $this->Cc = "";
+ $this->Bcc = "";
+ $this->ErrorsTo = "";
+ $this->ReplyTo = "";
+ $this->Sender = "";
+ $this->Body = "";
+ }
+
+ /**
+ * Append something with a comma delimter onto the existing referenced string
+ * @param stringref &$onto The string we will be appending to.
+ * @param string $extra What we will be appending
+ * @return string The new string.
+ */
+ private function _AppendDelimited( &$onto, $extra ) {
+ if ( !isset($extra) || $extra == "" ) return false;
+ if ( $onto != "" ) $onto .= ", ";
+ $onto .= $extra;
+ return $onto;
+ }
+
+ /**
+ * Add another recipient to the email
+ * @param string $recipient The email address to append.
+ * @return string The new recipient list.
+ */
+ function AddTo( $recipient ) {
+ return $this->_AppendDelimited($this->To, $recipient);
+ }
+
+ /**
+ * Get the current recipient list.
+ * @return string The current recipient list.
+ */
+ function To() {
+ return $this->To;
+ }
+
+ /**
+ * Add another Cc recipient to the email
+ * @param string $recipient The email address to append.
+ * @return string The new Cc recipient list.
+ */
+ function AddCc( $recipient ) {
+ return $this->_AppendDelimited($this->Cc, $recipient);
+ }
+
+ /**
+ * Add another Bcc recipient to the email
+ * @param string $recipient The email address to append.
+ * @return string The new Bcc recipient list.
+ */
+ function AddBcc( $recipient ) {
+ return $this->_AppendDelimited($this->Bcc, $recipient);
+ }
+
+ /**
+ * Add another Reply-to address to the email
+ * @param string $recipient The email address to append.
+ * @return string The new Reply-to list.
+ */
+ function AddReplyTo( $recipient ) {
+ return $this->_AppendDelimited($this->ReplyTo, $recipient);
+ }
+
+ /**
+ * Add another Error recipient to the email
+ * @param string $recipient The email address to append.
+ * @return string The new Error recipient list.
+ */
+ function AddErrorsTo( $recipient ) {
+ return $this->_AppendDelimited($this->ErrorsTo, $recipient);
+ }
+
+
+ /**
+ * Set the visible From address for the e-mail.
+ * @param string $recipient The visible From address
+ * @return string The new From address
+ */
+ function SetFrom( $sender ) {
+ $this->From = $sender;
+ return $sender;
+ }
+
+
+ /**
+ * Set the envelope sender address for the e-mail.
+ * @param string $recipient The e-mail address for the sender
+ * @return string The new envelope sender address.
+ */
+ function SetSender( $sender ) {
+ $this->Sender = $sender;
+ return $sender;
+ }
+
+
+ /**
+ * Set the subject line for the email
+ * @param string $recipient The new subject line.
+ * @return string The new subject line.
+ */
+ function SetSubject( $subject ) {
+ $this->Subject = $subject;
+ return $subject;
+ }
+
+
+ /**
+ * Set the body of the e-mail.
+ * @param string $recipient The email address to append.
+ * @return string The new body of the e-mail.
+ */
+ function SetBody( $body ) {
+ $this->Body = $body;
+ return $body;
+ }
+
+
+ /**
+ * Actually send the email
+ * @param string $additional_headers Any additional headers that are needed.
+ */
+ function Send( $additional_headers = "" ) {
+ if ( !empty($this->From) ) $additional_headers .= "From: $this->From\r\n";
+ if ( !empty($this->Cc) ) $additional_headers .= "Cc: $this->Cc\r\n";
+ if ( !empty($this->Bcc) ) $additional_headers .= "Bcc: $this->Bcc\r\n";
+ if ( !empty($this->ReplyTo) ) $additional_headers .= "Reply-To: $this->ReplyTo\r\n";
+ if ( !empty($this->ErrorsTo) ) $additional_headers .= "Errors-To: $this->ErrorsTo\r\n";
+
+ $additional_parameters = "";
+ if ( !empty($this->Sender) ) $additional_parameters = "-f$this->Sender";
+ mail( $this->To, $this->Subject, $this->Body, $additional_headers, $additional_parameters );
+ }
+
+
+ /**
+ * Don't actually send the email, just log it.
+ * @param string $additional_headers Any additional headers that are needed.
+ */
+ function PretendLog( $additional_headers = "" ) {
+ if ( !empty($this->From) ) dbg_error_log('LOG', "From: $this->From");
+ if ( !empty($this->Cc) ) dbg_error_log('LOG', "Cc: $this->Cc");
+ if ( !empty($this->Bcc) ) dbg_error_log('LOG', "Bcc: $this->Bcc");
+ if ( !empty($this->ReplyTo) ) dbg_error_log('LOG', "Reply-To: $this->ReplyTo");
+ if ( !empty($this->ErrorsTo) ) dbg_error_log('LOG', "Errors-To: $this->ErrorsTo");
+
+ $additional_parameters = "";
+ if ( !empty($this->Sender) ) dbg_error_log('LOG', "Envelope Sender set to: $this->Sender");
+ dbg_error_log('LOG', "To: $this->To");
+ dbg_error_log('LOG', "Subject: $this->Subject");
+ dbg_error_log('LOG', "Body: $this->Body");
+ }
+
+ /**
+ * Don't actually send the email, just output it directly in the stream(!). We use this method
+ * when we're doing regression testing.
+ * @param string $additional_headers Any additional headers that are needed.
+ */
+ function Pretend( $additional_headers = "" ) {
+ if ( !empty($this->From) ) print("From: $this->From\r\n");
+ if ( !empty($this->Cc) ) print("Cc: $this->Cc\r\n");
+ if ( !empty($this->Bcc) ) print("Bcc: $this->Bcc\r\n");
+ if ( !empty($this->ReplyTo) ) print("Reply-To: $this->ReplyTo\r\n");
+ if ( !empty($this->ErrorsTo) ) print("Errors-To: $this->ErrorsTo\r\n");
+
+ $additional_parameters = "";
+ if ( !empty($this->Sender) ) print("Envelope Sender set to: $this->Sender\r\n");
+ print("To: $this->To\r\n");
+ print("Subject: $this->Subject\r\n");
+ print("Body: $this->Body\r\n");
+ }
+}

require_once('vCalendar.php');
require_once('WritableCollection.php');

Finally when you try to remove an event with attendees or you know people invited to, you see in the error log :

Mon Apr 27 14:49:13.111377 2015] [:error] [pid 52860] [client XX.XX.XX.XX:8836] davical: BUG: :Exists true
[Mon Apr 27 14:49:13.111443 2015] [:error] [pid 52860] [client XX.XX.XX.XX:8836] ================= Stack Trace ===================
[Mon Apr 27 14:49:13.111489 2015] [:error] [pid 52860] [client XX.XX.XX.XX:8836] ===> /expert/htwebs/davical/htdocs/caldav.php[133] calls include()
[Mon Apr 27 14:49:13.111506 2015] [:error] [pid 52860] [client XX.XX.XX.XX:8836] ===> /expert/htwebs/davical/inc/caldav-DELETE.php[77] calls do_scheduling_for_delete()
[Mon Apr 27 14:49:13.111545 2015] [:error] [pid 52860] [client XX.XX.XX.XX:8836] ===> /expert/htwebs/davical/inc/schedule-functions.php[276] calls DAVResource->GetProperty()
[Mon Apr 27 14:49:13.119143 2015] [:error] [pid 52860] [client XX.XX.XX.XX:8836] PHP Notice: Undefined variable: content in /usr/local/share/awl/inc/Multipart.php on line 33
[Mon Apr 27 14:49:13.119186 2015] [:error] [pid 52860] [client XX.XX.XX.XX:8836] PHP Notice: Undefined variable: content in /usr/local/share/awl/inc/Multipart.php on line 33
[Mon Apr 27 14:49:13.119226 2015] [:error] [pid 52860] [client XX.XX.XX.XX:8836] davical: LOG: :From: egoitz@sarenet.es
[Mon Apr 27 14:49:13.119252 2015] [:error] [pid 52860] [client XX.XX.XX.XX:8836] davical: LOG: :To: zzzzzz@gmail.com
[Mon Apr 27 14:49:13.119279 2015] [:error] [pid 52860] [client XX.XX.XX.XX:8836] davical: LOG: :Subject:
[Mon Apr 27 14:49:13.119300 2015] [:error] [pid 52860] [client XX.XX.XX.XX:8836] davical: LOG: :Body: --6f5d2bc9-efa3-8974-1d99-72207972fffc\r\nContent-Type: text/calendar; charset=UTF-8; method=CANCEL\r\nContent-Transfer-Encoding: base64\r\n\r\n\r\n--6f5d2bc9-efa3-8974-1d99-72207972fffcContent-Type: text/plain\r\nContent-Transfer-Encoding: base64\r\n\r\n\r\n--6f5d2bc9-efa3-8974-1d99-72207972fffc--\r\n

Although it throws :

[Mon Apr 27 14:49:13.119143 2015] [:error] [pid 52860] [client XX.XX.XX.XX:8836] PHP Notice: Undefined variable: content in /usr/local/share/awl/inc/Multipart.php on line 33
[Mon Apr 27 14:49:13.119186 2015] [:error] [pid 52860] [client XX.XX.XX.XX:8836] PHP Notice: Undefined variable: content in /usr/local/share/awl/inc/Multipart.php on line 33

it seems to be far better…. and in fact accepts the event removal…. previously it was returning a 5xx and now :

XX.XX.XX.XX - - [27/Apr/2015:14:49:12 +0200] "DELETE /caldav.php/egoitz%40sarenet.es/calendar/B7FC27F7-24A5-4D55-B42D-F7F25C127BD9.ics HTTP/1.1" 401 40 "-" "Mac+OS+X/10.10.3 (14D131) CalendarAgent/316.1"
XX.XX.XX.XX - egoitz@sarenet.es [27/Apr/2015:14:49:12 +0200] "DELETE /caldav.php/egoitz%40sarenet.es/calendar/B7FC27F7-24A5-4D55-B42D-F7F25C127BD9.ics HTTP/1.1" 204 - "-" "Mac+OS+X/10.10.3 (14D131) CalendarAgent/316.1"

It seems like this class is just properly included for the admin web interface…. mainly…. but not for these “engine’s” php files… It seems an important amount of people should be affected by this, due to enable_auto_scheduling is enabled by default and… it’s fine to
be there because it’s cool :)

Any suggestions? counterparts seen by someone to this??

Regards,







> El 27/4/2015, a las 12:50, Egoitz Aurrekoetxea <egoitz@ramattack.net> escribió:
>
> Hi!,
>
> 1.1.2 and 0.54
>
> Thank you!!
>> El 27/4/2015, a las 12:08, Florian Schlichting <fsfs@debian.org> escribió:
>>
>> Hi Egon,
>>
>> On Mon, Apr 27, 2015 at 11:05:06AM +0200, Egoitz Aurrekoetxea wrote:
>>> [Mon Apr 27 09:47:50.433348 2015] [:error] [pid 15006] [client XX.XX.XX.XX:58727] PHP Fatal error: Class 'EMail' not found in /expert/htwebs/davical/inc/schedule-functions.php on line 389
>>
>> what version of Davical and AWL are you using? I think this is an error
>> that can only be seen when AWL is older than what's required by your
>> Davical version.
>>
>> Florian
>>
>>
>> ------------------------------------------------------------------------------
>> One dashboard for servers and applications across Physical-Virtual-Cloud
>> Widest out-of-the-box monitoring support with 50+ applications
>> Performance metrics, stats and reports that give you Actionable Insights
>> Deep dive visibility with transaction tracing using APM Insight.
>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>> _______________________________________________
>> Davical-general mailing list
>> Davical-general@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/davical-general
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Davical-general mailing list
> Davical-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/davical-general


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Davical-general mailing list
Davical-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/davical-general
Re: Event removal and attendee removal [ In reply to ]
Hi,

> 1.1.2 and 0.54

1.1.3.1 and 0.55 are the latest releases - would you consider upgrading?

> >> [Mon Apr 27 09:47:50.433348 2015] [:error] [pid 15006] [client XX.XX.XX.XX:58727] PHP Fatal error: Class 'EMail' not found in /expert/htwebs/davical/inc/schedule-functions.php on line 389
> >
> > what version of Davical and AWL are you using? I think this is an error
> > that can only be seen when AWL is older than what's required by your
> > Davical version.

This is wrong, I was thinking of a different issue. The sending of
external invitations was commented out by Jan prior to Davical 1.1.3:
https://gitlab.com/davical-project/davical/commit/9df80fbde19e561699af33b591e4fdb6c7bbf9cf

This was part of an attempt to get the git trunk into a working state.
External invitations remain on the todo list.

Florian


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Davical-general mailing list
Davical-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/davical-general
Re: Event removal and attendee removal [ In reply to ]
Good morning Florian,

Go answering below…


> El 27/4/2015, a las 22:06, Florian Schlichting <fsfs@debian.org> escribió:
>
> Hi,
>
>> 1.1.2 and 0.54
>
> 1.1.3.1 and 0.55 are the latest releases - would you consider upgrading?

I will, but need some time…. this is a new technology for us, now is working fine… does not seem to exist important bugs and this is a Davical implementation for
several thousand domains…. you know it’s not simple to just upgrade... should be more deeply considered this kind of upgrades….

>
>>>> [Mon Apr 27 09:47:50.433348 2015] [:error] [pid 15006] [client XX.XX.XX.XX:58727] PHP Fatal error: Class 'EMail' not found in /expert/htwebs/davical/inc/schedule-functions.php on line 389
>>>
>>> what version of Davical and AWL are you using? I think this is an error
>>> that can only be seen when AWL is older than what's required by your
>>> Davical version.
>
> This is wrong, I was thinking of a different issue. The sending of
> external invitations was commented out by Jan prior to Davical 1.1.3:
> https://gitlab.com/davical-project/davical/commit/9df80fbde19e561699af33b591e4fdb6c7bbf9cf <https://gitlab.com/davical-project/davical/commit/9df80fbde19e561699af33b591e4fdb6c7bbf9cf>

This comments were not committed in Davical 1.1.2…. With my configuration, now the only thing is doing is just to log :

It’s entering in bold text :

if ( isset($c->iMIP->pretend_email) ) {
641 $email->Pretend($mime->getMimeHeaders());
642 }
643 else if ( !isset($c->iMIP->send_email) || !$c->iMIP->send_email) {
644 $email->PretendLog($mime->getMimeHeaders());
645 }
646 else {
647 $email->Send($mime->getMimeHeaders());
648 }

So it’s just logging to log the invitation it would sent… but just that…

Without the class in that file, in schedule-functions.php, you are not able to remove an appointment having attendees, if you don’t previously remove each attendee before…. as the class is not defined and due to
Davical being conservative and secure… as this error of undefined class occurs it just returns 500 to caldav client… so… this way I assume is preferable and without breaking nothing, as I saw…

could you see perhaps something could be broken???

>
> This was part of an attempt to get the git trunk into a working state.
> External invitations remain on the todo list.

it’s nice but don’t really know if it’s worth so much… for external attendees we say them to just send the ics with the mail client…. you will always have a different way of dealing with inside server users and outside ones… so
I think sending invitations from outside Davical, is not a complex or expensive job…. and scheduling I assume will not always work properly with external systems and just with a ics with attendees…. I think it’s better to have
just the working fine functionality instead of some other ones not always working, due to other customers using calendaring system or caldav client behavior… but it’s just an opinion….



>
> Florian
>


Regards,