Possible bugs with Events+

I don’t know if the Events+ plugin has role limitations but came across this:

As a member who is a “Subscriber” I was not able to “Add Map” to an event I was creating.

I changed the role of the member to an “Administrator”, “Editor” and “Author” in that order and was able to “Add Map”.

I changed member to “Contributor” and “Add Map” did not work.

I am hoping that a “Subscriber” member can “Add Map” because all members registering on site are designated as subscribers.

Also, do not know if this is an Events+ issue but when I am creating a new event as a logged in “Subscriber” member I am able to choose either the administrator (there is only one designated on my site) or as the “Subscriber” member from the drop down “Author” box at bottom of page. This is a bug because only the “Subscriber” member should populate the Author box.

  • Mason
    • DEV MAN’s Sidekick

    Hiya,

    Are you using the built-in user role settings to allow subscribers to create events?

    I can confirm that subscribers are not able to create maps, however, this is due to needing additional capabilities outside of the Events plugin. I’ll ask the developer about adding a capability manager to the Maps plugin as well.

    I’d recommend grabbing another plugin to help with role management such as Members:

    http://wordpress.org/extend/plugins/members/

    Then add the default post capabilities and they should be good to go. Note, if you don’t want them to have access to posts you’ll have to hide that menu item from them.

    I don’t see the author box presented to subscribers and can’t seem to replicate that issue. Do you have any other plugins installed that affect user roles?

    Let us know. Thanks

  • 808
    • Site Builder, Child of Zeus

    Aloha Mason,

    I don't see the author box presented to subscribers and can't seem to replicate that issue. Do you have any other plugins installed that affect user roles?

    I've attached a screenshot of the author box I am referring to.

    I think what is happening is that a "Subscriber" is only allowed to manage their profile and not allowed to have any privileges to posts.

    Since an event is essentially a post and a "Subscriber" can add an event then somehow the plugin is giving the "Subscriber" admin rights and that is how the author box shows up. I came to this conclusion because when I am logged in as an admin that is the only time I see the author box.

  • 808
    • Site Builder, Child of Zeus

    I can confirm that subscribers are not able to create maps, however, this is due to needing additional capabilities outside of the Events plugin. I’ll ask the developer about adding a capability manager to the Maps plugin as well.

    Do you know how fast this can happen. I’d really like to have the “Subscriber” be able to add a map to their event without giving them other capabilities or using another plugin to do this.

    Thanks.

  • 808
    • Site Builder, Child of Zeus

    @mason I created a new role with the Members plugin you suggested. The new role is basically a contributor with the added capability to upload_files and it solved the Add Map and author box problems. Thanks for the excellent help.

  • 808
    • Site Builder, Child of Zeus

    Ah, spoke to soon but still a great suggestion. By giving the added upload_files capability the member is now able to add, edit, delete a video player I have installed on the site. I’ll repost the request above:

    I can confirm that subscribers are not able to create maps, however, this is due to needing additional capabilities outside of the Events plugin. I’ll ask the developer about adding a capability manager to the Maps plugin as well.

    Is this something that can happen in the near future? Thanks.

  • Mason
    • DEV MAN’s Sidekick

    Darn it! We’ve got a lot of moving parts here obviously.

    Ok, the best bet may be to have some kind of capabilities within the maps plugin itself (or applying the event publish settings to maps as well).

    We will take a look at this. I’ve already asked the developer about it. Please note that because this isn’t a “bug fix” per se it may take longer than a normal request to find the solution.

    As a quick fix, perhaps you could hide the video player via CSS (display:none)?

  • 808
    • Site Builder, Child of Zeus

    Thanks for looking into this. How exactly do I do the quick fix and does it only apply to the new role I created? I have no experience at all but am good at following instructions (step by step is best). Thanks.

  • Vladislav
    • Dead Eye Dev

    Hello,

    This is actually a Google Maps plugin limitation – if your subscribers don’t have media files uploading privileges and no media button strip present, the two plugins wouldn’t be able to inject the maps button. However, even without the button the entered venue address will be automatically converted to a map. Could perhaps this behavior be useful for your scenario?

  • Vladislav
    • Dead Eye Dev

    Hello,

    I was working on a possible fix for this issue today, showing a consistent map interface to all users seems like a proper way to go. This is the code that seemed to work well for me in this regard:

    function event_maps__ensure_subscribers_maps () {
    global $post;
    if (!class_exists('AgmAdminMaps')) return false;
    if (empty($post->post_type)) return false;
    if (Eab_EventModel::POST_TYPE != $post->post_type) return false;
    echo <<<EO_EVENT_MAPS_SUBSCRIBER_SCRIPT
    <script type="text/javascript">
    (function ($) {
    if ($('#media-buttons').length || $("#wp-content-media-buttons").length) return false;
    $("body").append('<div id="wp-content-media-buttons" style="display:none" />');
    })(jQuery);
    </script>
    EO_EVENT_MAPS_SUBSCRIBER_SCRIPT;
    }
    add_action('admin_footer-post-new.php', 'event_maps__ensure_subscribers_maps', 99);
    add_action('admin_footer-post.php', 'event_maps__ensure_subscribers_maps', 99);

  • Vladislav
    • Dead Eye Dev

    Hi,

    If you’ll be doing that on a regular WordPress install, you may want to paste that in your theme’s funcitons.php for the time being. On a network install, your best bet could be pasting this in a .php file in your wp-content/mu-plugins/ directory – if you’ll be doing this, please remember to add the opening “<?php” tag before the code.

  • 808
    • Site Builder, Child of Zeus

    I removed the code and updated the plugin and as a subscriber I noticed that the globe button to add a map is gone.

    I know I can enter the address and it will appear but is there a way I can edit the map (zoom in, move the marker, etc.)?

    This would be useful as there have been a few occasions that I have entered an address and it showed up wrong on the map and I had to re-position the marker. Also the ability to save a zoomed in map just makes it that much easier for the end user as that user may be looking for certain cross-streets that I as a publisher of an event can make sure is present. Thanks.

  • Mason
    • DEV MAN’s Sidekick

    You can add a zoom level when using the maps shortcode. You can set the zoom level to a number with the following guidelines:

    ‘1’ => Earth

    3′ => Continent

    ‘5’ => Region

    ‘7’ => Nearby Cities

    ’12’ => City Plan

    ’15’ => Details

    I’m not sure about manual marker placement. Maybe Ve can chime back in on that one. Thanks!

  • 808
    • Site Builder, Child of Zeus

    Thanks Mason. I went into the settings of Goggle Maps and selected Details and it gives me a zoomed in view. Don’t know how I’d move the marker if it showed the wrong location but the zoomed in portion was what I really wanted to see.

  • Mason
    • DEV MAN’s Sidekick

    Cool.

    Check your Settings>Maps and look for an area called “snapping”. If you set this to no then you should be able to move the marker around as well.

    Let me know if that sorts it for you (the setting is newer and I forgot we added it!).

    Thanks

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.