Closed Bug 360658 Opened 13 years ago Closed 13 years ago

Weekly layout: No preview for 'Selected events' selection [Error: aStart has no properties]

Categories

(Calendar :: Printing, defect)

x86
Windows 2000
defect
Not set

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: koen.hendrickx, Assigned: jminta)

Details

Attachments

(2 files)

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061113 Calendar/0.4a1

When you want to print a weekly grid for a selection, the preview becomes empty. 
In the error-console, i got the message: 
[quote]Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061113 Calendar/0.4a1[/quote]

to reproduce:
1) add an event
2) select that event
3) go to print (ctrl-P)
4) select weekly grid
5) select selection


I also found that when you go from 'events in the current view' to 'selection', you get the message:
[quote]Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIBoxObject.getProperty]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://global/content/bindings/textbox.xml ::  :: line 102"  data: no][/quote]
This message, i get in every grid (monthly, weekly, list)
(In reply to comment #0)
> Error: uncaught exception: [Exception... "Component returned failure 
> code: 0x80004005 (NS_ERROR_FAILURE)  [nsIBoxObject.getProperty]"

That's a different issue and already reported with Bug 359773.
I think, Koen pasted the wrong text. The error look like this:

Error: aStart has no properties
Source File: file:///C:/Programme/Calendar/js/calWeekPrinter.js
Line: 125

Confirming the inability to preview and print selected events in weekly planner.
sorry, it is indeed the text 
Error: aStart has no properties

sorry; wrong paste.
Confirmed. This is the error shown in console:
printDialog::refreshHtml:[Exception... "'[JavaScript Error: "aStart has no properties" {file: "file:///D:/sunbird/js/calWeekPrinter.js" line: 125}]' when calling method: [calIPrintFormatter::formatToHtml]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: chrome://calendar/content/printDialog.js :: refreshHtml :: line 202"  data: yes]
OS: Windows XP → Windows 2000
Summary: print weekly grid -> no preview for 'selection' → Weekly layout: No preview for 'Selected events' selection [Error: aStart has no properties]
The idl defines aStart as optional.  In that case, we should use the first day of the first item.
Assignee: nobody → jminta
Status: NEW → ASSIGNED
Attachment #246545 - Flags: first-review?(lilmatt)
Comment on attachment 246545 [details] [diff] [review]
make aStart optional

>Index: calendar/import-export/calWeekPrinter.js

>+    var end = aEnd || lastItem.startDate || lastItem.entryDate ||
>+               lastItem.dueDate;

Style nit: Align lastItem.dueDate with aEnd above it.

r=lilmatt with that
Attachment #246545 - Flags: first-review?(lilmatt) → first-review+
Attachment #246545 - Flags: second-review?(mvl)
Comment on attachment 246545 [details] [diff] [review]
make aStart optional

r2=mvl
Attachment #246545 - Flags: second-review?(mvl) → second-review+
Patch checked in.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Steps from comment #0 with Sunbird/0.4a1 (2006120509) still fail, no print preview is shown. Console shows:

printDialog::refreshHtml: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [calIDateTime.compare]"  nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame :: file:///D:/sunbird/js/calWeekPrinter.js :: weekPrint_format :: line 139"  data: no]
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(In reply to comment #9)
OK, caused by a merge of the two patches fixing printing.

Attached patch fix merge gooSplinter Review
Patch makes sure we only use the variables we know exist.
Attachment #247575 - Flags: second-review?(mvl)
Attachment #247575 - Flags: first-review?(lilmatt)
Comment on attachment 247575 [details] [diff] [review]
fix merge goo

r=lilmatt
Attachment #247575 - Flags: first-review?(lilmatt) → first-review+
Comment on attachment 247575 [details] [diff] [review]
fix merge goo

r2=mvl
Attachment #247575 - Flags: second-review?(mvl) → second-review+
patch checked in.
Status: REOPENED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → FIXED
With Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4pre) Gecko/20070406 Calendar/0.5pre there is no "Weekly Planer" preview and no message in the error console. -> REOPEN
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(In reply to comment #15)

Works for me using Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.4pre) Gecko/20070406 Calendar/0.5pre. 
Weekly Planner layout is working fine for all print options.
WFM with a clean profile and Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4pre) Gecko/20070406 Calendar/0.5pre. Sorry for wrongly reopening this bug.
Status: REOPENED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Litmus testcase 4440 created
You need to log in before you can comment on or make changes to this bug.