Forum Replies Created
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:
And here it is in the newest version that is not working:
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?
Sure, 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.
I 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.