@see https://www.drupal.org/node/3099614

Here are the classes and hooks that need to be reworked

  • \Drupal\webform\WebformLibrariesManager::requirements
  • webform_library_info_alter()

Adding \Drupal\webform\WebformLibrariesManager::installed(array $library) should solve most of the problems and can address compatibility with Drupal 8.8.x.

Manual testing

  • Delete a library from /libraries
  • Move a library to /sites/default/libraries
  • Clear cache
  • Confirm Status report recognizes the missing library
  • Confirm Status report recognizes the moved library
  • Confirm the moved library loads correctly
  • Confirm the deleted library uses the CDN URL

Comments

jrockowitz created an issue. See original summary.

jrockowitz’s picture

Status: Active » Postponed
jrockowitz’s picture

Status: Postponed » Needs work

The test for this is very simple... move all the webform external dependencies from /libraries to /sites/default/libraries and all the code in WebformLibraries manager continues to work as expected.

jrockowitz’s picture

Issue summary: View changes
jrockowitz’s picture

Since we are currently not support the libraries.module the code would be something like

if (\Drupal::hasService('library.libraries_directory_file_finder')) {
  return \Drupal::service('library.libraries_directory_file_finder')->find($library_name) ? TRUE : FALSE;
}
else {
  return file_exists(DRUPAL_ROOT . '/libraries/' . $library_name);
}
jrockowitz’s picture

Version: 8.x-5.x-dev » 6.x-dev
jrockowitz’s picture

Version: 6.x-dev » 8.x-5.x-dev
jrockowitz’s picture

StatusFileSize
new14.05 KB

Eventhough this patch is for 8.x-5.x, I think it might be for only 6.x because the new 'directory' property is required for external libraries for CDN support to work as expected.

jrockowitz’s picture

Version: 8.x-5.x-dev » 6.x-dev
jrockowitz’s picture

StatusFileSize
new14.05 KB
jrockowitz’s picture

Issue summary: View changes
jrockowitz’s picture

Status: Needs work » Needs review
StatusFileSize
new14.29 KB

  • jrockowitz authored d1949df on 6.x
    Issue #3117404 by jrockowitz: [Drupal 8.9.x] Support for third party...
jrockowitz’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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