Home › Forums › Bug Reporting › Avatar Uploading Failed
- This topic has 9 replies, 5 voices, and was last updated 7 years ago by Khaled.
-
AuthorPosts
-
August 2, 2017 at 12:45 am #8384August 2, 2017 at 1:12 pm #8387KhaledMember
Hi Mark,
With v1.3, please try file upload field. Just want to see if the issue is in avatar or overall file uploading field.
Thanks.
August 2, 2017 at 10:57 pm #8388Mark FiglozziMemberI added a file upload field and that also failed in exactly the same way as the avatar field. This is all in the backend profile, BTW. On the frontend the avatar field seems to work fine.
Thanks, Khaled.
August 4, 2017 at 12:19 pm #8392KhaledMemberHi Mark,
Is it possible to set a temp admin account on your site so that I could have a closer look in the issue? You can use support(at)user-met.com for admin access.
Thanks.
August 4, 2017 at 7:00 pm #8394Mark FiglozziMemberSure, I can do that, but before I do is it possible for you to open up our license temporarily to allow installation on our dev domain (dev.lawpact.org)? That way, you can experiment without worrying about changing anything on our live site.
August 15, 2017 at 9:24 pm #8401Mark FiglozziMemberHi, Khaled.
I started looking into this myself and I found the issue. Here’s the AJAX request for uploading a file in the last version that worked for us:
/wp-admin/admin-ajax.php?qqfile=Jon_Boy.jpg&action=um_file_uploader&field_name=user_avatar&field_id=um_field_40&form_key=&pf_nonce=2e64019f9a
And here it is in the newest version that is not working:
/admin-ajax.php?qqfile=Jon_Boy.jpg&action=um_file_uploader&field_name=user_avatar&field_id=um_field_40&form_key=undefined&pf_nonce=dc52c5750f
The difference is that in the new, non-working version the form_key parameter is ‘undefined’ whereas in the working version that parameter is blank. And the reason for that is because no um_form_key attribute is added to the avatar field wrapper div in the newest version. The uploading code is pretty much the same between these versions except for the new File class in models/classes/Field so you might want to look into a fix there.
But what I did to fix it for the time being was to change line 232 in user-meta.js:
var formKey = jQuery(this).attr(“um_form_key”) || ”;
And comment out the redundant assignment on line 242. This passes the form_key attribute as blank instead of ‘undefined’ and the upload succeeds.
Do you know a way to fix this through the plugin settings? Or will there be a fix in an upcoming version?
September 20, 2017 at 1:14 am #8411bronntMemberHello, I am having a similar issue uploading an image using the avatar field using version 1.3. Any progress on this issue?
Thanks, BrianSeptember 20, 2017 at 9:11 am #8412groupewibiMemberSame there. Issue. I have been forced to change and replace avatar by picture and replace after the field using a function.
October 11, 2017 at 4:28 am #8419Marko SchmittMemberI am having the same issue. The filename displays for avatar as well as for fileUpload – but the actaul image does not display. I have used the settings you recommned in the documentation.
You can see this at http://www.staging3.smartstart.co/ – the form is located just below the banner picture
Please advise. Thanks!
Marko
- This reply was modified 7 years, 1 month ago by Marko Schmitt.
October 28, 2017 at 12:34 am #8428KhaledMemberHello Everyone,
Please try our dev version. The issue has been solved in the dev version.
@Mark Figlozzi, Thanks for your inspection.Thanks.
-
AuthorPosts
- You must be logged in to reply to this topic.