Hello Erik, There were some issues with redirect and cookie handling in the 1.0RC2 release that prevent inserts and updates from properly occuring with calendar. We aim to push an update to the Zend_Gdata component download on Monday. It will be available for download at: http://framework.zend.com/download/gdata
To see the issues that should be resolved in that version, please see: http://framework.zend.com/issues/secure/IssueNavigator.jspa?reset=true&&pid=10000&component=10088&fixfor=10100&sorter/field=key&sorter/order=DESC However, in the meantime, Zend does provide nightly SVN snapshots of the entire Zend Framework package. They are available at: http://framework.zend.com/download/snapshot The last revision made in subversion to fix problems when uploading/ editing events was 5204, so the following tar/gz English release should work fine (other languages and zip file formatted downlaods are available at the link above): http://framework.zend.com/snapshots/ZendFramework-20070610-5205-en.tar.gz With the 5202 svn commit, additional test cases were added to prevent this type of problem from occurring in the future releases. I just downloaded the nightly snapshot referenced above and verified that these tests (and all others) pass. Sorry for the inconvenience - we aim to have everything fully stabilized before the 1.0 GA release. Cheers, -Ryan On Jun 10, 7:58 am, erikj <[EMAIL PROTECTED]> wrote: > Hi all, > > I also have problems getting RC2 code to work. If I follow the Zend > documentation. Listing calendars and events is ok, but creating new > events and updating existing ones gives exceptions. > > My code: > > <?php > require_once 'Zend/Loader.php'; > Zend_Loader::loadClass('Zend_Gdata'); > Zend_Loader::loadClass('Zend_Gdata_ClientLogin'); > Zend_Loader::loadClass('Zend_Gdata_Calendar'); > Zend_Loader::loadClass('Zend_Http_Client'); > > // Parameters for ClientAuth authentication > $service = Zend_Gdata_Calendar::AUTH_SERVICE_NAME; > $user = "[EMAIL PROTECTED]"; > $pass = "--------"; > > // Create an authenticated HTTP client > $client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, > $service); > > // Create an instance of the Calendar service > $service = new Zend_Gdata_Calendar($client); > > try { > $listFeed= $service->getCalendarListFeed();} catch > (Zend_Gdata_App_Exception $e) { > > echo "Error: " . $e->getResponse(); > > } > > echo "<h1>Calendar List Feed</h1>"; > echo "<ul>"; > foreach ($listFeed as $calendar) { > echo "<li>" . $calendar->title . " (Event Feed: " . $calendar- > > >id . ")</li>"; > } > > $query = $service->newEventQuery(); > $query->setUser('default'); > // Set to $query->setVisibility('private-magicCookieValue') if using > MagicCookie auth > $query->setVisibility('private'); > $query->setProjection('full'); > $query->setOrderby('starttime'); > $query->setFutureevents('true'); > > // Retrieve the event list from the calender server > try { > $eventFeed = $service->getCalendarEventFeed($query);} catch > (Zend_Gdata_App_Exception $e) { > > echo "Error: " . $e->getResponse(); > > } > > // Iterate through the list of events, outputting them as an HTML list > echo "<ul>"; > foreach ($eventFeed as $event) { > echo "<li>" . $event->title . " (Event ID: " . $event->id . ")</ > li>";} > > echo "</ul>"; > > // Get the first event in the user's event list > $event = $eventFeed[0]; > // Change the title to a new value > $event->title = $service->newTitle("Woof!"); > > // Upload the changes to the server > try { > $event->save();} catch (Zend_Gdata_App_Exception $e) { > > echo "Error: " . $e->getResponse(); > > } > > ?> > > The response: > > # Erik J--------- (Event > Feed:http://www.google.com/calendar/feeds/default/ej--------------%40gmail...) > * Test (Event > ID:http://www.google.com/calendar/feeds/default/private/full/-----------...) > > Notice: Array to string conversion in /home/www/---/library/Zend/Gdata/ > App.php on line 487 > > Notice: Undefined offset: 1 in /home/www/---/library/Zend/Gdata/ > App.php on line 487 > > Notice: Array to string conversion in /home/www/---/zend/library/Zend/ > Gdata/App.php on line 487 > > Notice: Undefined offset: 1 in /home/www/---/library/Zend/Gdata/ > App.php on line 487 > > Notice: Array to string conversion in /home/www/ > sunshinetranslations.com/zend/library/Zend/Gdata/App.php on line 487 > > Notice: Undefined offset: 1 in /home/www/---/library/Zend/Gdata/ > App.php on line 487 > > Notice: Array to string conversion in /home/www/---/library/Zend/Gdata/ > App.php on line 487 > > Notice: Undefined offset: 1 in /home/www/---/library/Zend/Gdata/ > App.php on line 487 > > Notice: Array to string conversion in /home/www/---/library/Zend/Gdata/ > App.php on line 487 > > Notice: Undefined offset: 1 in /home/www/---/library/Zend/Gdata/ > App.php on line 487 > > Fatal error: Class 'Zend_Gdata_App_HttpException' not found in /home/ > www/---/library/Zend/Gdata/App.php on line 494 > > On 9 jun, 03:54, Trevor Johns <[EMAIL PROTECTED]> wrote: > > > On Jun 8, 4:37 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > wrote: > > > > I dont think I am suppose to use the API... LOL > > > > I got the RC2 code to work on a limited basis, I can list and view > > > items, but I a cant seem to add a new event. It gives me all types of > > > errors. :-) > > > Hello, > > I'd be happy to help, but first I need to see your code so that I can > > see what's causing the errors. :) > > > In the meantime, make sure you're looking at the right documentation. > > The docs at code.google.com are still for the 0.9 branch and are > > incompatible with the version of the GData library in Zend Framework > > 1.0. Until those get updated, this page at framework.zend.com would be > > your best source for instructions: > > > http://framework.zend.com/manual/en/zend.gdata.calendar.html > > > You might also want to take a look at the Calendar sample code, which > > also includes a demonstration on how to create events: > > > http://framework.zend.com/svn/framework/trunk/demos/Zend/Gdata/Calend... > > > -- > > Trevor Johnshttp://tjohns.net/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Calendar Data API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-calendar-help-dataapi?hl=en -~----------~----~----~----~------~----~------~--~---
