After upgrading to Drupal 10 I got a white screen with this error when editing a text format:

Error: Call to undefined function Drupal\snippet_manager\Plugin\CKEditorPlugin\drupal_get_path() in Drupal\snippet_manager\Plugin\CKEditorPlugin\Snippet->getButtons() (line 51 of modules/contrib/snippet_manager/src/Plugin/CKEditorPlugin/Snippet.php).

The solution is to replace drupal_get_path() with \Drupal::service('extension.path.resolver')->getPath().

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

eeyorr created an issue. See original summary.

keshavv’s picture

Status: Active » Needs review
keshavv’s picture

Priority: Normal » Major
Status: Needs review » Reviewed & tested by the community

There is an issue and the given MR works well.
Changing status to major as This will break the site.

kvantstudio’s picture

Thanks for the help in fixing and testing.

kvantstudio’s picture

Assigned: Unassigned » kvantstudio
Status: Reviewed & tested by the community » Fixed
kvantstudio’s picture

Status: Fixed » Closed (fixed)