View Issue Details

IDProjectCategoryView StatusLast Update
0013682Tine 2.0Felamimailpublic2018-02-22 16:35
ReporterjanAssigned Topschuele 
PriorityurgentSeveritymajorReproducibilitysometimes
Status resolvedResolutionfixed 
Product Version2017.08.10 Community Edition 
Target Version2018.02.2 Community EditionFixed in Version2018.02.2 Community Edition 
Summary0013682: Unable to modify existing calendar event - TypeError: Cannot read property 'hasPoll' of undefined
DescriptionWhen editing an existing calendar event (change end time for example) the following error occurs:

index.php?method=Tinebase.getJsFiles&b94e376341a6662d43fc155c502e7413a94c3647:formatted:10567 Uncaught (in promise) TypeError: Cannot read property 'hasPoll' of undefined
    at Tine.Felamimail.GridPanelHook.bodyFn (index.php?method=Tinebase.getJsFiles&b94e376341a6662d43fc155c502e7413a94c3647:formatted:74610)
    at Tine.Felamimail.GridPanelHook.updateAction (index.php?method=Tinebase.getJsFiles&b94e376341a6662d43fc155c502e7413a94c3647:formatted:69805)
    at Tine.widgets.ActionUpdater.<anonymous> (index.php?method=Tinebase.getJsFiles&b94e376341a6662d43fc155c502e7413a94c3647:formatted:18988)
    at Tine.widgets.ActionUpdater.each (index.php?method=Tinebase.getJsFiles&b94e376341a6662d43fc155c502e7413a94c3647:formatted:19027)
    at Tine.widgets.ActionUpdater.updateActions (index.php?method=Tinebase.getJsFiles&b94e376341a6662d43fc155c502e7413a94c3647:formatted:18984)
    at L.updateEventActions (index.php?method=Tinebase.getJsFiles&b94e376341a6662d43fc155c502e7413a94c3647:formatted:61198)
    at i.Event.fire (ext-all.js:7)
    at L.fireEvent (ext-all.js:7)
    at L.<anonymous> (ext-all.js:7)
    at i.Event.fire (ext-all.js:7)

Fix for this issue is attached.

Steps To ReproduceThis problem affects only some users (don't know why).

Create a new calendar event.
Edit the event.
Change end time.
Save.
Additional InformationThis problem affects at least Firefox 57.0.3 and Chromium 63.0.3239.84.
TagsNo tags attached.
mwticket

Relationships

related to 0013688 resolvedpschuele Can't reschedule an event using the webinterface in monthly view 

Activities

jan

jan

2018-01-03 16:31

reporter  

felamimail.patch (1,086 bytes)
--- Felamimail/js/Felamimail-00c9a2ab3087779d0fdd-FAT.debug.js	2018-01-03 16:12:06.928771936 +0100
+++ Felamimail/js/Felamimail-00c9a2ab3087779d0fdd-FAT.debug.js.orig	2018-01-03 15:43:15.650074968 +0100
@@ -11521,7 +11521,7 @@
                 return record ? record.get('summary') + ' - ' + Tine.Calendar.Model.Event.datetimeRenderer(record.get('dtstart')) : '';
             },
             bodyFn: function(record) {
-                if (record && record.hasPoll()) {
+                if (record.hasPoll()) {
                     // TODO translate?
                     //return String.format(this.i18n._('Poll URL: {0}'), record.getPollUrl());
                     return String.format('Poll URL: {0}', record.getPollUrl());
@@ -11530,7 +11530,7 @@
                 }
             },
             massMailingFlagFn: function(record) {
-                return record && record.hasPoll();
+                return record.hasPoll();
             },
             addMailFromRecord: function(mailAddresses, record) {
                 Ext.each(record.get('attendee'), function(attender) {
felamimail.patch (1,086 bytes)
jan

jan

2018-01-03 23:50

reporter   ~0021280

corrected patch file attached

felamimail-2.patch (1,086 bytes)
--- Felamimail/js/Felamimail-00c9a2ab3087779d0fdd-FAT.debug.js.orig	2018-01-03 15:43:15.650074968 +0100
+++ Felamimail/js/Felamimail-00c9a2ab3087779d0fdd-FAT.debug.js	2018-01-03 16:12:06.928771936 +0100
@@ -11521,7 +11521,7 @@
                 return record ? record.get('summary') + ' - ' + Tine.Calendar.Model.Event.datetimeRenderer(record.get('dtstart')) : '';
             },
             bodyFn: function(record) {
-                if (record.hasPoll()) {
+                if (record && record.hasPoll()) {
                     // TODO translate?
                     //return String.format(this.i18n._('Poll URL: {0}'), record.getPollUrl());
                     return String.format('Poll URL: {0}', record.getPollUrl());
@@ -11530,7 +11530,7 @@
                 }
             },
             massMailingFlagFn: function(record) {
-                return record.hasPoll();
+                return record && record.hasPoll();
             },
             addMailFromRecord: function(mailAddresses, record) {
                 Ext.each(record.get('attendee'), function(attender) {
felamimail-2.patch (1,086 bytes)
12delta

12delta

2018-01-09 22:39

reporter   ~0021300

This is for all that search a different JavaScript console error messeg: TypeError: e is undefine
This is because of the compressed JavaScript. The real error message "TypeError: record is undefine" is shown, if the debug more is enabled: https://www.tine20.org/forum/viewtopic.php?t=9562
And the above patch only take place, if this debug more kept enabled.
(I searched a lot. But didn't found it, because this information was missing.)
WolfgangAndreas

WolfgangAndreas

2018-01-16 13:11

reporter   ~0021322

Works for me. This also fixed 0013688
pschuele

pschuele

2018-02-22 16:35

administrator   ~0021440

thanks for the patch - this has also been fixed in our git.

Issue History

Date Modified Username Field Change
2018-01-03 16:31 jan New Issue
2018-01-03 16:31 jan File Added: felamimail.patch
2018-01-03 23:50 jan File Added: felamimail-2.patch
2018-01-03 23:50 jan Note Added: 0021280
2018-01-09 22:39 12delta Note Added: 0021300
2018-01-16 13:11 WolfgangAndreas Note Added: 0021322
2018-02-22 16:33 pschuele Relationship added related to 0013688
2018-02-22 16:35 pschuele Note Added: 0021440
2018-02-22 16:35 pschuele Target Version => 2018.02.2 Community Edition
2018-02-22 16:35 pschuele Assigned To => pschuele
2018-02-22 16:35 pschuele Status new => resolved
2018-02-22 16:35 pschuele Resolution open => fixed
2018-02-22 16:35 pschuele Fixed in Version => 2018.02.2 Community Edition