- Issue created by @tonka67
- Status changed to RTBC
about 1 year ago 2:15pm 4 November 2023 - Status changed to Needs review
about 1 year ago 2:15pm 4 November 2023 That still throws:
Error: Call to undefined function drupal_get_path() in coffee_zymphonies_theme_get_slider_content() (line 176 of /code/web/themes/contrib/coffee_zymphonies_theme/coffee_zymphonies_theme.theme).
Looking at the Freelance patch, instead of this:
@@ -128,7 +128,7 @@ function coffee_zymphonies_theme_preprocess_page(&$variables) { //To get the current URL $current_url = \Drupal::request()->getRequestUri(); $current_path = explode("/", $current_url);
should it be:
$current_url = \Drupal::request()->getRequestUri(); // $current_path = explode("/", $current_url); $current_path = parse_url($current_url);
- 🇮🇳India SandeepSingh199
I think you are working on D10 & in D10
drupal_get_path()
is deprecated, So instead ofdrupal_get_path()
use\Drupal::service('extension.list.theme')->getPath('MYTHEME')
. Hi SandeepSing199,
I apply the 3399124-1.patch for the 1st issue after that 2nd issue exists and I apply the 3399124-5.patch after that it throw 2 errors
Error 1
User warning: The following theme is missing from the file system: classy in Drupal\Core\Extension\ExtensionPathResolver->getPathname() (line 63 of core/lib/Drupal/Core/Extension/ExtensionPathResolver.php). Drupal\Core\Extension\ExtensionPathResolver->getPathname('theme', 'classy') (Line: 85) Drupal\Core\Extension\ExtensionPathResolver->getPath('theme', 'classy') (Line: 127) Drupal\Core\Asset\LibraryDiscoveryParser->buildByExtension('classy') (Line: 87) Drupal\Core\Asset\LibraryDiscoveryCollector->getLibraryDefinitions('classy') (Line: 66) Drupal\Core\Asset\LibraryDiscoveryCollector->resolveCacheMiss('classy') (Line: 149) Drupal\Core\Cache\CacheCollector->get('classy') (Line: 44) Drupal\Core\Asset\LibraryDiscovery->getLibrariesByExtension('classy') (Line: 58) Drupal\Core\Asset\LibraryDiscovery->getLibraryByName('classy', 'node') (Line: 68) Drupal\Core\Asset\LibraryDependencyResolver->doGetDependencies(Array) (Line: 41) Drupal\Core\Asset\LibraryDependencyResolver->getLibrariesWithDependencies(Array) (Line: 87) Drupal\Core\Asset\LibraryDependencyResolver->getMinimalRepresentativeSubset(Array) (Line: 113) Drupal\Core\Asset\AssetResolver->getLibrariesToLoad(Object) (Line: 131) Drupal\Core\Asset\AssetResolver->getCssAssets(Object, 1, Object) (Line: 321) Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAssetLibraries(Object, Array) (Line: 165) Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAttachments(Object) (Line: 97) Drupal\big_pipe\Render\BigPipeResponseAttachmentsProcessor->processAttachments(Object) (Line: 45) Drupal\Core\EventSubscriber\HtmlResponseSubscriber->onRespond(Object, 'kernel.response', Object) call_user_func(Array, Object, 'kernel.response', Object) (Line: 111) Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.response') (Line: 214) Symfony\Component\HttpKernel\HttpKernel->filterResponse(Object, Object, 1) (Line: 202) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28) Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32) Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 106) Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85) Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36) Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51) Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Error 2
Deprecated function: dirname(): Passing null to parameter #1 ($path) of type string is deprecated in Drupal\Core\Extension\ExtensionPathResolver->getPath() (line 85 of core/lib/Drupal/Core/Extension/ExtensionPathResolver.php). Drupal\Core\Extension\ExtensionPathResolver->getPath('theme', 'classy') (Line: 127) Drupal\Core\Asset\LibraryDiscoveryParser->buildByExtension('classy') (Line: 87) Drupal\Core\Asset\LibraryDiscoveryCollector->getLibraryDefinitions('classy') (Line: 66) Drupal\Core\Asset\LibraryDiscoveryCollector->resolveCacheMiss('classy') (Line: 149) Drupal\Core\Cache\CacheCollector->get('classy') (Line: 44) Drupal\Core\Asset\LibraryDiscovery->getLibrariesByExtension('classy') (Line: 58) Drupal\Core\Asset\LibraryDiscovery->getLibraryByName('classy', 'node') (Line: 68) Drupal\Core\Asset\LibraryDependencyResolver->doGetDependencies(Array) (Line: 41) Drupal\Core\Asset\LibraryDependencyResolver->getLibrariesWithDependencies(Array) (Line: 87) Drupal\Core\Asset\LibraryDependencyResolver->getMinimalRepresentativeSubset(Array) (Line: 113) Drupal\Core\Asset\AssetResolver->getLibrariesToLoad(Object) (Line: 131) Drupal\Core\Asset\AssetResolver->getCssAssets(Object, 1, Object) (Line: 321) Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAssetLibraries(Object, Array) (Line: 165) Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAttachments(Object) (Line: 97) Drupal\big_pipe\Render\BigPipeResponseAttachmentsProcessor->processAttachments(Object) (Line: 45) Drupal\Core\EventSubscriber\HtmlResponseSubscriber->onRespond(Object, 'kernel.response', Object) call_user_func(Array, Object, 'kernel.response', Object) (Line: 111) Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.response') (Line: 214) Symfony\Component\HttpKernel\HttpKernel->filterResponse(Object, Object, 1) (Line: 202) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28) Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32) Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 106) Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85) Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36) Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51) Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)