Hi,
When adding the scheduled publish field to a node type I got the following error. This seems to happen if a service is expecting a LoggerChannelFactory parameter, but another module has overriden Drupal's LoggerChannelFactory. The error below happens because the redirect_404 module has decorated `logger.factory`.
It can be fixed by changing the parameter type to LoggerChannelFactoryInterface.
I've attached a patch.
TypeError: Argument 8 passed to Drupal\scheduled_publish\Plugin\Field\FieldFormatter\ScheduledPublishGenericFormatter::__construct() must be an instance of Drupal\Core\Logger\LoggerChannelFactory, instance of Drupal\redirect_404\Render\Redirect404LogSuppressor given, called in /var/www/html/docroot/modules/contrib/scheduled_publish/src/Plugin/Field/FieldFormatter/ScheduledPublishGenericFormatter.php on line 79 in Drupal\scheduled_publish\Plugin\Field\FieldFormatter\ScheduledPublishGenericFormatter->__construct() (line 55 of modules/contrib/scheduled_publish/src/Plugin/Field/FieldFormatter/ScheduledPublishGenericFormatter.php).
Thanks.
| Comment | File | Size | Author |
|---|---|---|---|
| allow_other_logging_factories.patch | 1.96 KB | andy tawse |
Comments
Comment #2
saschahannes commentedHi Andy,
thank you for your work!
I'll merge your changes as soon as possible.
Kind regards,
Sascha
Comment #4
saschahannes commentedI merged your patch and released a new version (3.3)
Comment #5
saschahannes commented