WordPress.org

Ready to get started?Download WordPress

Forums

Media Tags
Roles Management Errors (21 posts)

  1. cyphog
    Member
    Posted 1 year ago #

    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/

  2. master412160
    Member
    Posted 9 months ago #

    I have this error too. Can't use that feature anyway.

  3. z.green
    Member
    Posted 7 months ago #

    Maybe this is related to get_editable_user_ids being depreciated since 3.1?

  4. pmenard
    Member
    Plugin Author

    Posted 7 months ago #

    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.

  5. dking64
    Member
    Posted 5 months ago #

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

  6. i_leo
    Member
    Posted 2 months ago #

    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.

  7. dking64
    Member
    Posted 2 months ago #

    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.

  8. pmenard
    Member
    Plugin Author

    Posted 2 months ago #

    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

  9. i_leo
    Member
    Posted 2 months ago #

    thanks, will def. try it !

  10. dking64
    Member
    Posted 2 months ago #

    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.

  11. pmenard
    Member
    Plugin Author

    Posted 2 months ago #

    @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?

  12. dking64
    Member
    Posted 2 months ago #

    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.

  13. pmenard
    Member
    Plugin Author

    Posted 2 months ago #

    @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/

  14. dking64
    Member
    Posted 2 months ago #

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

    Thanks for all your help!

  15. i_leo
    Member
    Posted 2 months ago #

    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 !

  16. pmenard
    Member
    Plugin Author

    Posted 2 months ago #

    @i_leo,

    Thanks for the feedback. Will look into the issues.

  17. dking64
    Member
    Posted 2 months ago #

    Paul: I noticed a very minor glitch in beta, in Roles Management: when switching from role to role the information regarding permissions displayed correctly -- it would change according to the selected role. But the heading above the permissions options was stuck -- it displayed the name of the same role, even though I was moving from role to role.

    You may be on top of this already, but I thought I'd pass it on since it was the glitch I noticed.

  18. pmenard
    Member
    Plugin Author

    Posted 2 months ago #

    New Media-Tags 3.2 Beta 4

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

    Corrected issues on mediatags_settings.php when user role is empty. Also correct loading asset URLs when under SSL. Thanks @i_leo on both issues.

    @dking64,

    I'm not sure I can reproduce the issue you reported. Then again on my own development site the number of users is 1-3 in each role group. I'm not seeing any issue when switching roles. Can you provide more details? Will be glad to look into further.

  19. dking64
    Member
    Posted 2 months ago #

    Below is a link to screen captures to show you how, in beta, 3.2-Beta1, the heading doesn't change on the Roles Management screen as I move from role to role.

    Note that the role that displays in the heading that doesn't change -- "Student" -- is a custom role. So perhaps the bug shows up only if you have a custom role.

    http://limpetsmonitoring.org/img/media-tags.png

  20. pmenard
    Member
    Plugin Author

    Posted 2 months ago #

    @dking64,

    Fixed in new Beta6. Though I could not decided to fixe it or remove it. Since the tab is the Role. It was just a hiccup on the role name output. Nothing at all to do with custom roles or such.

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

  21. dking64
    Member
    Posted 2 months ago #

    Great. Just downloaded beta6. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.