Viewing 4 replies - 1 through 4 (of 4 total)
  • Which podPress version have you tried?

    I have looked into this problem resp. the podpress_class.php file.

    In this part of the code podPress tries to add a new capability to the Administrator role (in v8.8 as well as in v8.8.4). Before it adds the capability, podPress tries to get the capabilities of the role (get_role) and checks whether the role has already this capability (has_cap) or not.

    The error message indicates that it was not possible to retrieve the role information for the role “Administrator”.
    But I’m not sure why that is a problem.

    get_role and has_cap are both procedures of WordPress and usually it should not be a problem to use them.

    But there a lot of filters for these procedure which plugin authors can use in their plugins e.g. if they want to influence the content of the role object.
    Maybe the problem is caused by another plugin.

    Did you have the possibility to deactivate your other plugins before your activate podPress?
    That might be the solution because I believe that these procedure calls of podPress happen only during the plugins activation.

    If you don’t have the possibility to test that yourself then you could post the names of other plugins here and I will help testing. (If you have many plugins try to narrow the choice down. It is probably a plugin which has something to do with user rights, passwords, content which should only be visible to a special user group or something like that.)

    Another possibility might be that some files of the WP core are corrupted (maybe during the FTP transfer.) (Like in this case) If that is the case then a possible solution might be removing and renewing the files of /wp-includes and /wp-admin.

    Regards,
    Tim

    Thread Starter Steve Wells

    (@srwells)

    Thanks for the reply. I tried deactivating all other plugins but that didn’t work. I just commented out those lines of code and it activated fine. Everything seems to be working now. Thanks for your help

    Since you are not afraid of changing some lines of the source code, could you try these lines?:

    if(function_exists('get_role')) {
    				$ps_role =& get_role('premium_subscriber');
    				if(Null !== $ps_role) {
    					add_role('premium_subscriber', 'Premium Subscriber', $caps);
    					$ps_role = get_role('premium_subscriber');
    				}
    				$ps_role =& get_role('premium_subscriber');
    				if(Null !== $ps_role AND !$ps_role->has_cap('premium_content')) {
    					$ps_role->add_cap('premium_content');
    				}
    				if(Null !== $ps_role AND !$ps_role->has_cap('read')) {
    					$ps_role->add_cap('read');
    				}
    				$role =& get_role('administrator');
    				if(Null !== $role AND !$role->has_cap('premium_content')) {
    					$role->add_cap('premium_content');
    				}
    			}

    I have modified the lines a little bit and it should be possible to activate the plugin with them. And if it works for you, I will probably write a patch for podPress.

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

The topic ‘[Plugin: podPress] Fatal error preventing activation’ is closed to new replies.