Closed Bug 507215 Opened 10 years ago Closed 10 years ago

Creating repeating event/task fails [Status Code: 400 Bad Request Body: Entry can not contain both gd:when and gd:recurrence elements]

Categories

(Calendar :: Provider: GData, defect)

defect
Not set

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jkhamlin, Assigned: Fallen)

References

Details

(Whiteboard: [not needed beta][no l10n impact][gdata-0.5.3])

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1 (.NET CLR 3.5.30729)
Build Identifier: Provider for Google Calendar 0.5.1

I get an error message that the calendar won't sync if I create a new event and add a custom repeat with Google Provider for Lightning/Sunbird. If I create the event, save it, and then reopen it and add the repeat later, it will sync.

Reproducible: Always

Steps to Reproduce:
1. Create new event in Lightning or Sunbird in a calendar that is linked to Google Calendar with Provider for Google Calendar.
2. Before saving and closing, add a custom repeat to the event.
3. Try to save and close and get an error message.
Actual Results:  
I get a message that states "An error occurred when writing to the calendar XXXX!" Where XXXX = name of the calendar.

Under "details" it states: "Error number: MODIFICATION_FAILED" and then "Description:" 

Expected Results:  
The event should have appeared in the calendar after the "New Event" dialogue closed.

Using Windows XP Pro 64 bit, if that even matters. Since this occurs in both Sunbird and Lightning, with Provider for Google Calendar, I assume the common problem is with Provider, however, I understand that it might occur with other calendar syncing and may be due to common code between Sunbird and Lightning and not actually due to Provider itself.
Please enable calendar.debug.log and calendar.debug.log.verbose (advanced config editor), restart, and then check your error console for more debug messages.
Component: General → Provider: GData
QA Contact: general → gdata-provider
Duplicate of this bug: 507882
Maybe the following entry in the German forum <http://www.sunbird-kalender.de/forum/viewtopic.php?p=12174#p12174> helps:

> A request Error Occurred. Status Code: 400 Bad Request Body: 
> Entry can not contain both gd:when and gd:recurrence elements.

