# Fatal Error when activating

**URL:** <https://community.podlove.org/t/fatal-error-when-activating/3375>\
**Category:** Podlove Publisher\
**Created:** [October 10, 2024, 5:05pm UTC](https://community.podlove.org/t/fatal-error-when-activating/3375 "2024-10-10T17:05:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![csccpud](https://community.podlove.org/user_avatar/community.podlove.org/csccpud/32/2102_2.png) [@csccpud](https://community.podlove.org/u/csccpud)\
**Post date:** [October 10, 2024, 5:05pm UTC](https://community.podlove.org/t/fatal-error-when-activating/3375/1 "2024-10-10T17:05:29Z")

</div>

I cannot activate the plugin without a “Fatal Error” happening. I have WP debugging enabled and it’s pointing to an issue with adding roles/capabilities. I have a membership plugin for adding additional roles and a child theme on Genesis. I’ve disabled to plugin and tried a different theme to no avail.

here’s the error in the debug.log

```auto
[07-Oct-2024 17:28:33 UTC] WordPress database error Duplicate key name 'accessed_at' for query CREATE INDEX accessed_at ON wp_podlove_downloadintentclean (accessed_at) made by activate_plugin, do_action('activate_podlove-podcasting-plugin-for-wordpress/podlove.php'), WP_Hook->do_action, WP_Hook->apply_filters, Podlove\activate, Podlove\activate_for_current_blog, podlove_setup_database_tables, Podlove\Model\DownloadIntentClean::build
[07-Oct-2024 17:28:33 UTC] PHP Fatal error: Uncaught Error: Call to a member function add_cap() on null in /bitnami/wordpress/wp-content/plugins/podlove-podcasting-plugin-for-wordpress/includes/capabilities.php:30
Stack trace:
#0 /bitnami/wordpress/wp-content/plugins/podlove-podcasting-plugin-for-wordpress/includes/capabilities.php(15): podlove_add_capability_to_roles()
#1 /bitnami/wordpress/wp-content/plugins/podlove-podcasting-plugin-for-wordpress/plugin.php(14): podlove_init_capabilities()
#2 /bitnami/wordpress/wp-content/plugins/podlove-podcasting-plugin-for-wordpress/plugin.php(85): Podlove\activate_for_current_blog()
#3 /opt/bitnami/wordpress/wp-includes/class-wp-hook.php(324): Podlove\activate()
#4 /opt/bitnami/wordpress/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#5 /opt/bitnami/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action()
#6 /opt/bitnami/wordpress/wp-admin/includes/plugin.php(703): do_action()
#7 /opt/bitnami/wordpress/wp-admin/plugins.php(60): activate_plugin()
#8 {main}
  thrown in /bitnami/wordpress/wp-content/plugins/podlove-podcasting-plugin-for-wordpress/includes/capabilities.php on line 30

```

---

<div class="post-metadata">

**Author:** ![ericteubert](https://community.podlove.org/user_avatar/community.podlove.org/ericteubert/32/1568_2.png) [@ericteubert](https://community.podlove.org/u/ericteubert)\
**Post date:** [October 10, 2024, 6:40pm UTC](https://community.podlove.org/t/fatal-error-when-activating/3375/2 "2024-10-10T18:40:19Z")

</div>

Does this plugin also allow renaming or deleting roles? Because that is a scenario I had not planned for. The code assumes there to be the following roles: ‘administrator’, ‘editor’, ‘author’.

---

<div class="post-metadata">

**Author:** ![csccpud](https://community.podlove.org/user_avatar/community.podlove.org/csccpud/32/2102_2.png) [@csccpud](https://community.podlove.org/u/csccpud)\
**Post date:** [October 10, 2024, 7:00pm UTC](https://community.podlove.org/t/fatal-error-when-activating/3375/3 "2024-10-10T19:00:25Z")

</div>

The Members plugin does have the capability to create, modify, and rename certain roles. But even in disabling the members plugin (and all plugins for htat matter), Podlove won’t activate.

Here’s the plugin I’m currently using: [Members – Membership & User Role Editor Plugin – WordPress plugin | WordPress.org](https://wordpress.org/plugins/members/)

---

<div class="post-metadata">

**Author:** ![ericteubert](https://community.podlove.org/user_avatar/community.podlove.org/ericteubert/32/1568_2.png) [@ericteubert](https://community.podlove.org/u/ericteubert)\
**Post date:** [October 11, 2024, 9:09pm UTC](https://community.podlove.org/t/fatal-error-when-activating/3375/4 "2024-10-11T21:09:29Z")

</div>

The changes you make with the role editor persist even if you disable it, because it changes WordPress core data.

I created an issue [do not assumes all default roles exist · Issue #1517 · podlove/podlove-publisher · GitHub](https://github.com/podlove/podlove-publisher/issues/1517)

As a workaround, you need to edit a plugin file: `includes/capabilities.php` in the Publisher plugin, and comment out line 30, like this:

```php
        // get_role($role)->add_cap($capability);

```
