Problem/Motivation

When attempting to enable the markdown module, the markdown module errors out. The error message is:

Uncaught PHP Exception Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException: "You have requested a non-existent service "logger.channel.markdown". Did you mean one of these: "logger.channel.form", "logger.channel.image", "logger.channel.cron"?" at /srv/sites/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php line 153

This is using composer to install commonmark and the markdown module.
drupal/markdown: 2.0.0-rc2
league/commonmark: 1.5.7
drupal/core: 8.9.13

It looks like this problem was previously reported, but was resolved. Is there a new regression with the newer versions?

Steps to reproduce

* Install commonmark and the markdown module via composer.
* Attempt to enable the markdown module

Issue fork markdown-3202876

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

inghamn created an issue. See original summary.

inghamn’s picture

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "logger.channel.markdown". Did you mean one of these: "logger.channel.image", "logger.channel.cron", "logger.channel.form"? in                     [error]
/srv/sites/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php:153
Stack trace:
#0 /srv/sites/drupal/web/modules/contrib/markdown/src/PluginManager/ParserManager.php(52): Drupal\Component\DependencyInjection\Container->get()
#1 /srv/sites/drupal/web/modules/contrib/markdown/markdown.install(59): Drupal\markdown\PluginManager\ParserManager::create()
#2 [internal function]: markdown_requirements()
#3 /srv/sites/drupal/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(392): call_user_func_array()
#4 /srv/sites/drupal/web/core/includes/install.inc(1104): Drupal\Core\Extension\ModuleHandler->invoke()
#5 /srv/sites/drupal/vendor/drush/drush/commands/pm/pm.drush.inc(1132): drupal_check_module()
#6 /srv/sites/drupal/vendor/drush/drush/includes/command.inc(422): drush_pm_enable_validate()
#7 /srv/sites/drupal/vendor/drush/drush/includes/command.inc(231): _drush_invoke_hooks()
#8 /srv/sites/drupal/vendor/drush/drush/includes/command.inc(199): drush_command()
#9 /srv/sites/drupal/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch()
#10 /srv/sites/drupal/vendor/drush/drush/includes/preflight.inc(67): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#11 /srv/sites/drupal/vendor/drush/drush/drush.php(12): drush_main()
#12 {main}
inghamn’s picture

Issue summary: View changes
shin.cho’s picture

same problem

jaydip makawana’s picture

facing the same problem

jaydip makawana’s picture

Priority: Normal » Critical
movemaine’s picture

Facing the same issue:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "logger.channel.markdown". Did you mean one of these: "logger.channel.form", "logger.channel.image", "logger.channel.cron"? in Drupal\Component\DependencyInjection\Container->get() (line 153 of /apps/myapps/html/test/drupal/core/lib/Drupal/Component/DependencyInjection/Container.php).

I get the error whether I install through the GUI or composer.

movemaine’s picture

To add more detail (but unsure if related), if I try and install through composer I get the following error:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - drupal/markdown 1.3.0 requires league/commonmark ^0.18.3 -> satisfiable by league/commonmark[0.18.3, 0.18.4, 0.18.5] but these conflict with your requirements or minimum-stability.
    - drupal/markdown 1.x-dev requires league/commonmark ^0.18.3 -> satisfiable by league/commonmark[0.18.3, 0.18.4, 0.18.5] but these conflict with your requirements or minimum-stability.
    - Installation request for drupal/markdown ^1.3 -> satisfiable by drupal/markdown[1.x-dev, 1.3.0].

But commonmark is installed:
league/commonmark 1.5.8 Highly-extensible PHP Markdown parser which f...

And my minimum stability is `dev`

finabluma’s picture

Hi, there! I can not install the module ... I am receiving the following error ...I

In Container.php line 153:
                                                                               
  You have requested a non-existent service "logger.channel.markdown". Did yo  
  u mean one of these: "logger.channel.image", "logger.channel.cron", "logger  
  .channel.form", "logger.channel.graphql"?   
gloomcheng’s picture

Facing the same issue

grevil’s picture

Ok I found at least a workaround and perhaps a good start to resolve the issue:

The problem is within markdown.install file. If you comment out the whole file, you can install the plugin. I guess the "logger.channel.markdown" is used in install, but is not yet "bootstrapped", but I'm not deep enough in that process.

Does anyone have an idea and can create an issue fork with a solution?

adrianm6254’s picture

Any movement on this?

I get the same issue:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "logger.channel.markdown". Did you mean one of these: "logger.channel.image", "logger.channel.cron", "logger.channel.form", [error]
"logger.channel.webform"? in /app/web/core/lib/Drupal/Component/DependencyInjection/Container.php:153

eelkeblok’s picture

The current merge request for #3103679: [PP-1][markdown] Drupal 9 Support contains this commit: https://git.drupalcode.org/project/markdown/-/merge_requests/11/diffs?co.... Seems like that is an issue in and of itself, and not exclusive to Drupal 9.

eelkeblok’s picture

Status: Active » Needs review

I created a merge request containing basically the change from the mentioned commit, except that was built on a change that replaces some logic in the HttpClientTrait that I don't think we need here. Did not actually test this.

If this ends up getting merged, please credit mradcliffe (Matthew Radcliffe ) since they authored that commit.

djassie made their first commit to this issue’s fork.

joelpittet made their first commit to this issue’s fork.

joelpittet’s picture

Status: Needs review » Fixed
joelpittet’s picture

  • joelpittet committed 5516549 on 8.x-2.x authored by mradcliffe
    Issue #3202876 by eelkeblok, djassie, mradcliffe: Installation error:...
joelpittet’s picture

Thanks @mradcliffe and @elkeblok, this was added in 2.x and 3.x (through the other issue)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.