Support » Plugin: WordPress Real Media Library: Media Library Folder & File Manager » Bug with RML/WP Media LIbrary/Avatar upload and possible workaround

  • Resolved samoreen

    (@samoreen)


    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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Matthias Günter

    (@mguenter)

    Hi @samoreen !

    Thanks for your message.

    What happens, if you deactivate Real Media Library?

    Regards,
    Matthew 🙂

    Thread Starter samoreen

    (@samoreen)

    Hallo Matthew,

    What happens, if you deactivate Real Media Library?

    I didn’t try this because I’m not sure about what would happen with my settings, my RML folders, my settings in WP/LR and in WP/LR Sync Folders. Also, disabling RML would require that I put the site in maintenance mode because my authors are currently happily uploading tons of images.

    Anyway, I don’t know whether RML is the cause of the problem but it’s obvious that it is in some way involved, since the problem disappears when the user (author) sets the default RML folder to Unorganized (Non classés in french). However, I do know that the error message mentioned above can be sent by WP even when RML is not present. It’s an issue that has been often reported. It appears under various circumstances.

    Patrick

    Plugin Contributor Matthias Günter

    (@mguenter)

    Hi again @samoreen !

    I just tried to reproduce the issue, but unfortunately I cannot.

    Can you please do the following:

    – Send a list of all your used plugins
    – Send a short screencast video showing the issue

    Are you using any other media plugins which can impact this behavior?

    Regards,
    Matthew 😊

    Thread Starter samoreen

    (@samoreen)

    Hallo Matthias,

    I’m using too much plugins to allow this approach. Anyway, the following statement :

    This problem occurs if the user has not explicitly set the default upload folder to Unorganized in RML.

    is actually wrong. I made new tests and this doesn’t appear to be true all the time. Actually, now I tend to consider that the problem is on the WP side. The message “You don’t have permission to attach files to this post” hgas been mentioned in many problem reports and it seems that it can appear under various circumstances.

    So, don’t lose your time with this. I have a workaround and this is only affecting a few users on my site. I’ll keep you informed of my progress.

    MfG.

    Patrick

    Thread Starter samoreen

    (@samoreen)

    Matthias,

    I have more accurate information about this issue and I’m now sure that RML is not involved. Sorry for the trouble.

    If you are interested, here are the details…

    On our site, we want to give each user, including contributors and subscribers, the possibility to upload their own avatar. This is not natively possible with WP. So, a few plugins have appeared, allowing to do this and adding to the profile page a “select image” command. They generally have an option to give this possibility to contributors and subscribers. I have tried a few of them and everything is working correctly except for authors.

    – For admins and editors, the choice is given between uploading an image or picking one from the media library. No problem, both choices are working.

    – Subcribers and Contributors are given only one possibility : uploading their image. This works too.

    – Authors receive the above mentioned error message when trying to upload an image. However, they can upload their image first to the medial library and then go to the profile page and pick their avatar from there.

    The problem disappears if I give the edit_others_posts capability to the authors (which I actually don’t want to do ).

    I observed the same behavior with all the user avatar plugins I have tried. Others have reported a similar problem even when they are not using RML. So, it’s definitely not the culprit.

    Sorry again.

    MfG.

    Patrick

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.