Closed Bug 323665 Opened 14 years ago Closed 14 years ago

unable to create an event; clicking OK in dialog does nothing

Categories

(Calendar :: Sunbird Only, defect)

x86
Linux
defect
Not set

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: calum.mackay, Assigned: mostafah)

Details

Attachments

(1 file)

Linux/x86, my own build from CVS; 20060116.

Unable to create an event. Event dialog appears, and can be filled in, but clicking OK does nothing. Reproducible every time.

From JS console, bringing up the event dialog, and also toggling all-day, produce:

Error: document.getElementById("server-field").selectedItem has no properties
Source File: chrome://calendar/content/eventDialog.js
Line: 959


clicking OK produces:

Error: document.getElementById("server-field").selectedItem has no properties
Source File: chrome://calendar/content/eventDialog.js
Line: 739
No problems using my own sunbird build based on todays trunk cvs.
Are you sure you pulled current source?
Your problem sound like Bug 313470 or Bug 296194, both fixed long time ago.
Somehow a calendar isn't getting selected.  I'd be curious what's going on with your list of calendars in the upper left.  Try clicking in there once (and selecting a calendar) before selecting 'New Event' and see if that helps.
Will try that in a moment, thanks. Hampered by a considerable delay on Sunbird startup: several minutes of 100% cpu, before the page gets painted. After that it's fine; well, it's "normal", at least.

My build from yesterday (20060115) seems OK.

Perhaps I just caught things in flight. I'm doing a checkout now, and will rebuild.
re Comment #2; very interesting: the Calendars box in the sidebar is empty. I cannot select any of my (5) calendars (1 local, 4 remote).

However, I can see events from my 1 local calendar (although apparently not the 4 remote ones) in the multiweek view.

I will try again with a new build.
I think I have to confirm this bug.

I just dowloaded the latest nightly build (2006-01-16-13-trunk) and I also have an empty calendar list.

I think the following error in js console during sunbird startup is the cause:

Error: checkForMailNews is not defined
Source File: chrome://calendar/content/calendar.js
Line: 121
File calendarMail.js is missing. Caused by check in for Bug 307685. CCing sipaq.
We'll probably have to put an 

#ifndef MOZ_SUNBIRD
...
#endif

around http://lxr.mozilla.org/seamonkey/source/calendar/resources/content/calendar.js#121
(In reply to comment #8)
> > We'll probably have to put an 
> > #ifndef MOZ_SUNBIRD
> > ...
> > #endif
> > around http://lxr.mozilla.org/seamonkey/source/calendar/resources/content/calendar.js#121
> 
> And probably around
> http://lxr.mozilla.org/mozilla/source/calendar/resources/content/calendar.xul#222

This is an extension-only file, so an #ifndef MOZ_SUNBIRD wouldn't be a good idea, don't you think?

> http://lxr.mozilla.org/mozilla/source/calendar/resources/content/calendarEvent.js#689

Yes, here an #ifndef MOZ_SUNBIRD block is needed, too.

> http://lxr.mozilla.org/mozilla/source/calendar/sunbird/base/content/calendar-scripts.inc#66

the reference to calendarMail.js should just be removed here.

> and other places I dont't see right now?

http://lxr.mozilla.org/mozilla/source/calendar/resources/content/calendarEvent.js#689

will probably need some #ifndef love.


http://lxr.mozilla.org/mozilla/source/calendar/sunbird/base/content/calendar-sets.inc#53

will probably need to be removed.
(In reply to comment #9)
> > http://lxr.mozilla.org/mozilla/source/calendar/resources/content/calendarEvent.js#689
> 
> Yes, here an #ifndef MOZ_SUNBIRD block is needed, too.
> 

Nobody should be using calendarEvent.js.  It's obsolete code from the 0.2 era.  If someone needs it, I'd really like to know why.
(In reply to comment #10)

> Nobody should be using calendarEvent.js.  It's obsolete code from the 0.2 era. 

Ah. I didn't know that. So we need to do the following:

Pu an #ifndef MOZ_SUNBIRD around the following code:

http://lxr.mozilla.org/seamonkey/source/calendar/resources/content/calendar.js#121

Remove the reference to calendarMail.js or to functions of it in:

http://lxr.mozilla.org/mozilla/source/calendar/sunbird/base/content/calendar-scripts.inc#66
http://lxr.mozilla.org/mozilla/source/calendar/sunbird/base/content/calendar-sets.inc#53

And if calendarEvent.js is really obsolete, then it should probably cvs removed, right?

> If someone needs it, I'd really like to know why.

I certainly don't think that we need it.
(In reply to comment #11)

How does #ifndef MOZ_SUNBIRD works in js files? I rebuild Sunbird with #ifndef..#endif around checkForMailNews() and removed the reference to calendarMail.js. But that don't work either. I than get a bunch of errors like:

Error: calendarInit is not defined
Source File: chrome://calendar/content/calendar.xul Line: 1

Error: newToDoCommand is not defined
Source File: chrome://calendar/content/unifinderToDo.js Line: 220

Error: newEventCommand is not defined
Source File: chrome://calendar/content/calendar.xul Line: 1

That is all defined in calendar.js but that file is part of calendar.jar, I checked.

???
Puting back the file solves all problems.
Attachment #208775 - Flags: first-review?(mvl)
Comment on attachment 208775 [details] [diff] [review]
make-sunbird-work-again patch

let's do this for now.
Attachment #208775 - Flags: first-review?(mvl) → first-review+
patch checked in
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
(In reply to comment #12)
> (In reply to comment #11)
> 
> How does #ifndef MOZ_SUNBIRD works in js files? I rebuild Sunbird with
> #ifndef..#endif around checkForMailNews() and removed the reference to
> calendarMail.js. But that don't work either.

#ifndef MOZ_SUNBIRD is a XUL preprocessor command. To make it work you'll have to enable preprocessing in the jar.mn file by adding "*" (without the quotation marks) before the relevant file.

See http://lxr.mozilla.org/seamonkey/source/calendar/resources/jar.mn#18 for an example.
verified; thanks very much indeed.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.