Page 1 of 2
Getting error: var arrayData = jsonPath(mappingData, arrayPath.join("."))[0] || [];
Posted: Mon Nov 25, 2013 6:05 am
by Simon Bauman
Hi, I'm getting these strange error in the console and can't figure out what it is. Please help. (I have shared my project with support@appery.
Error:
var arrayData = jsonPath(mappingData, arrayPath.join("."))[0] || [];
Project:
http://appery.io/app/view/74c00321-68...
Getting error: var arrayData = jsonPath(mappingData, arrayPath.join("."))[0] || [];
Posted: Mon Nov 25, 2013 6:56 am
by Kateryna Grynko
Hi Simon,
In function 'pageStart' you read a variable 'event_details_array' from localStorage, and it's not initialized at the moment. Please rethink the app logic, where the variable should be initialized beforehand.
Getting error: var arrayData = jsonPath(mappingData, arrayPath.join("."))[0] || [];
Posted: Mon Nov 25, 2013 7:16 am
by Simon Bauman
I've stripped the project down to two actions
1) onload invoke get_events service
2) on success alert ('get_events service fired');
It's not alerting and I'm getting the same error.
Getting error: var arrayData = jsonPath(mappingData, arrayPath.join("."))[0] || [];
Posted: Mon Nov 25, 2013 7:39 am
by Kateryna Grynko
Simon,
Where will you initialize 'event_details_array' variable?
Getting error: var arrayData = jsonPath(mappingData, arrayPath.join("."))[0] || [];
Posted: Mon Nov 25, 2013 7:53 am
by Simon Bauman
it's initialized in the on_success ...just below the alert that isn't firing. (note, it has been commented out along with the pageStart call.)
The only thing that should be happening is onload:get_events and on_success:alert. Can you see what would be causing this error: var arrayData = jsonPath(mappingData, arrayPath.join("."))[0] || [];
Getting error: var arrayData = jsonPath(mappingData, arrayPath.join("."))[0] || [];
Posted: Mon Nov 25, 2013 4:24 pm
by Simon Bauman
Getting error: var arrayData = jsonPath(mappingData, arrayPath.join("."))[0] || [];
Posted: Mon Nov 25, 2013 4:26 pm
by Maryna Brodina
Hello! Sorry, not yet. Working on it.
Getting error: var arrayData = jsonPath(mappingData, arrayPath.join("."))[0] || [];
Posted: Mon Nov 25, 2013 5:54 pm
by Simon Bauman
Ok. Dead in the water until this is addressed though.
Getting error: var arrayData = jsonPath(mappingData, arrayPath.join("."))[0] || [];
Posted: Mon Nov 25, 2013 6:48 pm
by Maryna Brodina
Looks like there is some problem with get_events on event_page. Please delete this service from Data tab and add it again. Don't forget to add events in mapping.
Getting error: var arrayData = jsonPath(mappingData, arrayPath.join("."))[0] || [];
Posted: Mon Nov 25, 2013 6:56 pm
by Simon Bauman
Yeah, looks like a bug on the appery side. I can tell you that what I did just before it stopped working was I added a collapsible set, mapped it with the get_events service, then deleted the collapsible set on the design page.
My theory is that removing the collapsible set did not do the necessary 'clean up' in the back end (appery). I say this because I think that I've had this issue before and had to do what you're suggesting which is to remove the service completely and add it back. ...just something you may want to pass on to your dev team.
Thanks