Image not appearing in Article - mobile application
I have Drupal 7 set up on a shared host. I uploaded and enabled all appropriate modules for the Tyler F. tutorial: [http://tylerfrankenstein.com/code/build-mobile-app-geo-tag-photo)](http://tylerfrankenstein.com/code/build-mobile-app-geo-tag-photo
I have the Drupalgap module working. Everything works fine if I launch the app in my browser. I modified the Article content type to include a geofield with lat/long as the widget. I have successfully downloaded the app and I am able to run the app in Adobe's Phonegap Desktop program, which uses a local server and wi-fi to host the app. I can connect using the PhoneGap app on my iPhone. Everything works, including login, create content, geolocation, take photo, etc., except one thing. The image, in this case a photo that I took, is not rendered when I view the article. It is visible on the actual Drupal website, and when I load the app in the browser. Just not on the Phonegap emulation.
- I have changed the mode in settings.php to 'phonegap'
- I modified the Content Types->Article->Display->DrupalGap to include all of the fields, and downloaded the modified app
I have not found anything in forums or online addressing this exact problem. What might I be missing? Could this be simply because I am using the Adobe PhoneGap program to render the app?
Thank you in advance!
@ronraney Please share Console and Network information from your browser's developer tools (you can connect Chrome to inspect a compiled Android app, and you can connect Safari to inspect a compiled iOS app). Also watch Drupal watchdog logs for any errors. That should reveal what DrupalGap is failing to do with that particular image.
This is over my head. Very sorry, I'm new to this. I know how to launch the app in Chrome, and Ripple, then inspect using Developer Tools. The web app has a couple of Console errors that are almost identical:
Uncaught TypeError: Cannot read property 'loading' of undefined at http://mywebsite.com/testing/mobile-application/bin/drupalgap-7.0.2.min.js:3:29658
Once again, the web app has no issues that I can find. Only the downloaded version that I'm running on my phone. I don't know how to "connect [browser]] to inspect a compiled [type] app". I have never heard of Drupal watchdog but I will look into how to do that.
Thanks
@ronraney No worries, it sounds intimidating, but it is quite easy. Just plug your device in via USB and connect it to your computer. Within your device's settings, make sure "developer mode" is enabled. From there, just run your app as usual on your phone. Open up your browser, then open the "Inspect devices" tool, you should then see your device in the list, click the "Inspect" button, and you'll immediately get all your typical browser developer tools, but attached to the compiled app, very cool. There are lots of articles/videos out there on how to do this per device and per platform, but what I mentioned above is the gist of it.
Thank you. I understand now what needs to happen with debugging. Unfortunately, I have an iPhone, and a PC. Hard to debug an iPhone with a PC because the PC Inspectors don't seem to detect the Apple device. I've tried several of the options out there but to no avail. If everything is running in Ripple, but not in PhoneGap Desktop, is there a chance that it still might be okay? Here's the basic problem: When I run DrupalGap in the PhoneGap Desktop application, everything works. Except for displaying images. It just shows nothing, no matter what type of content. I played around with changing some of the settings.php settings associated with file location. I made sure that the content types have images included in the Display of Default/Teaser/DrupalGap. Is there anything obvious that I might be forgetting?
@ronraney If you are using Image Styles, you may have to put this into the settings.php file because DrupalGap/Services doesn't support the required itok value for Image Styles:
$conf['image_allow_insecure_derivatives'] = TRUE;