• Resolved intowernet

    (@intowernet)


    Having an issue with multiple sites on multiple servers since recent update. Admin users can run media cleaner without issue, but all other user roles (even those with exact same permissions as admin) get the “The Rest API is disabled or broken” error. Can confirm everything was working before recent update.

    I have turned off every plugin except Media Cleaner and User Role Editor (which has a setting to reset all user roles to WordPress core default, which I’ve done), and still have the problem. WordPress is fully updated, as is your plugin. Running php 7.3+. I’ve re-saved the permalinks, enabled error logging in wp-config.php, and read your support info on the rest api – though I could certainly be overlooking something.

    ONLY FOR NON-ADMIN USERS, Chrome inspector console shows two errors:

    “Failed to load resource: the server responded with a status of 404 ()” for file path examplesite.com/wp-json/media-cleaner/v1/entries?limit=10&skip=0&filterBy=issues&orderBy=size&order=desc&search=:1

    “[NekoError] JsonFetcher examplesite.com/wp-json/media-cleaner/v1/entries?limit=10&skip=0&filterBy=issues&orderBy=size&order=desc&search=:1
    Object
    body: “{“code”:”rest_no_route”,”message”:”No route was found matching the URL and request method”,”data”:{“status”:404}}”
    code: “NO-ROUTE”
    error: undefined”

    I’m sorry to bother you with this, but I’ve tried everything else I can think of and would greatly appreciate your assistance. Thanks in advance!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    Hi,

    Yes, the plugin only works for admin. With different roles, can you actually acccess the screens of Media Cleaner? Which ones? Normally, that shouldn’t be possible ??

    Thread Starter intowernet

    (@intowernet)

    Jordy,

    Thank you for responding.

    Before the last update we had your plugin on several websites. It is there for other people who only had Editor roles, to periodically clean out old pictures. They could use it before and have used it. Now they cannot.

    The option to access the Cleaner is available to them under “Media/Cleaner”. The dashboard come up for a second and then the API warning blocks the screen.

    Here is something strange. I created a new user role (using User Role Editor) which was a duplicate of the Admin role but of course I had to give it a different name. Even the new user role cannot use the plugin.

    Any suggestions would be appreciated.

    Thank you.

    Dave

    Thread Starter intowernet

    (@intowernet)

    Jordy,

    It has been several weeks since I contacted you. Have you had a chance to look into this? We have several people who’s website is getting full of old pictures but they cannot clean the Media because they do not have Admin access and we cannot give it to them. This did not used to be a problem for them.

    Thank you.

    David

    Plugin Author Jordy Meow

    (@tigroumeow)

    Hi David,

    I am going to release a new version and you will be able to control who has access to the dashboard, and to the settings. I already wrote the documentation for it: https://meowapps.com/media-cleaner-faq/#Access_Control_(Roles).

    Thread Starter intowernet

    (@intowernet)

    Jordy,

    I can’t thank you enough and I know I appear to be a pain and I am sorry.

    I went to modify the filter “wpmc_allow_usage” but I cannot find it (This came from your documentation). Or do I simply add the filter to one of the existing files? If so which one?

    Again, I apologize for bugging you.

    David

    Plugin Author Jordy Meow

    (@tigroumeow)

    Hi,

    Do you know how to use WordPress actions and filters? In fact, it’s better to learn about that already, then you will know what to do ?? And to add code to your install, rather than overriding the files in your theme (like the function.php), I suggest the Code Snippets plugin.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Only Admin users can use plugin?’ is closed to new replies.