Warning: Error in parsing value for property 'max-height' (day/week view)

RESOLVED FIXED in 1.0b1

Status

Calendar
Calendar Views
--
trivial
RESOLVED FIXED
11 years ago
7 years ago

People

(Reporter: Kelv, Assigned: Peter Weilbacher)

Tracking

Sunbird 0.5
1.0b1

Details

Attachments

(1 attachment)

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
Build Identifier: Thunderbird version 2.0.0.0 (20070326) + Lightning nightly build for 10th May 2007

When switching from month view to week view either via the Calendar menu or a Toolbar shortcut, an error is produces in the error log.

Reproducible: Always

Steps to Reproduce:
1. Start Thunderbird.
2. Switch from Month view to Calendar view.

Actual Results:  
Warning: Error in parsing value for property 'max-height'.  Declaration dropped.
Source File: chrome://messenger/content/messenger.xul
Line: 0

Expected Results:  
No error report.
(Reporter)

Comment 1

11 years ago
On further inspection the error occurs however week view is accessed.
According to the message you posted in Comment #0 this is just a warning.
Summary: Error log report when switching from month to week view → Warning logged when switching from month to week view

Comment 3

11 years ago
I don't see any error in console using the same thunderbird and lightning (in new profile)--->WFM

Comment 4

11 years ago
Bug: following warning appears in error console

  Warning: Error in parsing value for property 'max-height'.  Declaration dropped.
  Source File: chrome://calendar/content/calendar.xul
  Line: 0

Problem occurs for short events, esp. when window is also short.

1. create an event with end time is same as start time (0 duration).
   (also happens for longer events if window is short enough, but
   happens for 0-length events regardless of window size)
2. Navigate away and back to day or week view of day with this event.

Actual: For every short event in view, Error console shows
  Warning: Error in parsing value for property 'max-height'.  Declaration dropped.
  Source File: chrome://calendar/content/calendar.xul
  Line: 0

Expected:
  No warnings.
Severity: normal → trivial
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Warning logged when switching from month to week view → Error in parsing value for property 'max-height' (day/week view)
Version: unspecified → Sunbird 0.5

Comment 5

11 years ago
Tracked problem down to 
  calendar-multiday-view.xml#calendar-event-box.setEditableLabel

The computed max-height value becomes negative.

The max-height code looks like it might be left over from a draft when the
title <xul:description> was between the <calendar-event-gripbar>s in
a <xul:vbox>, but now the title <xul:description> is in a different
layer of a <xul:stack>, so it looks like it is no longer needed.
http://mxr.mozilla.org/mozilla/source/calendar/base/content/calendar-multiday-view.xml#1565
http://mxr.mozilla.org/mozilla/source/calendar/base/content/calendar-multiday-view.xml#1704

It was checked-in for bug 368982.  
Bug 368982 comment 38 seems to says it makes the bottom grippy 
stay visible in short events, but after trying it with and without
the code for max-height, I haven't been able to create an event
where it makes a difference.  Since they are in different
layers of the stack, I don't see how it would work.

CC'ing michael.buettner@sun.com: is there an event box where the max-height code is needed?

If the code is no longer needed, this first patch below fixes the
problem by removing this code.

diff -r mozilla/calendar/base/content/calendar-multiday-view.xml
--- a/mozilla/calendar/base/content/calendar-multiday-view.xml	
+++ b/mozilla/calendar/base/content/calendar-multiday-view.xml	
@@ -1712,7 +1712,3 @@
	   } else {
	     evl.textContent = calGetString("calendar", "eventUntitled");
	   }
- 
-          var gripbar = document.getAnonymousElementByAttribute(this, "anonid", "gripbar1").boxObject.height;
-          var height = document.getAnonymousElementByAttribute(this, "anonid", "eventbox").boxObject.height;
-          evl.setAttribute("style", "max-height: " + (height-gripbar*2) + "px");
         ]]></body>
       </method>
     </implementation>

If I'm wrong and the code is still needed, then this second patch
fixes the problem by constraining the max-height value to be
non-negative.

