Problem/Motivation

After updating rate module from 3.3.0-rc1 to 3.3.0 using composer for Drupal 10.6.x/php8.4.x caused any drush commands used after to throw an error:

Circular reference detected for service "Drupal\Core\Logger\LoggerChannelFactoryInterface", path: "advancedqueue.processor -> Drupal\Core\Logger\LoggerChannelFactoryInterface -> Drupal\rate\Hook\RateHooks -> rate.vote_widget_base -> entity.form_builder -> form_builder -> form_validator -> logger.channel.form -> Drupal\Core\Logger\LoggerChannelFactoryInterface".

I've included a small patch for anyone else this may affect. The problem is caused by the rate module utilizing Drupal’s modern Object-Oriented Hook system (RateHooks), which attempts to load a core form builder service that triggers early logger factory initialization.

The patch removes plugin service RateWidgetBase from the __construct function and then lazy loads it where it was required using the actual service name rate.vote_widget_base in:

#[Hook('entity_view')] // original line: 187
CommentFileSizeAuthor
rate-hook-class-circular-ref.patch977 bytessidgrafix

Comments

sidgrafix created an issue. See original summary.

ivnish’s picture

Status: Active » Closed (cannot reproduce)

3.3.0-rc1 to 3.3.0 are the same.

Looks like advancedqueue module problem, not Rate. They already tried to fix that https://git.drupalcode.org/project/advancedqueue/-/commit/941a7faee98dbc...

Also I installed the latest advancedqueue and Rate and I can't reproduce this

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.