Support » Plugin: Media Tags » Roles Management Errors

  • In the Role Management settings, I’m getting the following message:

    Warning: Invalid argument supplied for foreach() in mediatags_settings.php on line 395

    It repeats the same warning three times and for each role listed underneath says “No user at this level.” Admin, Editor, Author, Contributor, etc. For all of them.

    Besides that the plugin seems to work fine but I’d really like to be able to fine-tune acceess and privileges.

    http://wordpress.org/extend/plugins/media-tags/

Viewing 15 replies - 1 through 15 (of 20 total)
  • I have this error too. Can’t use that feature anyway.

    Maybe this is related to get_editable_user_ids being depreciated since 3.1?

    Plugin Author Paul Menard

    (@pmenard)

    Yes, it has been deprecated. But without an alternate solution. The function still works in WP 3.6 as long as you don’t have WP_DEBUG enabled. Still looking for an alternate.

    Any solution forthcoming? I tagged my media items specifically for role-specific access but also have “No user at this level” for every role.

    You can manually fix this problem by editing media-tags/mediatags_settings.php and replacing the calls to isset() on lines 365 and 357 with !empty(). !empty() only returns TRUE if the variable exists AND has a value, whereas isset() returns TRUE if the variable exists but has no value.

    Thanks for the suggestion but replacing isset() with !empty() as specified in mediatags_settings.php didn’t do the trick for me. I made those changes, and tried a couple additional changes in that settings file — the plugin still indicates “No users at this level” for every role.

    Plugin Author Paul Menard

    (@pmenard)

    If you are feeling adventurous you might want to yes the latest beta. The beta is really a rewrite of the core query logic to use the modern WP_Query instead of get_posts multiple times. Plus added some cleanup to the roles system.

    https://dl.dropboxusercontent.com/u/2616987/projects/wp-plugins/media-tags/media-tags-3.2-Beta1.zip

    thanks, will def. try it !

    Roles Management is working for me with the latest beta — thank you.

    The plugin is great for organizing media, but I hope I also can use it to restrict access, by role, to media items that have certain tags. Is there a way to extend roles management so certain roles have or don’t have access to items with particular media tags?

    Thanks again for all your help.

    Plugin Author Paul Menard

    (@pmenard)

    @dking64,

    Great. Thanks for reviewing the beta.

    Is there a way to extend roles management so certain roles have or don’t have access to items with particular media tags?

    Not that I’m aware of. So are you caking for restriction from the edit of the tag or viewing on the frontend?

    As far as I know this would need to be provided as part of WP core. Media-Tag tags are really just a taxonomy like post tags. So any extra functionality like that would ned to already exist as part of the taxonomy logic. Follow?

    What I’m after is restricting access on the back end.

    Let’s say I have 500 items in my Media Library, and only 100 of those items should be available to users with the role “student”; I want the other 400 to be off-limits to students. I don’t want students to even see them in the library, much less be able to edit them, add them to posts, etc. I want them locked away from student users.

    At the same time, I want students to be able to add items to the library and do whatever they want with their media items. Anything except access those 400 items to be viewable, available, editable, etc. only to users with a higher role.

    So if I had my wish, there might be a feature on the Media > Media Tags screen that, would allow me to set access permissions for any tag, like this:
    Items with this tag will be accessible to:
    __Administrator __Author __Contributor __Editor __Subscriber __[Custom role]

    I had hoped that this function is what “Roles Management” would do: set privileges for tagged media items, not just set privileges for using tags.

    Thanks again for following up so quickly.

    Plugin Author Paul Menard

    (@pmenard)

    @dking64,

    Thanks for the details. As I mentioned there is nothing in the WP infrastructure to support this. The Media-Tags roles management was just a nice screen so that I didn’t have to tell the admin to install a second roles management plugin to add/delete role capabilities. But again this is by role not specific to any taxonomy item.

    The WordPress core is supposed to be working on taxonomy meta storage. When that comes (not sure when) then will have some ability to store logic per the individual tags. http://make.wordpress.org/core/2013/07/28/potential-roadmap-for-taxonomy-meta-and-post-relationships/

    Got it. The plugin is still key to keeping our media library organized, even without role-access capability.

    Thanks for all your help!

    The beta’s working well. It’s still throwing an error because of the isset() on lines 476 of mediatags_settings.php. switching to !empty() would get rid of the error.

    Might be worth adding to the FAQ that if you have SSL enabled only for admin pages or per-content (when using a plugin like Better WordPress Security, for instance) the “Media-tags” in the Media Library’s “Bulk actions” pull-down may not have any obvious effect. This can be fixed by configuring the browser to allow “mixed content” – loading scripts via http even though the rest of the session is https (google “mixed content” and your browser version to get appropriate instructions).

    Thanks very much for the plugin, and for letting us try out the beta !

    Plugin Author Paul Menard

    (@pmenard)

    @i_leo,

    Thanks for the feedback. Will look into the issues.

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Roles Management Errors’ is closed to new replies.