Configuration:
Drupal 10.0.9
Webserver Apache/2.4.57 (Ubuntu)
PHP 8.2.7
Database 8.0.33-0ubuntu0.22.04.2
Manage Display
When using admin/structure/types/manage/some content type/display and using next format settings for colorbox there is no problem:
Image style for content = some style
Image style for first image in content =crop&scale300x300
Image style for Colorbox = original image
Gallery =per post gallery
Caption = automatic
Field formatter class = some class
However with same settings and using Drupal core Layout Builder Colorbox is not working.
Steps
Warning: file_get_contents(libraries/colorbox/jquery.colorbox-min.js): Failed to open stream: No such file or directory in Drupal\Core\Asset\JsCollectionOptimizerLazy->optimizeGroup() (line 188 of core/lib/Drupal/Core/Asset/JsCollectionOptimizerLazy.php).
Drupal\Core\Asset\JsCollectionOptimizerLazy->optimizeGroup(Array) (Line: 174)
Drupal\system\Controller\AssetControllerBase->deliver(Object, 'js__SMWu8PFzPyoiC5-kCunAveJbIn4COxWMQubGTIhKOg.js')
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 583)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 166)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 74)
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: 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: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
core/modules/locale/locale.module).
_locale_parse_js_file('libraries/colorbox/jquery.colorbox-min.js') (Line: 529)
locale_js_translate(Array, Object) (Line: 485)
locale_js_alter(Array, Object, Object) (Line: 545)
Drupal\Core\Extension\ModuleHandler->alter('js', Array, Object, Object) (Line: 272)
Drupal\Core\Asset\AssetResolver->getJsAssets(Object, 1, Object) (Line: 325)
Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAssetLibraries(Object, Array) (Line: 164)
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: 199)
Symfony\Component\HttpKernel\HttpKernel->filterResponse(Object, Object, 1) (Line: 187)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 74)
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: 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: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
and colorbox is not working as expected.
Closed: cannot reproduce
2.0
Code