Support Forum » User Profile

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Fatal error with RWMB_About::redirect() #15503
    onpconpc
    Participant

    Found the issue :

    /**
         * Redirect to about page after Meta Box has been activated.
         *
         * @param string $plugin       Path to the main plugin file from plugins directory.
         * @param bool   $network_wide Whether to enable the plugin for all sites in the network
         *                             or just the current site. Multisite only. Default is false.
         */
        public function redirect( $plugin, $network_wide ) {
            if ( 'cli' !== php_sapi_name() && ! $network_wide && 'meta-box/meta-box.php' === $plugin && ! $this->is_bundled() ) {
                wp_safe_redirect( $this->get_menu_link() );
                die;
            }
        }

    $network_wide is not set to false by default
    we should have
    public function redirect( $plugin, $network_wide = false ) {

    in reply to: Fatal error with RWMB_About::redirect() #15502
    onpconpc
    Participant

    Please ! It is really urgent ! A lot of our home plugins do not work anymore !

    Here is the fatal combo :

    do_action( 'activate_plugin', trim( $plugin ) );
    update_option( 'active_plugins', $current );
    do_action( 'activate_' . trim( $plugin ) );
    do_action( 'activated_plugin', trim( $plugin) );

    The last line of the code launches add_action( 'activated_plugin', array( $this, 'redirect' ), 10, 2 ); in the init() function of the class RWMB_About

    in reply to: ℹ️Bug with checkboxes #13342
    onpconpc
    Participant

    Hi Anh,

    Thanks for your answer ! Well, I have to go deeper in my code to find what is wrong

Viewing 3 posts - 1 through 3 (of 3 total)