webOS Nation Forums >  webOS Discussion >  webOS Synergy and Synchronization > "undefined" calendar entries
"undefined" calendar entries
  Reply
 
Thread Tools Display Modes
Old 07/28/2012, 11:05 PM   #21 (permalink)
Member
 
Posts: 46
The AgendaZ software in Preware have a option to delete orphaned item, will that help?
rcmarvin is offline   Reply With Quote
Old 07/29/2012, 05:41 AM   #22 (permalink)
Member
 
Posts: 4
Quote:
Originally Posted by rcmarvin View Post
The AgendaZ software in Preware have a option to delete orphaned item, will that help?
Hi rcmarvin,
the option "Delete orphaned Entries" (or something like that) of AgendaZ helps indeed. I enabled it and it works perfectly. The only disadvantage is, it only deletes entries within the span chosen on "Preview" (for me this is two days). But that is fine. Future orphaned events are less annoying. In my opinion this feature of AgendaZ is so far the best solution for this issue.
NewNewton is offline   Reply With Quote
Old 02/03/2013, 07:28 PM   #23 (permalink)
Member
 
Posts: 65
Quote:
Originally Posted by NewNewton View Post
Hi rcmarvin,
the option "Delete orphaned Entries" (or something like that) of AgendaZ helps indeed. I enabled it and it works perfectly. The only disadvantage is, it only deletes entries within the span chosen on "Preview" (for me this is two days). But that is fine. Future orphaned events are less annoying. In my opinion this feature of AgendaZ is so far the best solution for this issue.
How can I search for "undefined" events with luna-send? AgendaZ didn't help removing my undefined events, UberCalendar either.

And how do I search for a specific subject? I tried
Code:
luna-send -n 1 -f -a com.palm.app.calendar luna://com.palm.db/find '{"query":{"select":["subject","location","calendarId"],"from":"com.palm.calendarevent:1","where":[{"prop":"subject","op":"%","val":"stift"}]},"count":true}'
but that just returns an error:
"errorCode": -3965,
"errorText": "db: no index for query",
__________________
HP Pre³ (GSM, webOS 2.2.4, UberKernel: 1.68GHz On Demand), Palm Pre GSM, Palm Treo 680, Garmin iQue 3600, Palm III
WeeGee is offline   Reply With Quote
Old 02/05/2013, 06:48 PM   #24 (permalink)
Member
 
Posts: 65
By modifying an "undefined" event and watching the log with Lumberjack, I found the ID of one of these events. This is how it looks like:
Code:
"results": [
        {
            "_id": "++IHTyVDaGJpUbWc",
            "_kind": "com.palm.calendarevent:1",
            "_rev": 2701191,
            "_sync": true,
            "accountId": "++HqOPOxvZlHzpU2",
            "alarm": [
                {
                    "_id": "293788",
                    "action": "display",
                    "alarmTrigger": {
                        "value": "-PT30M",
                        "valueType": "DURATION"
                    }
                }
            ],
            "allDay": false,
            "calendarId": "++IHNnIS0oWSD1+6",
            "dtend": 2147483647,
            "dtstart": 2147483647,
            "eventDisplayRevset": 2701191,
            "location": "",
            "note": "",
            "rrule": <NULL>,
            "subject": "Unterricht",
            "tzId": "Europe\/Paris"
        }
    ],
And this is a correct event from the predefined HP calendar account:
Code:
"results": [
        {
            "_id": "++IIEA3c1HRtSGia",
            "_kind": "com.palm.calendarevent:1",
            "_rev": 2701210,
            "_sync": true,
            "accountId": "++Hie8G2ZmpVYUe+",
            "alarm": [
                {
                    "_id": "29379b",
                    "action": "display",
                    "alarmTrigger": {
                        "value": "-PT30M",
                        "valueType": "DURATION"
                    }
                }
            ],
            "allDay": false,
            "calendarId": "++Hie8ZbmGplJJn4",
            "dtend": 2147483647,
            "dtstart": 2147483647,
            "eventDisplayRevset": 2701210,
            "location": "Münster",
            "note": "",
            "rrule": <NULL>,
            "subject": "Dr. Legler",
            "tzId": "Europe\/Paris"
        }
    ],
The difference is, that the undefined came from a google calendar, and should have the "_kind" set to "com.palm.calendarevent.google:1". So a search for
"_kind": "com.palm.calendarevent:1",
and
"accountId": "++HqOPOxvZlHzpU2",
might find these undefined events.

But if I try
Code:
luna-send -n 1 -f -a com.palm.app.calendar luna://com.palm.db/find '{"query":{"from":"com.palm.calendarevent:1","where":[{"prop":"_kind","op":"=","val":"com.palm.calendarevent:1"}]},"count":true}'
or
Code:
luna-send -n 1 -f -a com.palm.app.calendar luna://com.palm.db/find '{"query":{"from":"com.palm.calendarevent:1","where":[{"prop":"accountId","op":"=","val":"++HqOPOxvZlHzpU2"}]},"count":true}'
I'm just getting
Code:
{
    "errorCode": -3965,
    "errorText": "db: no index for query",
    "returnValue": false
}
which means I can't query these properties, because they are not indexed. (assuming my interpretation of https://developer.palm.com/content/a...indexed-fields is correct)

Any help anyone?

There are probably thousands of undefined events remaining from this removed google calendar on my Pre, so deleting them one by one is no viable option. And I also don't want doctoring the device, because of all the stuff which is not backed up by Palm Backup and Save/Restore.

