add media button missing from editor
-
My theme is a child of twentytwelve and I have the classic plugin installed. Recently, I added a new account and assigned it with the “editor” role.
Suddenly, for the “editor”, the “add media” button has disappeared. Also, if any attempt to edit earlier posts, all the buttons have disappeared.
Everything looks completely normal for the “administrator” role.
Here is a screenshot showing what I see as editor OR as administrator:
etherwork [dot] net [slash] blog [slash] scrnshot_editing [slash]I tried switching to twenty nineteen theme and the problem remains.
Please advise.
[Signature link removed by moderator per forum guidelines.]
-
This topic was modified 6 years, 10 months ago by
James Huff. Reason: signature link removed
-
This topic was modified 6 years, 10 months ago by
-
See https://ww.wp.xz.cn/support/article/roles-and-capabilities/ for the default capabilities of each role. The editor role should be able to upload files. Perhaps yours was changed? You can use a plugin like User Role Editor to see what all the roles can do, and adjust if they are not what you want.
Thank you for your reply, Joy. Unfortunately, it does not really address the problem.
I had already checked to make sure that the editor can upload files. I neglected to stress that it is possible to access the media area in the “editor” role and media can be added and deleted by an “editor”. It appears to be just in the post area that the “add media” buttons are missing, as well as the tabs to switch between visual and text.
I’m not sure that adding another plugin is the answer. It also seems clear that it is not my theme that is causing this error.
I deactivated the classic plugin to see if that was what was causing the “add media” button to disappear from the posting area. But no. The “add block” plus sign is faded for the editor role and cannot be clicked (all appears normal for the administrator).
With the classic plugin activated, looking at the view-source for the posting page, the following coding appears for the “administrator” role. It is entirely missing for the “editor” role.
<div id="wp-content-wrap" class="wp-core-ui wp-editor-wrap html-active has-dfw"><link rel='stylesheet' id='editor-buttons-css' href='/wp-includes/css/editor.min.css?ver=b1480859aa94c903cf25cff24d70acc2' type='text/css' media='all' /> <div id="wp-content-editor-tools" class="wp-editor-tools hide-if-no-js"><div id="wp-content-media-buttons" class="wp-media-buttons"><button type="button" id="insert-media-button" class="button insert-media add_media" data-editor="content"><span class="wp-media-buttons-icon"></span> Add Media</button></div> <div class="wp-editor-tabs"><button type="button" id="content-tmce" class="wp-switch-editor switch-tmce" data-wp-editor-id="content">Visual</button> <button type="button" id="content-html" class="wp-switch-editor switch-html" data-wp-editor-id="content">Text (HTML)</button> </div> </div>Please note that this problem with the “editor” role being unable to add media to a post occurs if the twenty nineteen theme is chosen, whether the classic plugin is activated or not.
Here again, is the image with the screenshots of the post editing area (classic plugin activated)
etherwork [dot] net /blog/scrnshot_editing/And here is an image with screenshots showing the block editor:
etherwork [dot] net /blog/scrnshot_editing_block-editor/Unfortunately, it does not really address the problem.
Everything you said points right back to what I answered before. The editor role “should” be able to upload files, but since it is not performing that way, something has changed it. There have been topics in these forums about this, and sites have been hacked with code that changes capabilities. So, I suggested a plugin that lets you look at what they are set to, and can update them to what they “should” be by default. You probably should do a security scan on your site as well.
(Themes don’t have anything to do with the roles and capabilities, and so it should not matter what theme you are using. If a premium theme is changing that, you should switch themes.)
There have been topics in these forums about this, and sites have been hacked with code that changes capabilities. So, I suggested a plugin that lets you look at what they are set to, and can update them to what they “should” be by default.
I neglected to mention that I did search the forum but did not find anything in the replies that appeared to address the problem. I must say that it really isn’t making a lot sense to install a plugin to do something that can be easily done within WP already. And of course, I had already checked that the new user has the editor role, as well as checking what users with the editor role can do.
Still, I installed the User Role Editor plugin. I checked that the editor can create and edit posts. There is no change at all to what I see when logging in as the editor.
Therefore I have deleted the plugin.Summary of Roles […] Editor (slug: ‘editor’) – somebody who can publish and manage posts including the posts of other users. […]
Since 2.0
Allows access to Administration Screens options:
Posts
Posts > Add New
Comments
Comments > Awaiting Moderation(https://ww.wp.xz.cn/support/article/roles-and-capabilities/#editor)
This is why I came in here to ask why the editor does not have the correct capabilities.
You probably should do a security scan on your site as well.
Of course this is a good reminder. However, I have scheduled WordFence scans to be done often. But just to be sure, I just ran a scan now: “No new issues have been found”.
It pains me to realize that I must now deactivate all the plugins and add them one by one, to see if it’s a plugin conflict. If this is the case, I will report back so that other people running into the same problem might be helped….
(I apologize for adding a signature to my original post; I did not realize that I was doing something wrong.)
Excuse me for replying to myself. I just deactivated all plugins and looked at the post section for the editor. Of course, the Gutenberg block editor was the only one installed because the Classic Plugin was disabled. The plus sign for adding blocks was NOT available in editor mode.
I installed the User Role Editor plugin. I checked that the editor can create and edit posts.
Does this mean that you checked using the plugin that the role had correct capabilities (as listed in the docs)? Or that you installed the plugin and tried your test again? (The whole point of the plugin was to see if something had changed the capabilities from what they should be. It was only for temporary usage anyway.)
Does this mean that you checked using the plugin that the role had correct capabilities (as listed in the docs)? Or that you installed the plugin and tried your test again? (The whole point of the plugin was to see if something had changed the capabilities from what they should be. It was only for temporary usage anyway.)
I did all of these things. I installed the plugin to see that the editor did not have “create post” capabilities, but that the “edit post” was enabled.
I then checked “create post” for the editor and tried again. There was no change at all. I cleared cache after each change. (When there was no fix, I removed the plugin.)
I also, as a test, went into another WP that I am an admin. I created a new user with editor role. Everything is working as expected; the editor is able to edit posts normally.
It’s frustrating to feel compelled to try to reproduce (and/or eliminate) the problem without knowing what on earth is causing it.
The whole reason that I created the editor role was for security reasons: “Create an Editor account and use it solely to publish content (wpsecuritychecklist.org)”.
I did all of these things. I installed the plugin to see that the editor did not have “create post” capabilities, but that the “edit post” was enabled.
I then checked “create post” for the editor and tried again. There was no change at all. I cleared cache after each change. (When there was no fix, I removed the plugin.)
You were supposed to check the upload_files capability, not create_post or edit_post. And the point was to see if what you had matched what the defaults are, to determine if it got changed behind the scenes.
It’s frustrating to feel compelled to try to reproduce (and/or eliminate) the problem without knowing what on earth is causing it.
All problem solving is this way.
You were supposed to check the upload_files capability, not create_post or edit_post. And the point was to see if what you had matched what the defaults are, to determine if it got changed behind the scenes.
I fear that I have not described things correctly. Please note that the editor role can access the media area, can upload and/or delete media. What is not readily available are editing buttons in the posting area.
Because I have the Classic Editor plugin, the page should like this:
https://ww.wp.xz.cn/support/article/writing-posts/#post-field-descriptions
And indeed, it does for the Administrator role.However, for the editor role, the “add media” button, and the “Visual” and “Text” tabs are missing for a new post. For posts that have already been published, the formatting buttons are missing as well.
When I disable the Classic Editor plugin, the posting area for the editor role has only a faded circled plus sign at the top left side of the posting area. For the editor role, it does not resemble this at all :
https://ww.wp.xz.cn/support/article/wordpress-editor/#adding-a-blockJust to be sure, I re-installed and activated the plugin User Role Editor plugin. As expected, the upload_files capability is checked for the editor role. I have once again deactivated and deleted the plugin.
Here’s hoping that this will shed some light on how to resolve this, with the knowledge that it is the posting area for the editor role that is the issue here.
Here’s hoping that this will shed some light on how to resolve this, with the knowledge that it is the posting area for the editor role that is the issue here.
I understood this before. You didn’t add anything new.
Now that you verified the one thing it was likely to be, I’m not sure what else to suggest. Do you have any plugins that affect the editor or uploads or capabilities, that aren’t on the other site where it is working correctly?Do you have any plugins that affect the editor or uploads or capabilities, that aren’t on the other site where it is working correctly?
How embarrassing. It appears to be the plugin WP-CMS Post Control: In the Advanced Controls section, I had “remove word count” checked for the editor role; when I unchecked it, everything returned to normal.
Many thanks for helping to lead me to find the culprit.
Please post in that plugin’s forum about this. They should fix that.
The WP-CMS Post Control plugin has not been tested since WP4.5 and was last updated 3 years ago. I have deleted it from my WP. But sure, for what it’s worth, I’ll add a note to the support area for it.
I was a little precipitous in saying that everything was fixed. I was so thrilled to see “add media” button that I didn’t notice right away that the text/visual tabs were still missing in the posting area for the editor role.
It turns out that this is a very easy fix:
[T]here’s this silly setting in the User Profile screen. “Disable the visual editor when writing”.
Get there this way: Users => Edit (user with issue) => first option top of screen
I UNCHECKED the box, clicked save, and everything was fixed.
-Chris Eggleston, Fix Missing Visual and Text Tabs In Page/post Editor
(https://chriseggleston.com/fix-missing-visual-and-text-tabs-in-pagepost-editor/)Now I’m wondering if this wasn’t all that had to be done in the first place….
No, I’ve used the editor for years with the Visual disabled. It doesn’t affect the Add Media button.
The topic ‘add media button missing from editor’ is closed to new replies.