Drupal10 - undefined function drupal_get_path()

Created on 28 July 2023, over 1 year ago
Updated 31 July 2023, over 1 year ago

Call to undefined function drupal_get_path() in improvements_page_attachments() (line 172 of modules/contrib/improvements/improvements.module)

FIX:

  $theme = \Drupal::config('system.theme')->get('default');
  $path = \Drupal::service('extension.path.resolver')->getPath('theme', $theme);
  $page['#attached']['drupalSettings']['path']['defaultThemePath'] = $path;
🐛 Bug report
Status

Needs review

Version

2.1

Component

Code

Created by

🇷🇺Russia APolitsin

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

Comments & Activities

  • Issue created by @APolitsin
  • First commit to issue fork.
  • 🇷🇺Russia APolitsin

    Вот ещё про drupal10 в этом модуле

    Twig\Error\SyntaxError: Unknown "spaceless" tag. in Twig\Parser->subparse() (line 15 of modules/contrib/improvements/templates/select.html.twig).
    Twig\Parser->parse(Object) (Line: 491)
    Twig\Environment->parse(Object) (Line: 519)
    Twig\Environment->compileSource(Object) (Line: 132)
    Drupal\Core\Template\TwigEnvironment->compileSource(Object) (Line: 351)
    Twig\Environment->loadTemplate('__TwigTemplate_41608c58a2b069ed43068b1916686f5b', 'modules/contrib/improvements/templates/select.html.twig') (Line: 312)
    Twig\Environment->load('modules/contrib/improvements/templates/select.html.twig') (Line: 53)
    twig_render_template('modules/contrib/improvements/templates/select.html.twig', Array) (Line: 372)
    Drupal\Core\Theme\ThemeManager->render('select', Array) (Line: 422)
    
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India rushiraval

    It seems that said change is done 2.x. but not in 2.1.0. Developer Please review this and update it accordingly or release new version. Also Please delete the fork https://git.drupalcode.org/issue/improvements-3377710/-/tree/3377710-dru.... because said change is already done in main branch. Both Screen shot attached herewith.

Production build 0.71.5 2024