Bug with RML/WP Media LIbrary/Avatar upload and possible workaround
-
Hi,
We have been hit by a strange problem occuring when authors or editors on our site are trying to upload their avatar image from the Profile page. Subscribers are not affected and can freely upload their avatar from the Profile page. The authors and editors have upload permission, of course.
When an author or editor tries to upload an avatar image directly from the profile page, he gets the following error message :
You don’t have permission to attach files to this post
Which post ? The problem also occurs if the user selects the media library and tries to upload his file from there.
In some cases, but not always, despite the error message, the image is actually uploaded but it is attached to a random article having nothing to do with the author himself. If the image is detached from this article, it can be used from the profile page to specify the user’s avatar.
Now some more strange things. This problem occurs if the user has not explicitly set the default upload folder to Unorganized in RML. If he does, the error disappears. The image is uploaded normally without a hitch from the profile page and everything is working as expected.
Capabilities for authors and editors are standard and they can upload images to RML normally without any problem. They can’t when the media library (RML) is called from the profile page.
We are not using any plugin for the avatar handling and the problem is there with and without Gravatar enaled (we can disable Gravatar with ProfilePress and the problem is still there when ProfilePress is disabled.
If I set the user’s role to subscriber instead of author, he can upload his avatar without any error.
Now, we know how to handle this issue but I’d prefer to have everythin working as expected.
Thanks in advance.
Patrick
- The topic ‘Bug with RML/WP Media LIbrary/Avatar upload and possible workaround’ is closed to new replies.