Home › Forums › Plugin Support › Image upload problem
Tagged: image upload, user role
- This topic has 8 replies, 4 voices, and was last updated 12 years, 2 months ago by toddz70.
-
AuthorPosts
-
July 30, 2012 at 8:29 pm #1807July 30, 2012 at 9:46 pm #1808laurentiuMember
I’ve commented out line 177 in /models/umAjaxModel.php and now it still says “Failed” for users lower than Admin, but it loads the picture and saves it upon Profile Update.
I’m still hoping for a clean solution for this. From where I see it, the only check that should be done is current_user_can(‘upload_files’). Or maybe add a separate capability like um_upload_files or such.
July 30, 2012 at 10:51 pm #1809KhaledMemberHello,
Please open /user-meta/framework/helper/uploader.php and replace line 33Form:
$pluginFramework->verifyNonce();
Into:
$pluginFramework->verifyNonce(false);
July 31, 2012 at 3:44 am #1812laurentiuMemberI still have the problem. Ajax loads the picture, I see the animated gif, it says: “Failed” and than displays the picture and I can save it.
Is there a way to remove the “Failed” message? I’ve put a picture up, so you can see what I get.
http://sb.websiter.ro/wp-content/uploads/2012/07/failed_error_user_meta.jpgIf you think it would be of any help, I could create a user-account for you so you can look more closely into it.
July 31, 2012 at 5:29 pm #1815KhaledMemberHello, Thanks for your reporting. We’ll dig down the issue. Until than, you can use non ajax solution.
Your support is appreciated. You can send account info to our contact us section (http://user-meta.com/contact-us/).
July 31, 2012 at 6:31 pm #1818laurentiuMemberThank you for your swift reply.
I have followed your advice and disabled both file ajax upload and form ajax submit.
The form works fine now. It loads the picture, and reports “Profile successfully updated.”
But I get an error message in the login widget. It goes: “Could not save uploaded file.The upload was cancelled, or server error encountered” written in bold red.It’s funny. The “Failed” text from the ajax loading was gray and much smaller, hence less noticeable than this one.
Also, when I save the profile changes (with non-ajax) I get the “Profile successfully updated.” message in both the page and the login widget.
July 31, 2012 at 6:43 pm #1819laurentiuMemberI’ve added another picture for this error:
http://sb.websiter.ro/wp-content/uploads/2012/07/failed_error_user_meta_2.jpgAugust 22, 2012 at 10:01 am #1921PACCMemberHi, thanks for the support, I had the same issue as laurentiu (only Administrators could upload) and the tip suggested in #1809 worked for me. Now Both Administrators and non-administrators can upload using the Ajax uploader.
- This reply was modified 12 years, 3 months ago by PACC.
September 15, 2012 at 3:51 am #2091toddz70MemberI also had the same problem, and like cailloux, the solution in #1809 worked. However, should we not be concerned that this solution:
1) REMOVES a level of security, by disabling the nonce check (whatever that really means.. I honestly don’t know much about nonces yet)
2) EDITS THE CORE code of the plugin, so any subsequent updates will erase the change, requiring us to re-implement it.If setting the nonce to False is indeed a legit solution, perhaps a future release of the plugin will at least put this setting in the admin UI, so we don’t need to edit core code.
-
AuthorPosts
- You must be logged in to reply to this topic.