samoreen
Forum Replies Created
-
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
Hi,
Similar problem here. When authors try to upload their avatar, they receive the following error : “You don’t have permission to attach files to this post”. Only authors have this problem. Subscribers, editors, admins, etc… can upload their avatar without any issue.
The problem disappears when granting the edit_others_posts capability to authors.
Patrick
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
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
Forum: Plugins
In reply to: [Members - Membership & User Role Editor Plugin] Role Editor disappearedOK. Problem spotted. The issue appeared after adding a custom role to the admin account. If the admin account only has the administrator role, everything is working as expected.
Patrick
Forum: Plugins
In reply to: [Members - Membership & User Role Editor Plugin] Role Editor disappearedHi again,
To make it short the Role and Add new role entries are missing in the Members menu.
Patrick
I have created a new issue on Github about this problem.
https://github.com/elementor/elementor/issues/14962
Patrick
Hallo Matthias,
The problem appeared again. It is related to the issue reported here :
https://github.com/elementor/elementor/issues/12304
Which is apparently not solved. When RML is counting, it should disregard entries in wp_posts having a title starting with “Elementor-post-screenshot…..”.
MfG.
Patrick
Hallo MAtthias,
In this case, reversely, the 2 Elementor related posts existed in wp_posts as attachments but not in wp_realmedialibrary_posts. So, the problem was that the code of RML was unduly counting them. There was nothing to remove from wp_realmedialibrary_posts which was OK but rather from wp_posts.
IT’s probably the way RML is counting the images that should be reviewed. RML has retrieved the total number of images by computing the total number of posts of type attachment and then, it assumed that the excess count was probably representing images that were Unorganized. So, I guess that the global count is computed from wp_posts and each individual folder count from wp_realmedialibrary_posts. The mismatch was not detected.
Patrick
Matthias,
OK. Problem spotted although I don’t who is the culprit.
I compared the result of
SELECT * FROM
wp_posts
WHERE post_type = ‘attachment’ with the contents of wp_realmedialibrary_posts and I found that there were 2 more records in the wp_posts table. This records are related to Elementor. See screen capture here.I deleted these 2 records and everything is back to normal.
Maybe the code resetting the counter “cache” should check this kind of inconsistencies ?
Ende gut, alles gut.
MfG.
Patrick
SELECT ID FROM
wp_posts
WHERE post_type = ‘attachment’returns 437 lines not 439. So, the problem appears to be elsewhere.
Patrick
I have asked my hosting service about the SQL problem. Waiting for an answer.
Meanwhile, I have checked the counter of all folders. They are OK. That is, for all folders and subfolders in RML, except “Unorganized”, the counter is OK. This is consistent with the wp_realmedialibrary_posts table itself : the number of lines in this table corresponds exactly to the sum of all counters if I exclude “Unorganized”. So, nothing is missing there and there is no reference in that table to something that no longer exists. Each line corresponds to an actual image. I checked each folder one by one.
So, If I understand you well, there are 2 entries in wp_posts that RML is taking into account and that are referring to 2 non existing images ?
Patrick
Or a problem with the PHP settings which I can’t control very well since I’m using a shared hosting.
Patrick
> It seems that I can’t access the wp_posts table.
Wrong. I can execute “SELECT * FROM Em0k5Bx_posts”. Problem with JOIN ?
Patrick
Hallo Matthias,
It seems that I can’t execute this request. I get an error message from my hosting service saying :
Erreur dans le traitement de la requête
Code d’erreur : 500
Texte de l’erreur : TypeError (rejected)
Il semble que la connexion au serveur ait été perdue => connection lostMerci de vérifier la connectivité réseau et l’état du serveur => please check network connectivity.
However, another request like “SELECT * FROM wp_realmedialibrary_posts” works. It seems that I can’t access the wp_posts table.
Patrick