Closed ajones05 closed 7 years ago
Later when I viewed my profile from a different user, the whole profile looks empty
I could not reproduce the issue. How did you login new user? FB or Email?
Here's an example: I edit my profile - in this case, "interests" - then go back to view my profile and the changes I saved are not shown; instead, it shows the old interests. Video: https://www.dropbox.com/s/5fy0qw043c9vuwc/edit%20profile%20issue.mov?dl=0
@yuriyua I have noticed that we are not sending interests as parameter when updating a profile. In the docs, I can see that http://www.seearound.me/mobile/edit-profile does not include interests or activity param. Can you please tell me what should be the name of this param? and is it being updated on the server side?
done, I added "interest" parameter to mobile/edit-profile gateway https://github.com/ajones05/seearound.me/wiki/Mobile-Api-Reference/_compare/f48cfd0b23303da5ab58640522eeb1ce3c53cf02...a54ec6179b6190a2508d8a437acfd53d85feb5c8
@ajones05 I have uploaded a build after fixing it but without testing as my iPhone is off. I am waiting for it to wakeup. When left without charging, some times it takes a lot of time to wake up.
iPhone just woke up and so I tested it. Looks like it has been fixed. I can update my profile. I think all issues for 'Go' have been fixed. Let me know if all is well and I'll prepare the release build.
I am experiencing the same issue as I described before:
When I hit save changes, it goes back to the profile but without any changes. (I tried to edit interests, but nothing changed)
Any changes I make and save DO appear to save in the "edit profile" view, but NOT in the actual profile that is visible to others. (So in the regular profile view, it is not updated. But if I go back to Edit Profile then I see the changes I had made).
Still no change for me on this issue
it works from the server side
It works for me as well. So the issue is really weird. I am trying to investigate.
@yuriyua It appears to be an issue with DOB. I am getting this response: {"data":{"status":"FAILED","message":"\"birth_date\" - 'Thu Jun 02 1977 00:00:00 GMT+0500 (PKT)' is not valid"},"status":200,"config":{"method":"POST","transformRequest":[null,null],"transformResponse":[null],"url":"http://www.seearoundgo.com/mobile/edit-profile","data":{"token":"T695749B14Z4X1X4TPZ54M2823PTCYL75XCB1MM2RL5NM2SGRSMVFP4HRTD6S2DY","name":"Abdul Hafeez","email":"ahz.100@hotmail.com","birth_date":"1977-06-01T19:00:00.000Z","publicprofile":0,"gender":"Male","interest":"Foot","image":"http://www.seearoundgo.com/uploads/default.jpg"},"headers":{"Accept":"application/json, text/plain, /_","Content-Type":"application/x-www-form-urlencoded;charset=utf-8"}},"statusText":"OK"}
In what format are you expecting the date? Can we change it to timestamp? It is not a good idea to send date in some format to server. It will always cause trouble.
Interesting thing is that data is saved properly despite this failure response. Perhaps that is why I could not see this error.
Note: I have tried to send date in many formats but nothing works including [DD-MM-YYYY]
I old api version it was DD-MM-YYYY https://github.com/ajones05/seearound.me/wiki/Mobile-Api-Reference#-mobileedit-profile
I think it bad idea to save just date in timestamp forma...
I tested. It works from server side
Note: I have tried to send date in many formats but nothing works including [DD-MM-YYYY]
Can you send me requests/responses examples?
You can see request and response data in above example i pasted where "birth_date":"1977-06-01T19:00:00.000Z" Should I send just a string like "02-06-1977" ?
Should I send just a string like "02-06-1977" ?
yes, for example 21-12-1980
OK, there were some date formatting issues which might be responsible for this behaviour. I have fixed them and now it seems to be working fine.
Profile edits (like change in "date of birth" or "interests") are still not getting saved. I have tried existing and new profiles and it is not working in all cases.
I am not getting any issue with it now: {"data":{"status":"SUCCESS","message":"User profile has been updated successfully","result":{"user_id":"426","karma":0,"Name":"Test User","Email_id":"test000@test.com","address":"Unnamed Road, Lahore, Punjab, PK","latitude":"31.57411226288475","longitude":"74.4117033103263","Profile_image":"http://www.seearoundgo.com/uploads/default.jpg","Gender":"Male","Activities":"Test","Birth_date":"10-06-1987"}},"status":200,"config":{"method":"POST","transformRequest":[null,null],"transformResponse":[null],"url":"http://www.seearoundgo.com/mobile/edit-profile","data":{"name":"Test User","email":"test000@test.com","birth_date":"10-06-1987","publicprofile":false,"gender":"Male","interest":"Test","image":"http://www.seearoundgo.com/uploads/default.jpg","token":"RN8A2N7V57HIYGM8Q1V9ZR8Y4RCAS6BLTIYX95RDBBZ9TLHKMDTM64LAXZKP5YC1"},"headers":{"Accept":"application/json, text/plain, /_","Content-Type":"application/x-www-form-urlencoded;charset=utf-8"}},"statusText":"OK"}
Wonder what is happening. Are you sure you installed latest build?
The latest build is 0.2.3 right? That's the version I have installed. But it still works the same for me as this comment from before. Not sure if the video helps, but there's no change since then.
Here's an example: I edit my profile - in this case, "interests" - then go back to view my profile and the changes I saved are not shown; instead, it shows the old interests. Video: https://www.dropbox.com/s/5fy0qw043c9vuwc/edit%20profile%20issue.mov?dl=0
It's like it successfully saves the changes within the Edit Profile view, but then as soon as I hit the back arrow it reloads the profile from a previous version.
Quite weird. I am trying to diagnose the problem.
Have you tried to kill the app after saving changes and then open back to see if changes have been really saved?
In my case, it does show the saved changes on doing the above and also right after coming back from the edit view.
I think I have found the culprit. Just to confirm, one last question: When you press save button on edit profile, does it go back to profile page itself or you have to tap on back button?
Have you tried to kill the app after saving changes and then open back to see if changes have been really saved?
I just tried and found the same result: nothing was actually saved.
I think I have found the culprit. Just to confirm, one last question: When you press save button on edit profile, does it go back to profile page itself or you have to tap on back button?
It does not go back to the profile page itself. Here is what happens for me:
Thanks. That confirms my doubts. You must have seen some issues after attempting it ... like there are no posts if you kill the app and open again and that it was working on first attempt but subsequent attempts failed. These are all related and have a common root cause: There is no token when the updated user data is saved.
@yuriyua The user data in response of mobile/edit-profile does not have token. I was saving it as it is which caused all troubles. Would you like to include the token or I should manage it on my side and use saved token?
I think it doesn't make sense for update token on save user changes you need use saved token
OK, thanks
@ajones05 You must signout before testing anything in the new build (0.2.4) so that wrong data is cleared.
It looks like saving changes to profile isn't working again. I just tried to make changes to an account's profile but it didn't work.
It is working. I tested on android and iPhone. Working fine on both. I don't see any issue with this functionality now.
Still not working. Try changing name or profile image for this user, for example (doesn't work for me): user: vvhat.if@gmail.com pw: Resource17
Here's a screen video. Maybe I'm doing something different that is causing the issue? https://www.dropbox.com/s/y7fj99ginpn4eer/Edit%20profile%20issue.mov?dl=0
*Note: a friend using an Android phone to test confirmed he can't save edits to his profile, either
Looks like it was due to a javascript error generating due to date format issues. I have fixed it. If the problem was this, then it should be OK now.
Still not working for me, although it might be related to the date issue. When I go to "edit profile," the date is blank, instead of having my date of birth. If I select into it, it defaults to today's date. If I save it and go back, it switches back to what it was previously. I can create another video capture if it will help, but it's the same as the last one I shared.
This is slightly different issue. I realised it after distributing android version and fixed for ios. Please test iOS version and see if it is saving changes.
Same as before, but I think I might have discovered the issue and it is related to date of birth.
You can try on this account. Log in and under edit profile try to change the name (but leave DOB empty as it is). You'll see it won't work. vvhat.if // Resource17
So in cases where a DOB is not displayed, nothing else can be saved unless it is also set to a date and saved.
However, that should be changed since users should not have to set a DOB if they don't want to.
Also, do we get DOB from facebook login? Testing on an account with FB login, the age is displayed but DOB is also empty, causing the same issue.
Clearly, the date format in case of FB login is different. In case of normal login, I get dd-mm-yyyy while in case of FB login I get yyyy-mm-dd as obvious from the image @yuriyua posted. @yuriyua can you make the format same for both cases?
@ajones05 It is the difference of date formats coming from server side that is causing issues. I have tried with vvhatif account and I can see the exact issue you are getting. Looking into the data, the dob is like this: "Birth_date":"1983-03-25" This is wrong format. In some previous discussion, yuriyua and I agreed upon dd-mm-yyyy format so my code is expecting the format to be dd-mm-yyyy while you can see here that format in your account is yyyy-mm-dd. I wasn't getting this issue because dob format in my account was correct.
We must save same format in all cases. Whether a user logs in from FB or otherwise or updates profiles .... in all cases, the date format returned by the server must be in one single decided format.
there is no difference between mobile/login and mobile/fb-login date format
you can check log:
date forma dd-mm-yyyy there in mobile/edit-profile response I changed it to format yyyy-mm-dd
@abdulhafeez Should I change date format for mobile/login and mobile/fb-login ?
That format is fine. The only thing I wanted is that it should be same everywhere. I have resolved the issue of displaying date on edit profile page by making changes according to given format. But when I try to save profile through mobile/edit-profile api, I am getting this response:
{"data":{"status":"FAILED","message":"Internal Server Error"},"status":200,"config":{"method":"POST","transformRequest":[null,null],"transformResponse":[null],"url":"http://www.seearound.me/mobile/edit-profile","data":{"name":"Andrew Jones","email":"vvhatif@gmail.com","birth_date":"25-03-1983","public_profile":0,"gender":"Male","interest":"restaurant, rally, protest, soccer, startup","image":"http://www.seearound.me/uploads/vlab8mnyns.jpg","token":"IYVCH3Z7D85DDSF2DKTV7PZBPTC73TQMRL2BN1I49NHMHZNYKISS9S51MG8PBZD5"},"headers":{"Accept":"application/json, text/plain, /","Content-Type":"application/x-www-form-urlencoded;charset=utf-8"}},"statusText":"OK"}
@yuriyua can you see why it is failing?
let me see
Is the format of date I am sending correct? "birth_date":"25-03-1983"
Fixed. Issue was from the server side in gender value
Thanks! The issue seems to be completely fixed now. I was able to update both Andrew's and my own account.
When I hit save changes, it goes back to the profile but without any changes. (I tried to edit interests, but nothing changed)