The library "commonmark" did not not specify a version. If the plugin has no version, it must be explicitly set to "0.0.0".

Created on 1 June 2023, over 1 year ago
Updated 2 June 2023, over 1 year ago

Problem/Motivation

When attempting to use the Markdown service's parser method within custom logic, I encountered the following error message.

Drupal\markdown\Exception\MissingVersionException: The library "commonmark" did not not specify a version. If the plugin has no version, it must be explicitly set to "0.0.0". in Drupal\markdown\Plugin\Markdown\InstallablePluginBase->getVersion() (line 316 of /var/www/docroot/modules/contrib/markdown/src/Plugin/Markdown/InstallablePluginBase.php).

Steps to reproduce

  • Use composer to require drupal/markdown:3.0.0-rc2 and league/commonmark:1.6.7
  • Enable markdown module
  • Execute Drush command to invoke parser and catch exception, drush php-eval "\Drupal::service('markdown')->parse('This is **BOLD**.');"
  • Observer error: The library "commonmark" did not not specify a version. If the plugin has no version, it must be explicitly set to "0.0.0".

Proposed resolution

TBD

Remaining tasks

TBD

User interface changes

TBD

API changes

TBD

Data model changes

TBD

πŸ› Bug report
Status

Closed: cannot reproduce

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jasonawant New Orleans, USA

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

Comments & Activities

Production build 0.71.5 2024