Justin, Patric, do you see a similar message after performing the steps from comment #1?
(In reply to comment #1)
> Please enable calendar.debug.log and calendar.debug.log.verbose (advanced
> config editor), restart, and then check your error console for more debug
> messages.

Ok i do this and here is my error console log

=== Start error console ===

Adding item Test

Logging object...
action: Setting Upload Data:
content: application/atom+xml; charset=UTF-8
data: <entry xmlns:gd="http://schemas.google.com/g/2005" xmlns:gCal="http://schemas.google.com/gCal/2005" xmlns="http://www.w3.org/2005/Atom">
  <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/g/2005#event"/>
  <title type="text">Test</title>
  <content type="text"/>
  <author>
    <name>Patric Hollenstein</name>
    <email>incluedu@gmail.com</email>
  </author>
  <gd:transparency value="http://schemas.google.com/g/2005#event.transparent"/>
  <gd:eventStatus value="http://schemas.google.com/g/2005#event.confirmed"/>
  <gd:where valueString=""/>
  <gCal:sendEventNotifications value="true"/>
  <gd:when startTime="2009-08-25" endTime="2009-08-27"/>
  <gd:extendedProperty name="X-GOOGLE-SNOOZE-RECUR" value="({})"/>
  <gd:visibility value="http://schemas.google.com/g/2005#event.default"/>
  <gd:recurrence>DTSTART;TZID=floating:20090825
DTEND;TZID=floating:20090827
RRULE:FREQ=YEARLY</gd:recurrence>
  <gCal:sequence value="0"/>
  <gCal:uid value=""/>
</entry>
End object

calGoogleRequest: Requesting POST http://www.google.com/calendar/feeds/incluedu%40gmail.com/private/full?ctz=Europe%2FParis

General response failed: [Exception... "A request Error Occurred. Status Code: 400 Bad Request Body: Entry can not contain both gd:when and gd:recurrence elements."  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: file:///C:/Users/holly/AppData/Roaming/Thunderbird/Profiles/ze00snb6.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/modules/calUtils.jsm -> file:///C:/Users/holly/AppData/Roaming/Thunderbird/Profiles/ze00snb6.default/extensions/%7Ba62ef8ec-5fdc-40c2-873c-223b8a6925cc%7D/js/calGoogleCalendar.js :: cGC_general_response :: line 980"  data: no]

Warnung: There has been an error reading data for calendar: google.  However, this error is believed to be minor, so the program will attempt to continue. Error code: 0x80004005. Description: A request Error Occurred. Status Code: 400 Bad Request Body: Entry can not contain both gd:when and gd:recurrence elements.

Fehler: An error occurred when writing to the calendar google! Error code: MODIFICATION_FAILED. Description: 
Quelldatei: file:///C:/Users/holly/AppData/Roaming/Thunderbird/Profiles/ze00snb6.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/modules/calUtils.jsm -> file:///C:/Users/holly/AppData/Roaming/Thunderbird/Profiles/ze00snb6.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calCalendarManager.js
Zeile: 997

calGoogleRequest: Requesting GET http://www.google.com/calendar/feeds/incluedu%40gmail.com/private/full?ctz=Europe%2FParis&max-results=2147483647&singleevents=false&start-min=2009-08-25T00%3A00%3A00%2B02%3A00&start-max=2010-08-25T00%3A00%3A00%2B02%3A00

Recieved response for http://www.google.com/calendar/feeds/incluedu%40gmail.com/private/full

Fehler: uncaught exception: [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIWebNavigation.loadURI]"  nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)"  location: "JS frame :: chrome://global/content/viewSource.js :: viewSource :: line 221"  data: no]

=== End error console ===

Hope it helps
(In reply to comment #3)
> Maybe the following entry in the German forum
> <http://www.sunbird-kalender.de/forum/viewtopic.php?p=12174#p12174> helps:
> 
> > A request Error Occurred. Status Code: 400 Bad Request Body: 
> > Entry can not contain both gd:when and gd:recurrence elements.
> 
> Justin, Patric, do you see a similar message after performing the steps from
> comment #1?

Yes i think so. The problem in the link you post look like the same i have.
Duplicate of this bug: 513671
Confirming per duplicates.
Severity: minor → normal
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: x86_64 → All
Summary: Provider for Google fails to sync when creating new entry with custom repeat in Lightning and Sunbird → Creating repeating event/task fails
Flags: blocking-calendar1.0?
Summary: Creating repeating event/task fails → Creating repeating event/task fails [Status Code: 400 Bad Request Body: Entry can not contain both gd:when and gd:recurrence elements]
Attached patch Fix - v1 โ€” โ€” Splinter Review
Interesting, I wonder when they made this mandatory. I guess I'll have to fix this for 0.5.x too.
Assignee: nobody → philipp
Status: NEW → ASSIGNED
Attachment #398859 - Flags: review?(mschroeder)
Flags: blocking-calendar1.0? → blocking-calendar1.0+
Whiteboard: [not needed beta][no l10n impact]
Attachment #398859 - Flags: review?(mschroeder) → review?(Mozilla)
Duplicate of this bug: 515325
Attachment #398859 - Flags: review?(Mozilla) → review+
Comment on attachment 398859 [details] [diff] [review]
Fix - v1

patch looks good and works. Tested on windows with latest builds.

r=markus
Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/2d36df75680d>

-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [not needed beta][no l10n impact] → [not needed beta][no l10n impact][gdata-next]
Target Milestone: --- → 1.0
This bug is fixed in the Provider for Google Calendar version 0.5.3 which should appear within the next few hours.
Whiteboard: [not needed beta][no l10n impact][gdata-next] → [not needed beta][no l10n impact][gdata-0.5.3]
verified with
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9pre) Gecko/20100313 Calendar/1.0b2pre
Status: RESOLVED → VERIFIED
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.