rollbar / rollbar-php-wordpress

Official WordPress plugin from Rollbar, Inc.
https://rollbar.com/
GNU General Public License v2.0
15 stars 20 forks source link

Call to undefined method Rollbar\Defaults::accessToken() - when activating v2.4.8 #69

Closed rkaiser0324 closed 5 years ago

rkaiser0324 commented 5 years ago

I get the following stacktrace upon activation of the plugin, using the commit tagged 2.4.8:

( ! ) Fatal error: Uncaught Error: Call to undefined method Rollbar\Defaults::accessToken() in /media/sf_shared/project/lifesavers/dev.lifesavers.project.com/WordPress/wp-content/plugins/rollbar-php-wordpress/src/Plugin.php on line 390
( ! ) Error: Call to undefined method Rollbar\Defaults::accessToken() in /media/sf_shared/project/lifesavers/dev.lifesavers.project.com/WordPress/wp-content/plugins/rollbar-php-wordpress/src/Plugin.php on line 390
NUM Time    Memory  Function    Location
1   0.2093  482496  {main}( )   .../plugins.php:0
2   0.2479  529664  require_once( '/media/sf_shared/project/lifesavers/dev.lifesavers.project.com/WordPress/wp-admin/admin.php' )   .../plugins.php:10
3   0.2505  542288  require_once( '/media/sf_shared/project/lifesavers/dev.lifesavers.project.com/WordPress/wp-load.php' )  .../admin.php:31
4   0.2539  555872  require_once( '/media/sf_shared/project/lifesavers/dev.lifesavers.project.com/WordPress/wp-config.php' )    .../wp-load.php:37
5   0.2572  641032  require_once( '/media/sf_shared/project/lifesavers/dev.lifesavers.project.com/WordPress/wp-settings.php' )  .../wp-config.php:122
6   9.9542  68394920    do_action( )    .../wp-settings.php:450
7   9.9542  68395296    WP_Hook->do_action( )   .../plugin.php:453
8   9.9542  68395296    WP_Hook->apply_filters( )   .../class-wp-hook.php:310
9   10.4476 78655608    Rollbar\Wordpress\Plugin->initPhpLogging( ) .../class-wp-hook.php:286
10  10.4477 78655608    Rollbar\Wordpress\Plugin->fetchSettings( )  .../Plugin.php:234
11  10.4558 78760392    Rollbar\Wordpress\Plugin->getDefaultOption( )   .../Plugin.php:88

This is installed via composer update at my root project level. I did not run composer update within the plugins/popup-maker directory as well, since the vendor/ folder was already checked in.

If I downgrade to 2.4.7 it's fine.

(edited formatting and added clarification)

ErnieAtLYD commented 5 years ago

Note that downgrading to 2.4.7 for me via composer install gives me a similar error:

[23-Jan-2019 01:48:02 UTC] PHP Fatal error:  Uncaught Error: Call to undefined method Rollbar\Defaults::accessToken() in /srv/www/wbu/public_html/wp-content/plugins/rollbar/src/Plugin.php:390
Stack trace:
#0 /srv/www/wbu/public_html/wp-content/plugins/rollbar/src/Plugin.php(88): Rollbar\Wordpress\Plugin->getDefaultOption('access_token')
#1 /srv/www/wbu/public_html/wp-content/plugins/rollbar/src/Plugin.php(234): Rollbar\Wordpress\Plugin->fetchSettings()
#2 /srv/www/wbu/public_html/wp-includes/class-wp-hook.php(286): Rollbar\Wordpress\Plugin->initPhpLogging('')
#3 /srv/www/wbu/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#4 /srv/www/wbu/public_html/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#5 /srv/www/wbu/public_html/wp-settings.php(450): do_action('init')
#6 /srv/www/wbu/public_html/wp-config.php(94): require_once('/srv/www/wbu/pu...')
#7 /srv/www/wbu/public_html/wp-load.php(37): require_once('/srv/www/wbu/pu...')
#8 /srv/www/wbu/public_html/wp-admin/admin.php(31): require_once('/srv/www/wbu/pu...')
#9  in /srv/www/wbu/public_html/wp-content/plugins/rollbar/src/Plugin.php on line 390
ArturMoczulski commented 5 years ago

@rkaiser0324 thanks for catching this. The problem should be solved in the latest release v2.4.9. Please upgrade your plugin.