Plugin could not be activated because it triggered a fatal error

Tubepress 5.1.8 is throwing a PHP Fatal error, please see blockquote below. I have tested this on 2 websites with completely different server setups.

Fatal error : Class tubepress_event_impl_tickertape_EventBase contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (tubepress_api_event_EventInterface::getDispatcher, tubepress_api_event_EventInterface::getName) in \wp-content\plugins\tubepress_pro_5_1_8\src\add-ons\event\classes\tubepress\event\impl\tickertape\EventBase.php on line 15

If the error happens during an update, it will completely lock users out of wp-admin until the plugin is manually disabled either via the database or deleting the plugin via FTP.

Activating a new install of the plugin will also throw the error, and not allow it to be activated.

For now we have rolled back to 4.2.1 with no errors.

Thanks for getting in touch, and congrats on creating the first topic in our new community! :tada:

This error indicates that some of the code from TubePress 4.2.1 is somehow getting “mixed in” with the code from TubePress 5.1.8. A few questions to help us diagnose:

  1. Are you using automatic updates? Or are you installing 5.1.8 manually?

  2. If installing manually, are you ensuring that TubePress 4.2.1 is deactivated (i.e. WP Admin > Plugins) before you activate 5.1.8? If you try to activate both versions at the same time, this error could present itself.

Let’s start there and we can decide next steps. One way or another, I’m confident we’ll get this resolved today.

Just following up. Were you able to get things working? Let us know - thanks!

Hello,

We experience the same issue, we tried deleting reinstalling and same issue with tubepress_pro_5_1_8 and tubepress_pro_5_1_5 , we use Divi theme and latest Wordpress 5.2.2 version. PHP 7.0 and 7.2 same behaviour
However issue is exactly this:

**Fatal error**  : Class tubepress_event_impl_tickertape_EventBase contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (tubepress_api_event_EventInterface::getDispatcher, tubepress_api_event_EventInterface::getName) in  **\wp-content\plugins\tubepress_pro_5_1_8\src\add-ons\event\classes\tubepress\event\impl\tickertape\EventBase.php**  on line  **15**

Please take a look into this

Update:

Same error when trying to update from tubepress_4_2_1 to tubepress_5_1_8 non-pro
Error below:

[20-Jun-2019 20:25:26 UTC] PHP Fatal error:  require(): Failed opening required '/public_html/wp-content/plugins/tubepress/src/add-ons/wordpress/classes/tubepress/wordpress/impl/listeners/wp/AdminActionsAndFilters.php' (include_path='/public_html/wp-content/plugins/backwpup/vendor/pear/archive_tar:/public_html/wp-content/plugins/backwpup/vendor/pear/console_getopt:/public_html/wp-content/plugins/backwpup/vendor/pear/http_request2:/public_html/wp-content/plugins/backwpup/vendor/pear/mail_mime:/public_html/wp-content/plugins/backwpup/vendor/pear/mail_mime-decode:/public_html/wp-content/plugins/backwpup/vendor/pear/net_url2:/public_html/wp-content/plugins/backwpup/vendor/pear/pear-core-minimal/src:/public_html/wp-content/plugins/backwpup/vendor/pear/pear_exception:.:/opt/rh/rh-php72/root/usr/share/pear:/opt/rh/rh-php72/root/usr/share/php') in /public_html/wp-content/plugins/tubepress/vendor/ehough/pulsar/src/main/php/ehough/pulsar/MapClassLoader.php on line 58
[20-Jun-2019 20:25:26 UTC] PHP Fatal error:  Class tubepress_event_impl_tickertape_EventBase contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (tubepress_api_event_EventInterface::getDispatcher, tubepress_api_event_EventInterface::getName) in /public_html/wp-content/plugins/tubepress/src/add-ons/event/classes/tubepress/event/impl/tickertape/EventBase.php on line 15
[20-Jun-2019 20:25:28 UTC] PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function tubepress_internal_boot_helper_FatalErrorHandler::onFatalError(), 0 passed in /public_html/wp-content/plugins/tubepress/src/php/classes/internal/tubepress/internal/boot/PrimaryBootstrapper.php on line 398 and exactly 2 expected in /public_html/wp-content/plugins/tubepress/src/php/classes/internal/tubepress/internal/boot/helper/FatalErrorHandler.php:14
Stack trace:
#0 /public_html/wp-content/plugins/tubepress/src/php/classes/internal/tubepress/internal/boot/PrimaryBootstrapper.php(398): tubepress_internal_boot_helper_FatalErrorHandler->onFatalError()
#1 [internal function]: tubepress_internal_boot_PrimaryBootstrapper->_handleFatalError()
#2 {main}
  thrown in /public_html/wp-content/plugins/tubepress/src/php/classes/internal/tubepress/internal/boot/helper/FatalErrorHandler.php on line 14
[20-Jun-2019 20:25:34 UTC] PHP Fatal error:  Class tubepress_event_impl_tickertape_EventBase contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (tubepress_api_event_EventInterface::getDispatcher, tubepress_api_event_EventInterface::getName) in /public_html/wp-content/plugins/tubepress/src/add-ons/event/classes/tubepress/event/impl/tickertape/EventBase.php on line 15

Based on the logs you sent, the best we can tell is that you have a corrupted/incomplete TubePress installation. If this was on our servers, here’s what we would do:

  1. Using FTP, delete any and all instances of TubePress from wp-content/plugins.

  2. Check your server’s temporary directory (usually /tmp or /var/tmp) for any leftover TubePress system caches. If you find any TubePress-related directories there, delete them.

  3. Perform a fresh installation of TubePress using FTP.

Alternatively, we’d be happy to investigate this and get things working for you. If you are willing and able, please securely send us both WordPress admin and FTP credentials. Thanks!

1 Like

Thank you for sending your FTP and WP credentials. After logging in, we discovered the BackWPup plugin was also installed on your site. There is a previously known conflict with TubePress and BackWPup, but we were able to apply the patch described below to resolve the issue. TubePress Pro 5.1.8 is now up and running on your site!

Both TubePress and BackWPup use the same specific PHP library (i.e. Symfony’s Event Dispatcher). However, they each use different versions of that library, and there are breaking changes between the two versions. We went ahead and made the following two modifications to your copy of TubePress, which allowed it to be activated on your site without issue:

  1. Edit wp-content/plugins/tubepress.../src/php/scripts/classloading/classes.php. Search for these two lines and delete or comment them out:

    function getDispatcher();
    function getName();
    

    i.e. make the above lines look like this:

    //function getDispatcher();
    //function getName();
    
  2. Edit wp-content/plugins/tubepress.../vendor/symfony/event-dispatcher/EventDispatcher.php and delete or comment out lines 42 and 43, i.e. make this:

    $event->setDispatcher($this);
    $event->setName($eventName);
    

    look like this:

    //$event->setDispatcher($this);
    //$event->setName($eventName);
    

Note for other users: If you prefer not to have to make the modifications described above, a different backup plugin can be used.