diff -r mozilla/calendar/base/content/calendar-multiday-view.xml
--- a/mozilla/calendar/base/content/calendar-multiday-view.xml	
+++ b/mozilla/calendar/base/content/calendar-multiday-view.xml	
@@ -1712,7 +1712,7 @@
 
           var gripbar = document.getAnonymousElementByAttribute(this, "anonid", "gripbar1").boxObject.height;
           var height = document.getAnonymousElementByAttribute(this, "anonid", "eventbox").boxObject.height;
-          evl.setAttribute("style", "max-height: " + (height-gripbar*2) + "px");
+          evl.setAttribute("style", "max-height: " + Math.max(0, height-gripbar*2) + "px");
         ]]></body>
       </method>
     </implementation>

I hope this helps.
Summary: Error in parsing value for property 'max-height' (day/week view) → Warning: Error in parsing value for property 'max-height' (day/week view)

Comment 6

11 years ago
I see the warning in the error console simply by creating a new event.  Steps:

1) In Month view, double click on today's box.
2) Click "Save & Close".

The warning repeats for the total number of events in the day.

(Lightning 2008-02-07 / Thunderbird 2.0.0.9)

Comment 7

11 years ago
Actually, those steps are incomplete.  To reproduce it in Month View:

1) Restart Thunderbird
2) Open and clear the error console
3) Switch to Calendar mode
4) Switch to Week view
5) Switch to Month view
6) Switch to Mail mode
7) Switch to Calendar mode
8) Double click on today's box.
9) Click "Save & Close".

Comment 8

10 years ago
TB 2.0.0.14 / LT0.9pre (2008053119): this still happens

Comment 9

10 years ago
This is now caused by the thunderbirthday addon BTW which apparantly does something weird with durations. Nevertheless it's confirmed in scenarios without this addon too.
Duplicate of this bug: 443223

Comment 11

10 years ago
Bas, could you eloborate on the weird behaviour of ThunderBirthDay? I thought that my addon is using them as intended and I'd like to fix it, if it doesn't. The error doesn't happen on my machine, so I have no idea where to start...
Has anyone seen the warning in a recent nightly build at all? For me this can be resolved as WORKSFORME. Maybe this is one of the issues that were actually fixed and not regressed by Bug 387402.
Please ignore my last comment. I'm still seeing this warning using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.2pre) Gecko/2008072419 Calendar/0.6a1.
Duplicate of this bug: 464896
(Assignee)

Comment 15

10 years ago
This also appears on OS/2 and Linux.

As I remarked in bug 464896 the warning (in Sunbird) only appears for rotated views, once per event that gets displayed.

I wonder why comment 5 was never followed up. It still seems to be relevant.
OS: Windows XP → All
Hardware: PC → All
(Assignee)

Comment 16

10 years ago
Created attachment 348179 [details] [diff] [review]
fix as per comment 5

OK, I confirmed that this fixes the warnings for me (in Sunbird 0.9). Patch against current comm-central.

I am not really up to date on who does reviews for Sunbird and http://www.mozilla.org/owners.html#calendar somehow feels outdated but Matt was involved with the original code-line.
Assignee: nobody → mozilla
Status: NEW → ASSIGNED
Attachment #348179 - Flags: review?
(Assignee)

Updated

10 years ago
Attachment #348179 - Flags: review? → review?(lilmatt)
(Assignee)

Comment 17

10 years ago
Comment on attachment 348179 [details] [diff] [review]
fix as per comment 5

Aha, use correct account address, the one from the owners pages doesn't exist any more...
Attachment #348179 - Flags: review?(lilmatt) → review?(Berend.Cornelius)

Comment 18

10 years ago
Comment on attachment 348179 [details] [diff] [review]
fix as per comment 5

Seems to fix the issue; r=berend
Attachment #348179 - Flags: review?(Berend.Cornelius) → review+
(Assignee)

Comment 19

10 years ago
Great, thanks. Pushed: http://hg.mozilla.org/comm-central/rev/f8cafabd5a83
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.0
These bugs are likely targeted at Lightning 1.0b1, not Lightning 1.0. If this change was done in error, please adjust the target milestone to its correct value. To filter on this bugspam, you can use "lightning-10-target-move".
Target Milestone: 1.0 → 1.0b1
You need to log in before you can comment on or make changes to this bug.