Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Mike Manger

    (@mikemanger)

    Hi I have fixed the issue! It is because the plugin is calling ‘current_user_can’ without checking if we are on a site.

    To get round this I removed the if/else blocks on line 164 of brightcove.php to:

    if ( current_user_can('administrator') ) {

    And on line 11 of /admin/brightcove_admin.php

    if ( current_user_can('administrator') ) {

    All these do is add a message to the top if you haven’t filled out the settings page.

    I am pretty sure the require on line 19 of brightcove.php can also be removed.

    This is terrible coding IMO, global variables everywhere.. why do you even need to save this error text in a global variable?

    Thread Starter Mike Manger

    (@mikemanger)

    A bonus bug I found is that the Brightcove menu is not added if you disable the plugin and theme editor. To fix this change line 27 of brightcove_admin.php to:

    add_menu_page( __( 'Brightcove Settings' ), __( 'Brightcove' ), 'manage_options', 'brightcove_menu', 'brightcove_menu_render', WP_PLUGIN_URL . '/brightcove-video-cloud/admin/bc_icon.png' );

    nithinkumar8049

    (@nithinkumar8049)

    Hi Mike,

    I have been facing the same issue that you have described above “You do not have permissions to access this page” in multi-site environment.

    Even after I remove the current_user_can code from brightcove.php and brightcove_admin.php, I do get the same error while I try to access mysite.com/wp-admin/admin.php?page=brightcove_menu

    Removing the code from brightcove_admin helped me remove the admin notification only.

    Kindly suggest how you got rid of “You do not have permissions to access this page” issue?

    Thread Starter Mike Manger

    (@mikemanger)

    Hey, nithinkumar8049 I think they sort of got round the issue in version 1.2 of the plugin.

    The whole plugin is now wrapped in an init function (which is an awful idea but I guess it works).

    Plugin Author brightcove

    (@brightcove)

    Hello Mike and nithinkumar8049,

    The plugin does not support Multisite and it is a logged issue right now. We are sorry for this inconvenience.

    Lucas

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Plugin breaks multsite installs’ is closed to new replies.