Opened 13 years ago
Closed 13 years ago
#19005 closed defect (bug) (invalid)
Only super-admins can add-media via the wp_editor when called on the front end.
Reported by: | anointed | Owned by: | azaozz |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.3 |
Component: | Multisite | Keywords: | |
Focuses: | Cc: |
Description
Setup:
use wp_editor() on the front-end of a website.
I as a super-admin in a multisite setup am the only one able to add images to the post and have them actually show up. Every other user cap sees the following behavior.
- click add image to editor
- image shows up in editor when clicking add to post
- publish post, no image shows up.
If I do the same thing as a super-admin, then images added to the editor show up just fine when the post is published.
Change History (10)
#3
follow-up:
↓ 4
@
13 years ago
- Milestone changed from Awaiting Review to 3.3
Moving to 3.3 milestone so it doesn't get lost.
#4
in reply to:
↑ 3
@
13 years ago
So basically the bug is that kses removed some tags for users without 'unfiltered_html' cap when post is published from the front end?
#5
follow-up:
↓ 6
@
13 years ago
Yes, a user can indeed see the upload button, and when an image/file is inserted into the editor it shows up in the editor, until you click submit, then images are removed.
*well on ipad, the user doesn't see the image as you can't see the visual editor no matter the user level (bug). However on regular computers you can see visual editor, and the image shows up until submit.
#6
in reply to:
↑ 5
@
13 years ago
Replying to anointed:
*well on ipad, the user doesn't see the image as you can't see the visual editor
Need to update your iPad to iOS5 to be able to use the visual editor.
#8
follow-up:
↓ 9
@
13 years ago
by using add_filter('user_can_richedit', 'return_true')
I am able to let regular admins add media to the post on the front-end.
Even with the above 'global', regular users do not see the upload media button. Is there another simple option I can add to the functions to specify which additional groups can upload attachments?
*bbpress creates new user groups forum_moderator, and forum_participant, which cannot upload.
#9
in reply to:
↑ 8
@
13 years ago
Replying to anointed:
by using
add_filter('user_can_richedit', '__return_true')
I am able to let regular admins add media to the post on the front-end.
This seems to be affected by something else. Function the_editor()
that adds all the HTML including the Upload Media button looks at user_can_richedit
before outputting it, so the users have that capability when on the front-end. Perhaps look at the other limitations.
#10
@
13 years ago
- Milestone 3.3 deleted
- Resolution set to invalid
- Status changed from assigned to closed
Looked more into this, seems to be the expected behavior for multisite/network. You'll have to check user permissions and set/reset them when capturing user input from the front-end and saving the post.
The new editor API lets you add an editor anywhere but doesn't handle the submitted data from it. That needs to be done by the plugin.
Thank you Scribu!
Here is related forum thread, not sure if I was supposed to create tickets for each independent 'bug' or just one ticket. Kinda new to trac..
http://wordpress.org/support/topic/wp_editor-api-a-few-observations
http://wordpress.org/support/topic/33-fluid-admin-sidebar-is-colliding-with-editor