All these calendar troubles seem to become the showstopper for my webOS future...
__________________
HP Pre³ (GSM, webOS 2.2.4, UberKernel: 1.68GHz On Demand), Palm Pre GSM, Palm Treo 680, Garmin iQue 3600, Palm III
WeeGee is offline   Reply With Quote
Old 02/06/2013, 05:10 PM   #25 (permalink)
Member
 
Posts: 4
Quote:
There are probably thousands of undefined events remaining from this removed google calendar on my Pre, so deleting them one by one is no viable option. And I also don't want doctoring the device, because of all the stuff which is not backed up by Palm Backup and Save/Restore.

All these calendar troubles seem to become the showstopper for my webOS future...
Hi WeeGee,
nobody here wants that you stop using our beloved webOS, so here is help for you:

You are totally right, you can not make queries for all of the fields in the calendar database, just for those which are indexed. Sadly I have not found a list which of the fields that applies. So that part is just trial and error. But you can query for "calendarId" to get the undefined entries. I would propose the following procedure:
  1. Query which calendars are currently registered in the database with
    Code:
    luna-send -n 1 -f -a com.palm.app.calendar luna://com.palm.db/find '{"query":{"select":["_id","name"],"from":"com.palm.calendar:1"}}'
    Note all this calendarIDs, those are the "good" ones.

  2. Now the task is to find the "bad" calendarIDs, i.e. that one which are used in events but are not registered in the calendar-database. So find one of the undefined entries and make a query for his title. Since one can not query for a subject, you can do a little trick: query for all events and filter the response with the little linux tool grep. For example if one wants to search for "Dinner" the command is
    Code:
    luna-send -n 1 -f -a com.palm.app.calendar luna://com.palm.db/find '{"query":{"select":["_id","calendarId","subject","dtstart "],"from":"com.palm.calendarevent:1"}}' | grep -C 5 -e 'Dinner'
    In that way we can find out the id and the calendarID of an event. Now check if the calendar is in the list of the "good" calendars. If not it is a "bad" one and you should continue with step 3.

  3. I would propose to make at first a query to check which entries will be deleted with
    Code:
    luna-send -n 1 -f -a com.palm.app.calendar luna://com.palm.db/find '{"query":{"select":["calendarId","subject","dtstart"],"from":"com.palm.calendarevent:1","where":[{"prop":"calendarId","op":"=","val":"#calendarID#"}]},"count":true}'
    where you replace #calendarID# with the specific "bad" calendar-id

  4. Now delete them with
    Code:
    luna-send -n 1 -f -a com.palm.app.calendar luna://com.palm.db/del '{"query":"from":"com.palm.calendarevent:1","where":[{"prop":"calendarId","op":"=","val":"#calendarId#"}]}}'
    The count of deleted entries should be equal to the number returned by the query in step 3. You can check if they are really gone in the calendar app or by repeating the query in step 3, which should deliver now an empty result.

  5. Start over at step 2. There should not be more than five different "bad" calendarIDs so it will not take so much time.

Hope that solves your problem and you will stay with webOS
NewNewton is offline   Reply With Quote
Thanked by HelloNNNewman, WeeGee
Old 04/08/2013, 07:06 PM   #26 (permalink)
Member
 
Posts: 65
There is a missing "{" in this command:
Quote:
Originally Posted by NewNewton View Post
[*]Now delete them with
Code:
luna-send -n 1 -f -a com.palm.app.calendar luna://com.palm.db/del '{"query":"from":"com.palm.calendarevent:1","where":[{"prop":"calendarId","op":"=","val":"#calendarId#"}]}}'
The correct line is
Code:
luna-send -n 1 -f -a com.palm.app.calendar luna://com.palm.db/del '{"query":{"from":"com.palm.calendarevent:1","where":[{"prop":"calendarId","op":"=","val":"#calendarId#"}]}}'
I found it on https://developer.palm.com/content/a...mples.html#del
__________________
HP Pre³ (GSM, webOS 2.2.4, UberKernel: 1.68GHz On Demand), Palm Pre GSM, Palm Treo 680, Garmin iQue 3600, Palm III
WeeGee is offline   Reply With Quote
Old 04/09/2013, 07:47 AM   #27 (permalink)
Member
 
Posts: 65
While browsing through the calendar, AgendaZ deleted a whole month of calendar events, beginning from yesterday to one month back (the displayed range). I have a log where all these deletions are listed, but why??? Is there a way to undelete these entries (the IDs are in the log)? The events in the google account are all NOT synced to google, because syncing doesn't work since some weeks. Maybe the events in the palm profile are backed up, but how can I restore them from there without doctoring?

-- Sent from my Palm Pre3 using Forums
__________________
HP Pre³ (GSM, webOS 2.2.4, UberKernel: 1.68GHz On Demand), Palm Pre GSM, Palm Treo 680, Garmin iQue 3600, Palm III
WeeGee is offline   Reply With Quote
Old 04/09/2013, 04:19 PM   #28 (permalink)
pivotCE Developer
 
Posts: 2,205
It could be you can restore an old Palm Profile Backup with the app "Impostah" and there menu Backups-Restore. But i never tried it and it is a very powerful tool so don't mess with it.


Btw. you have deleted your orphaned calendar entries also with Impostah- Databases-calendarevent:1 or Databases-calendarevent.event.google:1 ... and there use Menu-Delete all items or before tap a specific item and delete it with Menu-Delete Item.
__________________
Patch Enhancing vCard Export -|- Your own cloud with Zarafa (EAS sync) -|-
Tasks-app of 2.x on 3.x incl.EAS sync -|- SYM key in Enyo on phones -|- My hidden webOS Tips and Tricks - like it ?
gizmo21 is offline   Reply With Quote
Thanked By: WeeGee
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0