Unable to save profile photo on user edit page. I can snap a photo with the camera, but the photo is not being saved.

Comments

tyler.frankenstein’s picture

Hi there, thanks for reporting this bug. I believe this is a bug with the Services module. I was never successfully able to get the User Update Service Resource to grab the file id and attach it the picture object on the user account. Here is a likely related issue in the Services issue queue:

#1309844: Change user picture?

If we can provide some reproduce-able bug information, they will probably take a look at it.

To do it ourselves, it will be in the _user_resource_update function inside the sites/all/modules/services/resources/user_resource.inc file.

The picture should be successfully uploaded to the server from the mobile app, and you should be able to find the picture file in your sites/default/files directory (or another directory). Does the picture get uploaded?

justinen’s picture

Component: Mobile App Development Kit » Ripple Emulator in Chrome
Issue summary: View changes

Tyler - I was wondering if you were ever able to successfully assign a user picture fid to a user? I'm having this issue using the Services module. I've struggled with this issue for a while now and just wondering if you were able to create a patch as I haven't seen one anywhere to fix the issue. Thanks!

tyler.frankenstein’s picture

Status: Active » Needs work

@justinen - I have not yet had any luck with this. It looks like the Services issue still persists.

#1309844: Change user picture?

We'll have to address that issue first with the Services module. We'll most likely need to patch the User Resource file(s).

justinen’s picture

@tyler.frankenstein - I've submitted a patch to the services module since I updated the code in my project for the picture update after I couldn't find any documentation on this issue. Please test it if you can.

https://drupal.org/node/1309844#comment-8866719

tyler.frankenstein’s picture

@justinen Thanks, I've starting on fixing this issue with DrupalGap core as well:

https://github.com/signalpoint/DrupalGap/issues/280

Once I get that fixed, I'll take a look at your patch and test it out, then hopefully we can get it committed into the Services module.

UPDATE: In the mean time, a way around this problem is to disable the default user picture setting in Drupal, and instead use an Image Field on your User Entity via the Drupal UI.

tyler.frankenstein’s picture

Attaching related issue.

tyler.frankenstein’s picture