Mobile getting 'confused' after event insert

I’m inserting an event, and saving it to the server. After it’s done, the Mobile Scheduler is ‘losing’ something. I’m getting the following error:

a is undefined
$d(a=undefined, b=Date {Mon Aug 08 2011 00:00:00 GMT-0400 (Eastern Daylight Time)})dhtmlx...bile.js (line 300)
previous(a=function(), b=Date {Mon Aug 08 2011 00:00:00 GMT-0400 (Eastern Daylight Time)}, c=undefined)dhtmlx...bile.js (line 59)
$init()dhtmlx...bile.js (line 71)
refresh(a=function(), b=undefined)dhtmlx...bile.js (line 53)
$init(a=Object { $ready=[1], config={...}, a={...}, more...}, b=function(), c=undefined)dhtmlx...bile.js (line 71)
$init(a="list2", b=undefined)dhtmlx...bile.js (line 66)
bind()dhtmlx...bile.js (line 65)
$init(a="onbindrequest", b=undefined)dhtmlx...bile.js (line 13)
bind()dhtmlx...bile.js (line 64)
$init(a="layout2")dhtmlx...bile.js (line 211)
Ma(a=Object { $ready=[1], config={...}, a={...}, more...}, b=undefined)dhtmlx...bile.js (line 214)
$getSize(a=undefined)dhtmlx...bile.js (line 96)
$setSize(a=1)dhtmlx...bile.js (line 216)
ae(a="button1")dhtmlx...bile.js (line 304)
$init(a="onitemclick", b=["button1", click clientX=102, clientY=23])dhtmlx...bile.js (line 13)
$init(a="onitemclick", b=["button1", click clientX=102, clientY=23])dhtmlx...bile.js (line 13)
$init(a="onitemclick", b=["button1", click clientX=102, clientY=23])dhtmlx...bile.js (line 13)
dhxArrowRightT(a=click clientX=102, clientY=23)dhtmlx...bile.js (line 122)
$init(a="onclick", b=[click clientX=102, clientY=23])dhtmlx...bile.js (line 13)
zIndex(a=click clientX=102, clientY=23)dhtmlx...bile.js (line 25)
[Break On This Error] this.$$("calendar").bind(this.coreData...Event("onItemClick",dhx.bind(this.Qb, 

I don’t get the error right away. If I create the event from the Month view, it saves the event and it goes to the Selected Event screen, then if I click the Back button, I get the error above.

If I create the event from the Day view, it saves the event and goes back to the day with the event. Then if I click Month, I get the error. Or if I click ‘prev’ or ‘next’ (and it doesn’t load the events from the appropriate date).

a is undefined
$d(a=undefined, b=Date {Mon Aug 08 2011 00:00:00 GMT-0400 (Eastern Daylight Time)})dhtmlx...bile.js (line 300)
previous(a=function(), b=Date {Mon Aug 08 2011 00:00:00 GMT-0400 (Eastern Daylight Time)}, c=undefined)dhtmlx...bile.js (line 59)
$init()dhtmlx...bile.js (line 71)
refresh(a=function(), b=undefined)dhtmlx...bile.js (line 53)
$init(a=Object { $ready=[1], config={...}, a={...}, more...}, b=function(), c=undefined)dhtmlx...bile.js (line 71)
$init(a="list2", b=undefined)dhtmlx...bile.js (line 66)
bind()dhtmlx...bile.js (line 65)
$init(a="onbindrequest", b=undefined)dhtmlx...bile.js (line 13)
bind()dhtmlx...bile.js (line 64)
$init(a="layout2")dhtmlx...bile.js (line 211)
Ma(a=Object { $ready=[1], config={...}, a={...}, more...}, b=undefined)dhtmlx...bile.js (line 214)
$getSize(a=undefined)dhtmlx...bile.js (line 96)
readonly_setter(a="segmented1", c="month")dhtmlx...bile.js (line 305)
$init(a="onaftertabclick", b=["segmented1", "month"])dhtmlx...bile.js (line 13)
$init(a="onaftertabclick", b=["segmented1", "month"])dhtmlx...bile.js (line 13)
$init(a="onaftertabclick", b=["segmented1", "month"])dhtmlx...bile.js (line 13)
refresh(a=click clientX=672, clientY=482, b="segmented1")dhtmlx...bile.js (line 129)
dhx_el_segmented(a=click clientX=672, clientY=482, b="segmented1")dhtmlx...bile.js (line 129)
dhxArrowRightT(a=click clientX=672, clientY=482)dhtmlx...bile.js (line 121)
$init(a="onclick", b=[click clientX=672, clientY=482])dhtmlx...bile.js (line 13)
zIndex(a=click clientX=672, clientY=482)dhtmlx...bile.js (line 25)
[Break On This Error] this.$$("calendar").bind(this.coreData...Event("onItemClick",dhx.bind(this.Qb, 

Once I get that error, I can’t click any views - it won’t go to the view. Changing the date, etc doesn’t work. Basically, everything is ‘confused’.

It doesn’t have any problems if I delete an event; only after adding an event.

Here’s the response from adding a typical event successfully

<?xml version='1.0' ?><data><action type='insert' sid='1314654259515' tid='1314654435418' ></action></data>

Bottomline, after adding an event, it doesn’t update the events listed for any given day, even if it can change the day or month. Any help is GREATLY appreciated, as this has me stumped.

Thank you,
Rob

PS - sorry for the long-winded novel. Hopefully there’s enough data to help figure this out.

I have other ‘non-event’ related forms in my implementation. It doesn’t have a problem going to them. But as soon as it tries to query the list of events, the error pops.

I’m using the same logic on the mobile ‘events.php’ script as I use for the Scheduler app.

I hope that this helps. I just need to know where to look.

Thank you,
Rob

PS - I have systematically disabled as much of any customizations as I can. It looks like the problem is with how it handles the return. If I disable the internet connectivity and then save the event, it behaves as it should. Is the site returning a new event id? Is the Mobile app handling it properly?

Another symptom:

When I create the event and save it and it shows me the selected_event view, if I click the Edit button, I can delete the event. And then I can look at other days/months on the calendar as expected.

I checked. When it deleted the event, it used the ‘tid’ returned from the server, not the ‘sid’.

(This is driving me nuts :frowning: But the more I look into it, the more it appears to be Mobile related, not any customizations I may have done .)

Hi,

there was problem with id changing in scheduler. I have attached the dhtmlxscheduler_mobile.js with the fix for it, If the problem is not solved, try to use the _debug version from the attachment to get the error details.
scheduler_mobile.zip (112 KB)

Alexandra,

Thank you! I knew if I provided enough information, that you’d be able to help me :slight_smile:

Unfortunately, it isn’t able to load any events at the moment. There appears to be a problem with a date that is undefined. Here’s the output of the debug file

date is undefined
copy(date=undefined)dhtmlx...ebug.js (line 7350)
datePart(date=undefined)dhtmlx...ebug.js (line 7338)
event_time(obj=Date {Tue Aug 30 2011 09:30:00 GMT-0400 (Eastern Daylight Time)})dhtmlx...ebug.js (line 8838)
month_event_title(obj=Object { id="1232284405893-0278", start_date=Date, end_date=Date, more...}, type=Object { name="DayEventsList", css="day_events", cssNoEvents="no_events", more...})mobile.php (line 331)
_toHTML(obj=Object { id="1232284405893-0278", start_date=Date, end_date=Date, more...})dhtmlx...ebug.js (line 5503)
map(functor=function(), master=Object { $ready=[1], config={...}, _settings={...}, more...})dhtmlx...ebug.js (line 727)
render(id=undefined, data=undefined, type=undefined)dhtmlx...ebug.js (line 5607)
render()dhtmlx...ebug.js (line 2857)
(?)()dhtmlx...ebug.js (line 5633)
bind()dhtmlx...ebug.js (line 430)
callEvent(type="onstoreupdated", params=[null, null, null])dhtmlx...ebug.js (line 648)
refresh(id=undefined)dhtmlx...ebug.js (line 2417)
(?)()dhtmlx...ebug.js (line 2523)
bind()dhtmlx...ebug.js (line 430)
callEvent(type="onstoreupdated", params=[null, null, null])dhtmlx...ebug.js (line 648)
refresh(id=undefined)dhtmlx...ebug.js (line 2417)
_parse(data=Document )dhtmlx...ebug.js (line 2379)
_onLoad(text="<?xml version='1.0' enc...xtColor></event></data>", xml=Document , loader=XMLHttpRequest { responseXML=document, responseText="<?xml version='1.0' enc...xtColor></event></data>", response="<?xml version='1.0' enc...xtColor></event></data>", more...})dhtmlx...ebug.js (line 2242)
onreadystatechange()dhtmlx...ebug.js (line 1761)
[Break On This Error] return new Date(date.valueOf());date is undefined
copy(date=undefined)dhtmlx...ebug.js (line 7350)
datePart(date=undefined)dhtmlx...ebug.js (line 7338)
event_time(obj=Date {Tue Aug 30 2011 09:30:00 GMT-0400 (Eastern Daylight Time)})dhtmlx...ebug.js (line 8838)
month_event_title(obj=Object { id="1232284405893-0278", start_date=Date, end_date=Date, more...}, type=Object { name="DayEventsList", css="day_events", cssNoEvents="no_events", more...})mobile.php (line 331)
_toHTML(obj=Object { id="1232284405893-0278", start_date=Date, end_date=Date, more...})dhtmlx...ebug.js (line 5503)
map(functor=function(), master=Object { $ready=[1], config={...}, _settings={...}, more...})dhtmlx...ebug.js (line 727)
render(id=undefined, data=undefined, type=undefined)dhtmlx...ebug.js (line 5607)
render()dhtmlx...ebug.js (line 2857)
(?)()dhtmlx...ebug.js (line 5633)
bind()dhtmlx...ebug.js (line 430)
callEvent(type="onstoreupdated", params=[null, null, null])dhtmlx...ebug.js (line 648)
refresh(id=undefined)dhtmlx...ebug.js (line 2417)
(?)()dhtmlx...ebug.js (line 2523)
bind()dhtmlx...ebug.js (line 430)
callEvent(type="onstoreupdated", params=[null, null, null])dhtmlx...ebug.js (line 648)
refresh(id=undefined)dhtmlx...ebug.js (line 2417)
_parse(data=Document )dhtmlx...ebug.js (line 2379)
_onLoad(text="<?xml version='1.0' enc...xtColor></event></data>", xml=Document , loader=XMLHttpRequest { responseXML=document, responseText="<?xml version='1.0' enc...xtColor></event></data>", response="<?xml version='1.0' enc...xtColor></event></data>", more...})dhtmlx...ebug.js (line 2242)
onreadystatechange()dhtmlx...ebug.js (line 1761)
[Break On This Error] return new Date(date.valueOf()); date is undefined
copy(date=undefined)dhtmlx...ebug.js (line 7350)
datePart(date=undefined)dhtmlx...ebug.js (line 7338)
event_time(obj=Date {Tue Aug 30 2011 09:30:00 GMT-0400 (Eastern Daylight Time)})dhtmlx...ebug.js (line 8838)
month_event_title(obj=Object { id="1232284405893-0278", start_date=Date, end_date=Date, more...}, type=Object { name="DayEventsList", css="day_events", cssNoEvents="no_events", more...})mobile.php (line 331)
_toHTML(obj=Object { id="1232284405893-0278", start_date=Date, end_date=Date, more...})dhtmlx...ebug.js (line 5503)
map(functor=function(), master=Object { $ready=[1], config={...}, _settings={...}, more...})dhtmlx...ebug.js (line 727)
render(id=undefined, data=undefined, type=undefined)dhtmlx...ebug.js (line 5607)
render()dhtmlx...ebug.js (line 2857)
(?)()dhtmlx...ebug.js (line 5633)
bind()dhtmlx...ebug.js (line 430)
callEvent(type="onstoreupdated", params=[null, null, null])dhtmlx...ebug.js (line 648)
refresh(id=undefined)dhtmlx...ebug.js (line 2417)
(?)()dhtmlx...ebug.js (line 2523)
bind()dhtmlx...ebug.js (line 430)
callEvent(type="onstoreupdated", params=[null, null, null])dhtmlx...ebug.js (line 648)
refresh(id=undefined)dhtmlx...ebug.js (line 2417)
_parse(data=Document )dhtmlx...ebug.js (line 2379)
_onLoad(text="<?xml version='1.0' enc...xtColor></event></data>", xml=Document , loader=XMLHttpRequest { responseXML=document, responseText="<?xml version='1.0' enc...xtColor></event></data>", response="<?xml version='1.0' enc...xtColor></event></data>", more...})dhtmlx...ebug.js (line 2242)
onreadystatechange()dhtmlx...ebug.js (line 1761)
[Break On This Error] return new Date(date.valueOf()); dhtmlx...ebug.js (line 7350)

All of my events have start and stop dates, so I don’t think that is the problem.

Thank you for looking into this with me!!
Rob

Alexandra,

The good news is that the new file appears to be handling the id change. I can view events in the Day view, add an event and see it appear in the Day view. I can then move from day to day with the Prev and Next buttons and see the events of the appropriate day.

Unfortunately, once I go to the Day view, I can’t move back to the List or Month views.

On initial load, I can move from Month to Month, but no events appear, just the error. And it can’t display the List view at all.

I hope all of this is helpful.

Thank you again,
Rob

Alexandra,

After further digging into the <new> issue, it appears to be because the templates have been redefined. Since I apparently customized them, I’ll need to update my customizations.

So this is now my issue to solve. (I tested the file with the customizations removed, and all appears to be working.)

Thank you!! :smiley:
Rob

PS - On a slightly different note, I preferred the List view where it jumped to the currently selected Day’s events and beyond. Then you could select the Today button and it would jump to Today’s and beyond. I believe now it is forced to Today’s, and cannot move?

One more update…

After adding an event, everything is functional, but it is still showing an error.

Here’s the error information from the debug version:

this.$$(
(?)(old="1314705447830", newId="1314705538651")dhtmlx...ebug.js (line 9174)
bind()dhtmlx...ebug.js (line 430)
callEvent(type="onidchange", params=["1314705447830", "1314705538651"])dhtmlx...ebug.js (line 648)
changeId(old="1314705447830", newid="1314705538651")dhtmlx...ebug.js (line 2393)
_processResult(text="<?xml version='1.0' ?><...8651' ></action></data>", data=Document , loader=XMLHttpRequest { responseXML=document, responseText="<?xml version='1.0' ?><...8651' ></action></data>", response="<?xml version='1.0' ?><...8651' ></action></data>", more...})dhtmlx...ebug.js (line 8617)
bind()dhtmlx...ebug.js (line 430)
onreadystatechange()dhtmlx...ebug.js (line 1761)
[Break On This Error] this.$$("calendarDayEvents").changeId(old,newId); dhtmlx...ebug.js (line 9174)

Again, thank you for all your help!!
Rob

Rob,

We have modified libraries. Please try the attached.
scheduler_mobile.zip (112 KB)

Alexandra,

Thank you. Working well now. :smiley:

Have a great day!!
Rob