Bug 12589 - REGRESSION: Google Calendar Module is not displaying agendas correctly
Summary: REGRESSION: Google Calendar Module is not displaying agendas correctly
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Evangelism (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords: GoogleBug, InRadar, Regression
: 12006 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-02-04 11:01 PST by Maciej Stachowiak
Modified: 2008-12-23 23:03 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Stachowiak 2007-02-04 11:01:14 PST
2006-07-28 20:05:12 Emilie Kim:
* SUMMARY
I use the "official Google Calendar" widget on my google personalized homepage.  I have it so it shows me the calendar and the daily agenda underneath.  On Tiger, it looks like the screenshot.  On Leopard9A234, it just shows me the calendar, and nothing underneath.  I left it sitting for about an hour and the agenda never showed up.

2006-07-31 11:47:59 Stephanie Lewis:
I could not reproduce this.  The calendar shows up correctly for me in 9A235 and in Safari 2.0.4.  Are you still having problems seeing the agenda?

2006-07-31 13:27:07 Emilie Kim:
I am still seeing this on 9A239 with Safari 3.0 (521.24).  One thing to note is that I have multiple calendars shown in my agenda -- a new feature that this widget just added within the last few days.

2006-07-31 13:28:13 Emilie Kim:
The multiple calendars feature is in the button with the down-arrow on it next to the "Hide Agenda" link, as seen in the screenshot.

2006-07-31 13:45:01 Emilie Kim:
Here is more of the problem.  On Tiger, I unchecked all of the calendars I had checked in the calendar chooser, and then the (blank) agenda showed up on Leopard.  However, when I looked at the calendar chooser in Leopard, it was blank.  I've attached 2 more screenshots - one with the blank Leopard calendar chooser, and the other with how the calendar chooser is supposed to look in Tiger.  

When I unchecked the calendars, the module works as designed.  When I checked calendars, the module does not show up correctly on Leopard.

2006-07-31 13:59:16 Stephanie Lewis:
Steps to see this problem:
1. Log in to google account
2. Click Add Content on google home page
3. Add a calendar
4. return to google homepage
5. click the dow arrow.  In Tiger this lists your calendars.  Selecting the check box next to the calendar name will list you agenda.  In Leopard there is no checkbox.

Results
5. click show agenda.  An agenda for the day will show up and tell you there are no events for the day.
6. Click add event, fill in some event for the day.
7. On tiger the event will show up, but not in Leopard because the calendar wasn't able to be selected.
  
See the two attached pictures for a visual difference between the two.  The page can take several seconds to load.

I tested this on Leopard 9A325 and Safari 2.0.4

2006-07-31 14:27:25 Emilie Kim:
To clarify, it's more than just the calendar isn't able to be selected on Leopard.  Even if you do all the calendar selecting on Tiger, and the agenda shows up correctly with events on Tiger, the agenda won't show up at all on Leopard.

<rdar://problem/4658618>
Comment 1 mitz 2007-02-07 06:57:17 PST
See also bug 12006
Comment 2 Maciej Stachowiak 2007-02-20 00:12:15 PST
Alice says:

Based on my testing, looks like, with TOT, any user agent with "safari" in it will cause this problem to happen.  
Comment 3 David Kilzer (:ddkilzer) 2007-02-20 05:33:48 PST
Per Comment #2, this may turn out to be an evangelism bug.

Comment 4 Antti Koivisto 2007-03-20 16:05:57 PDT
It seems that the problem is in Google Calendar script. Obfuscated http://www.google.com/ig/modules/calendar_content/calendar.js has a function that looks like this

    function Jc(a, b)
    {
      var c = false, d = v.Ha(), e = v.Ia();
      for (g = 0; g < a.length; ++g)
        {
          var h = a[g];
          h.owner = b;
          var i = h.ed();
          if (i == fd)
            continue;
          var j = ba && !ma;
          if (j)
            {
              var l = h.ma()["gd$when"].starttime;
              h.q = function ()
              {
                return l;
              };
              var n = h.ma()["gd$when"].endtime;
              h.K = function ()
              {
                return n;
              };
            }

Here variable ba is Safari UA test result so if(j) codepath is executed for Safari only. Lines

var l = h.ma()["gd$when"].starttime;
var n = h.ma()["gd$when"].endtime;

are the problematic ones. The actual attribute names in XML data they are accessing are called "startTime" and "endTime". Apparently Tiger WebKit had case insensitive XML parsing and the script is trying to work around that bug, breaking ToT WebKit where the behavior is fixed.

I confirmed that this is indeed the problem by hacking JSObject::get() to rename "starttime" to "startTime" after which agendas showed up fine (the scripts are pretty hard to turn into local test case, this was easier). 

This looks like an evangelism issue now.

Comment 5 Antti Koivisto 2007-04-04 01:09:23 PDT
*** Bug 12006 has been marked as a duplicate of this bug. ***
Comment 6 Robert Blaut 2008-12-23 23:03:52 PST
I checked Google Calendar gadget for iGoogle (new version of customized Google homepage) as well as classic personalized Google homepage which is available in Google Apps package now http://www.google.com/apps/ 

Both services display events correctly in the latest WebKit now. So the bug is fixed :)