Hello
I face the following errors when using the Mobile App from an Android mobile (Samsung Galaxy Note, Gingerbread.xxla6)
error on login as administrator
-->
drupalgap_service_resource_extract_results - TypeError: Cannot read property 'length' of undefined
errors when creating new content:
-->
drupalgap_field_info_instances - TypeError: Cannot read property 'node' of undefined
node_edit_form - TypeError: Cannot read property 'length' of undefined
drupal_gap_form_render - TypeError: Cannot read property 'elements' of null
error when viewing content
-->
on startup a list of recently added content is displayed. Clicking a node title though, results in a blank page. No errors displayed, no matter what access rights the user has.
additional info:
--> This test site runs on .local
--> suspected modules that I deactivated without effect: form block, arrange fields
--> System Connect Status: "The system connect test was successful, DrupalGap is configured properly!"
Thanks for looking into this.
Charles
Comments
Comment #1
andrewchosen CreditAttribution: andrewchosen commentedI'm having the exact same issue. Glad I'm not alone, and I hope somebody can help us. I'll post if I can find anything.
Comment #2
tyler.frankenstein CreditAttribution: tyler.frankenstein commentedPlease update your site's DrupalGap module to the 7.x-1.x-dev version. That should fix it, please let me know if that works, thank you!
Comment #3
andrewchosen CreditAttribution: andrewchosen commentedThat's the version I'm using I think. 7.x-1.2+8-dev
Comment #4
tyler.frankenstein CreditAttribution: tyler.frankenstein commentedOK, please use http://jsfiddle.net/ (if possible) to place the JSON results when using FireFox Poster to POST to this example url (replace with your domain of course):
http://www.example.com/drupalgap/drupalgap_system/connect.json
Comment #5
andrewchosen CreditAttribution: andrewchosen commentedOkay, after the update to DrupalGap you pushed today, I don't seem to be getting the "drupalgap_service_resource_extract_results - TypeError: Cannot read property 'length' of undefined" error, but content still doesn't appear when selecting it from the front page.
Here is the jfiddle as requested: http://jsfiddle.net/CQzZ8/
Comment #6
andrewchosen CreditAttribution: andrewchosen commentedOkay, I monitored the log while loaded on an Android Virtual Device and every time I open a node, this error shows up in LogCat:
Comment #7
tyler.frankenstein CreditAttribution: tyler.frankenstein commentedAlrighty, making progress. Next up, try using FireFox Poster to retrieve one of your nodes, for example do a GET with FireFox Poster on:
http://www.example.com/drupalgap/node/123.json
I'd then examine those results against this file to see if anything comes to mind that might be 'undefined': https://github.com/signalpoint/DrupalGap/blob/7.x-1.x/scripts/node.js
While monitoring the log in AVD, did you see a call to retrieve the node at all? The URL would be similar to the one above. If not, then it is failing to make the call to drupalgap.services.node.retrieve.call in the pageshow event.
Comment #8
andrewchosen CreditAttribution: andrewchosen commentedThe only values I see that are 0 are tnid, sticky, cid, and comment_count
It does seem to make the call, because I see it gather all of the node information in LogCat. I did notice something strange, though. One a node that wasn't given a description, I can see the comment area on the mobile app. On my site, I use PHP to generate the node title from the description. So why would a node with no title or description show the comment area?
Comment #9
tyler.frankenstein CreditAttribution: tyler.frankenstein commentedThe 7.x-1.x-alpha branch has fixed many problems mentioned here. Please update to that version. If you continue to experience problems here, please describe it in detail and re-open the ticket. Otherwise, just create a new ticket, thanks!
Comment #10
Ivo.Radulovski CreditAttribution: Ivo.Radulovski commentedHello! In my case I use ripple and I can't see the node body at all - that is what I get in the chrome console:
ripple :: Environment Warming Up (Tea. Earl Gray. Hot.) ripple.js:37
GET http://www.familien-hilfe.at/mobile-application/config.xml 404 (Not Found) ripple.js:50
cordova :: Initialization Finished (Make it so.) ripple.js:37
The key "target-densitydpi" is not supported. (index):7
cordova :: fired deviceready event! ripple.js:37
Calling LP_setval from A onloadwff.js:78
Calling LP_setval from A onloadwff.js:78
Calling LP_setval from A onloadwff.js:78
3
Calling LP_setval from A onloadwff.js:78
2
Calling LP_setval from A onloadwff.js:78
3
Calling LP_setval from A onloadwff.js:78
Calling LP_setval from A onloadwff.js:78
POST: http://www.familien-hilfe.at/?q=drupalgap/system/connect.json jdrupal-7.x-1.0-rc2.min.js:22
200 - OK jdrupal-7.x-1.0-rc2.min.js:23
GET: http://www.familien-hilfe.at/?q=drupalgap/views_datasource/drupalgap_con... jdrupal-7.x-1.0-rc2.min.js:22
200 - OK jdrupal-7.x-1.0-rc2.min.js:23
GET: http://www.familien-hilfe.at/?q=drupalgap/node/3.json jdrupal-7.x-1.0-rc2.min.js:22
node_access - TypeError: Cannot read property 'uid' of undefined drupalgap.js:7824
GET: http://www.familien-hilfe.at/?q=drupalgap/node/3.json jdrupal-7.x-1.0-rc2.min.js:22
GET: http://www.familien-hilfe.at/?q=drupalgap/node/3.json jdrupal-7.x-1.0-rc2.min.js:22
200 - OK jdrupal-7.x-1.0-rc2.min.js:23
WARNING: theme_undefined() does not exist drupalgap.js:4481
2
200 - OK jdrupal-7.x-1.0-rc2.min.js:23
entity_load - success - TypeError: Cannot read property 'success' of undefined jdrupal-7.x-1.0-rc2.min.js:12
Help is very much appreciated!
Ivo
Comment #11
Ivo.Radulovski CreditAttribution: Ivo.Radulovski commentedComment #12
Ivo.Radulovski CreditAttribution: Ivo.Radulovski commentedComment #13
tyler.frankenstein CreditAttribution: tyler.frankenstein commentedDid you check your DrupalGap Display Mode in the Drupal UI?
http://www.drupalgap.org/node/184
Also, add this line to the top of your settings.js file to force a fresh reload everytime:
window.localStorage.clear();
Comment #14
Ivo.Radulovski CreditAttribution: Ivo.Radulovski commentedyes, i checked the Display Mode - tried serveral modes: default, plain text,...
also added window.localStorage.clear(); to the settings.php
Comment #15
tyler.frankenstein CreditAttribution: tyler.frankenstein commentedThis may be related:
https://github.com/signalpoint/DrupalGap/issues/191
Check that out for a possible solution.
Comment #16
Ivo.Radulovski CreditAttribution: Ivo.Radulovski commenteddoes not resolve the issue :(
Now I get:
GET: http://www.familien-hilfe.at/?q=drupalgap/node/3.json jdrupal-7.x-1.0-rc2.min.js:22
2
200 - OK jdrupal-7.x-1.0-rc2.min.js:23
WARNING: drupalgap_entity_get_core_fields - Unknown anonymous comment setting (page): undefined drupalgap.js:6281
GET: http://www.familien-hilfe.at/?q=drupalgap/comment.json¶meters[nid]=3 jdrupal-7.x-1.0-rc2.min.js:22
200 - OK jdrupal-7.x-1.0-rc2.min.js:23
WARNING: theme_undefined() does not exist drupalgap.js:4481
2
Calling LP_setval from A onloadwff.js:78
Calling LP_setval from A onloadwff.js:78
Calling LP_setval from A onloadwff.js:78
Comment #17
Ivo.Radulovski CreditAttribution: Ivo.Radulovski commentedComment #18
tyler.frankenstein CreditAttribution: tyler.frankenstein commentedAre you running the latest development snapshot of the DrupalGap module and SDK?
www.drupalgap.org/download
Comment #19
Ivo.Radulovski CreditAttribution: Ivo.Radulovski commentedyes, I've tried both versions - same problem.
Comment #20
tyler.frankenstein CreditAttribution: tyler.frankenstein commented@segments, do you have the core "Comment" module enabled on your Drupal site?
Although it isn't listed as a dependency in drupalgap.info, it is technically a dependency. I think that may be causing the error you are receiving.
Comment #21
Ivo.Radulovski CreditAttribution: Ivo.Radulovski commentedcomment module is active - if you have a look at the app you will see that comments are visible but not the content body: http://www.familien-hilfe.at/mobile-application/
I'll send you an email with additional access data to the website.
Ivo
Comment #22
tyler.frankenstein CreditAttribution: tyler.frankenstein commented@segments, OK, I see what is going on.
Your node has a language code of 'es':
http://www.familien-hilfe.at/?q=drupalgap/node/3.json
Then you'll notice each of the fields on your node have their language code set to 'und'.
I believe this is a bug with the Services module:
https://drupal.org/node/1668422
To get around this, drupalgap_entity_render_field() in the SDK needs to be modified to fall back to 'und' if the field's language code doesn't exist for the node's language code. This needs to be a separate issue, please create it on github.com/signalpoint/DrupalGap to get it resolved.
As for this warning:
WARNING: drupalgap_entity_get_core_fields - Unknown anonymous comment setting (page): undefined
That is unrelated to your node's field display problems, but it appears your page content type may not allow comments for anonymous users, and for some reason it is throwing a warning, but that shouldn't be a problem really.
Comment #23
tyler.frankenstein CreditAttribution: tyler.frankenstein commented@segments, I've fixed this issue. Grab the latest dev snapshot of the SDK for this fix: http://www.drupalgap.org/download
Another user, with a multi-lingual site, was having the same problem, and we were able to fix it.