Visual Term Description Editor
[resolved] [closed] Multisite User Issues (7 posts)

  1. pixieblitz
    Posted 2 years ago #

    I installed and network-activated this plugin, as the network admin. It works great for me but an admin to a member site mentioned it's not working for her. I tried logging in as a test user on a member site used for testing purposes and it's not showing up there either. Any ideas what could be causing this?


  2. pixieblitz
    Posted 2 years ago #

    I just checked the plugin code... It's only available to users who have the "unfiltered_html" capability, but in Multisite only superadmins have that ability. ( http://codex.wordpress.org/Roles_and_Capabilities#unfiltered_html )

    I edited the plugin code so that the permission level is "publish_posts", and switched the sanitizing filters to:

    /* Remove the filters which disallow HTML in term descriptions */
    		remove_filter( 'pre_term_description', 'wp_filter_kses' );
    		add_filter( 'pre_term_description', 'wp_kses_post' );
    		remove_filter( 'term_description', 'wp_kses_data' );
    		add_filter( 'term_description', 'wp_kses_post' );

    This seems to have the effect I was going for... authors on the multisite network can use html and add images with the visual editor, but it still prevents inserting code (since I can't think of any non-malicious reason for any network users in my case to need to insert javascript or other code.)

    I'm still pretty new at this though, so if anyone notices any mistakes in the above, please let me know!

  3. Shea Bunge
    Plugin Author

    Posted 2 years ago #

    Are you proposing a change to the core plugin code?

  4. pixieblitz
    Posted 2 years ago #

    ...I guess? I mean as-is it definitely doesn't work for anyone on a multisite installation except a super-admin. I posted the question when I ran into the issue and then replied to it myself after I figured it out because I hate searching for help online and finding only old unanswered forum topics for results :P I made the edits mentioned above to the core plugin code on my site's server and it works for me and my purposes, as far as I can tell.

    I'm not sure what the best way to deal with sanitizing input would be for everyone that might want to use this plugin though... Maybe removing all filters for users with "unfiltered_html" capability but using the "wp_kses_post" filter for everyone else? That would probably be expected behavior for things added via the TinyMCE editor anyway.

    And I really don't have a lot of experience with WordPress or plugins or even coding though, (Yay for Google and copy/paste!) so I suppose I'm proposing that everyone else on the internet be extremely paranoid of any changes I suggest :P (Also, I just checked the github page. I should probably figure out what "pull" or "fork" means at some point.)

  5. Shea Bunge
    Plugin Author

    Posted 2 years ago #

    I wasn't sure if the fix you mentioned was a specific workaround to suit how your network was set up and what you wanted to do or a general fix that should be applied for everyone.

    I'll have a look at this a bit later when I have more time. Thanks for your suggestions.

    Also, if you're interested in learning about contributing on GitHub, with forks, commits and pull requests, etc, check out https://help.github.com/

  6. skarck
    Posted 2 years ago #

    I'm having the exact same issue, any news on the topic?
    Sadly, using the fix mentioned above would break updatabilility :(

  7. esmi
    Forum Moderator
    Posted 2 years ago #

    If you require assistance then, as per the Forum Welcome, please post your own topic instead of tagging onto someone else's topic.

    I am now closing this 8 month old resolved topic as it references an older version of WordPress and (probably) the plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Visual Term Description Editor
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic