Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • And the reason it doesn’t work is because the plugin has incorrect logic.

    In the file, includes/class-wp-statistics-helper.php:175, in function is_active_cache_plugin() instead of initialising and never using the variable $use for early exit, like using a guard clause. It should instead assume status true, then apply filter, and then early exit based on filter. Like shown below.

    From line 177

    $use = array('status' => true, 'plugin' => '');
            $use = apply_filters('wp_statistics_cache_status', $use);
            
            if (isset($use) and is_array($use) and $use['status'] === false) {
                return $use;
            }

    And then remove the last line in that function, which is never reached anyway. return apply_filters('wp_statistics_cache_status', $use);

    This is, of course, in conjunction with defining the filter in a theme’s functions.php.

    • This reply was modified 3 years, 3 months ago by darkfish.caver. Reason: Add info on required add_filter in theme functions

    I am not sure why this issue has been closed as resolved, despite users saying that the suggested solution doesn’t work. It doesn’t work for me either.

    @msykes No, it did not stop. Not only that, its blocking modal was interfering with other modals and elements, especially on mobile screens it was making our website useless.

    As a developer, I truly understand the need to promote one’s work and the developer’s prerogative to charge a subscription for premium features. However, not at the detriment of usability and becoming an obstruction for the end user.

    Also, happy to help with debugging.

    Those who are still getting inundated with this stupidity (especially that the dismiss has no meaning), if you have access to your web hosting where your wordpress files and this plugin sits, edit the following file and line.

    Go to <your wordpress install dir>/wp-content/plugins/events-manager/admin directory and edit the file em-admin.php.
    Go to line#332 or somewhere above of below it where it says:
    add_filter('admin_footer', 'EM_Admin_Modals::promo_popup');

    Edit that line and change it to: //add_filter('admin_footer', 'EM_Admin_Modals::promo_popup');

    Now when you reload your site’s admin pages, this obnoxious popup won’t appear.

    I can understand the need to promote such changes and pricing, but not in such a rude and obnoxious manner.

    To the person who disagrees, imagine having someone in your home with a big banner shoved in your face each time you move, turn, take any action. It’s not an inconvenience, it is annoying, disruptive and rude.

    Those who are still getting inundated with this stupidity (especially that the dismiss has no meaning), if you have access to your web hosting where your wordpress files and this plugin sits, edit the following file and line.

    Go to <your wordpress install dir>/wp-content/plugins/events-manager/admin directory and edit the file em-admin.php.
    Go to line#332 or somewhere above of below it where it says:
    add_filter('admin_footer', 'EM_Admin_Modals::promo_popup');

    Edit that line and change it to: //add_filter('admin_footer', 'EM_Admin_Modals::promo_popup');

    Now when you reload your site’s admin pages, this obnoxious popup won’t appear.

    I can understand the need to promote such changes and pricing, but not in such a rude and obnoxious manner.

    Those who are still getting inundated with this stupidity (especially that the dismiss has no meaning), if you have access to your web hosting where your wordpress files and this plugin sits, edit the following file and line.

    Go to <your wordpress install dir>/wp-content/plugins/events-manager/admin directory and edit the file em-admin.php.
    Go to line#332 or somewhere above of below it where it says:
    add_filter('admin_footer', 'EM_Admin_Modals::promo_popup');

    Edit that line and change it to: //add_filter('admin_footer', 'EM_Admin_Modals::promo_popup');

    Now when you reload your site’s admin pages, this obnoxious popup won’t appear.

    I can understand the need to promote such changes and pricing, but not in such a rude and obnoxious manner.

    Seconding this.

    I *think* the only issue with a multisite install would be dealing with the user roles. There might be a permissions type issue (eg what sort of things an administrator of one of the sites under a multisite install might be allowed in terms of what roles he/she can give to his users).

    I suspected that too. I too have the Librarian role missing. The only roles corresponding to this plugin are: Volunteer and Senior Aid. Also, these roles only appear to me because I am logged in as the Super User.

    According to WP Codex, creating and editing users can only be done by Super Admin.

    So if someone is logged in as a site Admin and NOT Super Admin, then I suspect those roles will not display. It still doesn’t explain why Librarian is missing, but it is of course not limiting me from Adding Patrons and such.

    Checked wp_options table for values in wp_user_roles and only the following is there.
    s:9:"senioraid";a:2:{s:4:"name";s:10:"Senior Aid";s:12:"capabilities";a:4:{s:4:"read";b:1;s:20:"view_admin_dashboard";b:1;s:17:"manage_collection";b:1;s:18:"manage_circulation";b:1;}}s:9:"volunteer";a:2:{s:4:"name";s:9:"Volunteer";s:12:"capabilities";a:3:{s:4:"read";b:1;s:20:"view_admin_dashboard";b:1;s:18:"manage_circulation";b:1;}}

    I suspect adding roles in a Multisite install might be different. Also, I did not activate the plugin Network wide. I only activated it on the primary site.

    There are lots of variables in action here, so not certain why all but one of the roles will not get added.

    While I was writing this, I did some other tests. Created another Admin user for primary site.

    This user, does not get any of the capabilities from this plugin, nor does it get assigned other roles. Hence, all it is able to do is to Edit Patron Info from under Users menu, which allows it to effectively assign itself any of the available Patron IDs. Once it’s been assigned that, it is able to edit patron info, and other menu items appear, such as holds and checkouts.

    What I also found was that manage_patrons capability is missing from the database. As I understand, a role with such cap was never created. Which explains why Librarian role is missing.

    Is this helpful in debugging?

    Brilliant! Thanks mate.
    Will your changes update existing install?

    I haven’t found any other issues so far with a multisite install. However, do note that I have been testing with the base site.
    I could spawn another child site and test it with that.

    Nevertheless, I have partially gone through the code and couldn’t find anything substantial that wouldn’t allow it to work with a multisite install.

    Thanks again.

    After debugging a fair bit in the following two files, database_code.php and WEBLIB_Patrons_Admin.php, I found that database insert was constantly failing.

    However $wpdb->last_query and other class variables weren’t really that useful in telling me the nature of the error or failure to insert.

    Anyway, that made me look into the database itself. As it happens, the reason Add Patron was failing was because of the default(!) type and size of columns are rather too restrictive and small.

    For instance, here in Australia, we have three letter codes for states. Similarly, despite the fact that telephone numbers are being formatted by putting in extra dashes, the database column itself isn’t large enough to accommodate that.

    @robertpheller: Hey mate, try adjusting the lengths of these columns and perhaps use varchar() instead of char(). This way the backend data could still be optimised for storage. However, that won’t really help with existing installs. At least it would be helpful for new install. Though I guess you could update the tables at update time. Not very good with WP plugins.

    • This reply was modified 9 years, 1 month ago by darkfish.caver. Reason: Format corrections

    I have exactly this issue and it seems like the plugin isn’t quite compatible with a multi-site installation. There is some issue with the way database is handled because it is also preventing me from creating a new Patron from Add New Patron page. I am signed in as a super-user for the multi-site.

    How can I help in providing more debug info?

Viewing 11 replies - 1 through 11 (of 11 total)