Overview

\Drupal\experience_builder\Hook\LibraryHooks::libraryInfoBuild assumes all libraries have `css` key. The extensions library does not.

# Warning: Undefined array key "css" in Drupal\experience_builder\Hook\LibraryHooks->libraryInfoBuild() (line 124 of modules/contrib/experience_builder/src/Hook/LibraryHooks.php).

    foreach ($libraries as $library_name => &$library) {
      foreach ($libraries[$library_name]['css'] as $files) {
        foreach ($files as $filename => $file_definition) {

Proposed resolution

I think \Drupal\experience_builder\Hook\LibraryHooks::buildExtensionLibraries needs to add css

    if (!empty($xb_extensions)) {
      $libraries['extensions'] = [
        'dependencies' => $xb_extensions,
        'css' => []
      ];
    }

Or the other code cannot assume css

User interface changes

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

mglaman created an issue. See original summary.

penyaskito’s picture

Component: Page builder » Extensions API
Status: Active » Reviewed & tested by the community

LGTM

wim leers’s picture

Title: LibraryHooks::libraryInfoBuild assumes all libraries have css » LibraryHooks::libraryInfoBuild() assumes all libraries have CSS
Component: Extensions API » Page builder
Priority: Normal » Minor

  • wim leers committed c2fab7a6 on 0.x authored by mglaman
    Issue #3530585 by mglaman, penyaskito: LibraryHooks::libraryInfoBuild()...
wim leers’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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