Rollbar 2.1.1 isn't updated properly

Created on 4 March 2024, 12 months ago
Updated 28 March 2024, 11 months ago

Problem/Motivation

Installing Rollbar as is creates some issues:

First, it causes:
The website encountered an unexpected error. Try again later.

Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException: Circular reference detected for service "Drupal\Core\Logger\LoggerChannelFactoryInterface", path: "domino.test_users_subscriber -> domino.test_users -> logger.channel.domino -> Drupal\Core\Logger\LoggerChannelFactoryInterface -> logger.rollbar -> exception.logger". in Drupal\Component\DependencyInjection\Container->get() (line 147 of core/lib/Drupal/Component/DependencyInjection/Container.php).

Which is likely caused by cache having to be rebuild after composer install. Which isn't a regular workflow.

Then when visiting the settings form, it shows:

TypeError: implode(): Argument #1 ($pieces) must be of type array, string given in implode() (line 139 of /var/www/html/web/modules/contrib/rollbar/src/Form/RollbarSettingsForm.php).

This is caused by:
1. Incorrect rollbar_update_1001 definition, which isn't picked up by database update.
2. drush deploy command first updates the database (which fixes this), then imports configs, which overrides fixed configs with old configs. Which breaks the settings form again.

Steps to reproduce

- Have an existing and working installation of Rollbar 2.1.0
- composer require drupal/rollbar - updates Rollbar.
- drush deploy - update db.
- Visit the website and navigate to pages.

Proposed resolution

- Create a major release, because there are big changes, including to the configs. People who are using config overrides might need to revisit them.
- Rename rollbar_update_1001 to rollbar_update_10005 the install file to include "Add scrub_fields config to Rollbar."
- Trigger rebuild during update to register new logger service changes.
- Everywhere where new settings are used, provide a fallback.

🐛 Bug report
Status

Fixed

Version

2.1

Component

Code

Created by

🇰🇬Kyrgyzstan elaman

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024