Problem/Motivation

After uninstalling a redundant custom install profile (which is now possible in Drupal 10.3 and above), I got this when visiting the Status report page of my site.

Drupal\Core\Extension\Exception\UnknownExtensionException: The profile does not exist. in Drupal\Core\Extension\ExtensionList->getPathname() (line 519 of core/lib/Drupal/Core/Extension/ExtensionList.php).
Drupal\Core\Extension\ExtensionList->getPath() (Line: 170)
libraries_scan_info_files() (Line: 446)
libraries_info() (Line: 550)
libraries_detect() (Line: 27)
image_widget_crop_requirements()
call_user_func_array() (Line: 416)
Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}() (Line: 395)
Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 415)
Drupal\Core\Extension\ModuleHandler->invokeAll() (Line: 109)
Drupal\system\SystemManager->listRequirements() (Line: 53)
Drupal\system\Controller\SystemInfoController->status()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 68)
Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 53)
Asm89\Stack\Cors->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 741)
Drupal\Core\DrupalKernel->handle() (Line: 19)

Steps to reproduce

Uninstall a previously used install profile. Visit the Status report page (I'd say there needs to be a module installed that reports the status of a library it utilises via the Libraries APi (for me it was the Image Widget Crop module).

Proposed resolution

Within the lbraries.module file, in the libraries_scan_info_files function, add a conditional check when `\Drupal::installProfile()` equates to `false`.

Issue fork libraries-3485329

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

jaydee1818 created an issue. See original summary.

jaydee1818’s picture

Version: 8.x-3.x-dev » 4.0.5

bryandenijs’s picture

Thanks for the patch! Worked for me.

jaydee1818’s picture

Status: Active » Reviewed & tested by the community

joseph.olstad’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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