Skip to:
Content
Pages
Categories
Search
Top
Bottom

Only keymaster gets WYSIWYG pane of post editor – bbPress 2.2.4, WP 3.5.1

  • @moonoi

    Participant

    After upgrading to 2.2.4, only the “keymaster” role gets the normal fancy post editor with a choice between WYSIWYG view and source code view.

    Normal “participant” users only get the source code view (exactly like in this support forum). There’s the row of helper buttons to insert code, but you can’t switch to the WYSIWYG view.

    I checked that there are no JS errors. (This is usually what prevents the tabs for switching to show up).

    I figure it must have something to do with the capabilities of the forum roles, but I don’t know how I would be able to view or change these. I use the Members plugin to edit roles and caps for the rest of WP.

Viewing 4 replies - 1 through 4 (of 4 total)
  • @moonoi

    Participant

    I also just discovered that this is related to another problem I have:

    Only the keymaster can upload files in the new media manager screen. If a “participant” tries to upload, it just returns the standard “Error – try again later” message.

    @moonoi

    Participant

    Ok, so I fixed half of this problem. Turns out that somewhere, someone has made the bbP function that checks if the wp_editor should be used return false, if the user is not “keymaster”.

    Since I have no idea where or why this happens, I’ve overridden it by inserting this in my theme (maybe someone else has the same problem):
    `
    add_filter(‘bbp_use_wp_editor’, ‘ml_allow_wp_editor’, 1000, 2);
    function ml_allow_wp_editor($value, $default) {
    return true;
    }
    `

    The “participant” users still get an error, when they try to upload a file. I hope someone who knows the inner workings of bbP can help.

    Thanks!

    @jaredatch

    Member

    It’s a bit more complicated than a filter toggle I believe.

    Check out https://codex.wordpress.org/Roles_and_Capabilities

    By default only Author roles and above have the ability to upload files, and that’s for security reasons so that’s probably a good thing.

    You can tweak your roles to change the ability to upload files, but at the moment it’s a little messy. Another issue is if you want to let all your users upload files.

    If you are just looking for images there is a bbPress attachment plugin in the .org repo that can handle that without having to mess with all the user stuff.

    @moonoi

    Participant

    For my own purpose I need to let all registered users upload images directly into posts in the forum. So the attachments plugin isn’t an attractive solution for me. Especially not after the new media manager made uploading such a breeze.

    The Author role is a WP role and not a bbPress role right? I manage WP roles with the Members plugin, but I assume the problem can’t be related to which WP role the user has, because only switching the bbPress role (“participant” -> “keymaster”) fixes the problem. Meaning that no changes in core WP capabilities or roles were needed.

    Anyway, I’ll try to tweak the bbPress roles to debug this problem and made this thread about that (Weird behaviour modifying bbp_get_caps_for_role() in core/capabilities.php).

    Thanks for helping out!

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