Fix Error When Using Vartheme Claro 3.0.x on Drupal 10 and CKEditor 4 libraries

Created on 18 June 2023, over 1 year ago
Updated 24 June 2023, over 1 year ago

Problem/Motivation

An error appears when using Vartheme Claro 3.0.x on Drupal 10:

Drupal\Core\Asset\Exception\InvalidLibrariesExtendSpecificationException: The specified library "claro/ckeditor-dialog" does not exist. in Drupal\Core\Asset\LibraryDiscoveryCollector->applyLibrariesExtend() (line 154 of core/lib/Drupal/Core/Asset/LibraryDiscoveryCollector.php).

Steps to reproduce

Install Vartheme claro 3.0.x on Drupal 10.

Proposed resolution

  • Remove claro/ckeditor-dialog, claro/ckeditor-editor, claro/ckeditor-admin libraries form .info.yml
  • Switch the following libraries extend to logic of code. only to work with Drupal 9 and with the CKEditor 4 ( ckeditor → ) module is enabled
    libraries-extend:
      ckeditor/drupal.ckeditor:
        - claro/ckeditor-editor
      ckeditor/drupal.ckeditor.admin:
        - claro/ckeditor-admin
      core/ckeditor:
       - claro/ckeditor-dialog
    
    When Drupal version is ~9.0 and the ckeditor module was enabled
    Extend claro/ckeditor-editor with the ckeditor/drupal.ckeditor library.
    Extend ckeditor/drupal.ckeditor.admin with the claro/ckeditor-admin library.
    Extend ckeditor/ckeditor with the claro/ckeditor-dialog library.
    Extend core/ckeditor with the claro/ckeditor-dialog library.

Mapping old core libraries and new libraries by the CKEditor 4 contrib module
https://git.drupalcode.org/project/ckeditor/-/blob/1.0.x/ckeditor.librar...

ckeditor/drupal.ckeditor => ckeditor/drupal.ckeditor
ckeditor/drupal.ckeditor.admin => ckeditor/drupal.ckeditor.admin
core/ckeditor => ckeditor/ckeditor

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ✅ Automated unit/functional testing coverage
  • âž– Developer Documentation support on feature change/addition
  • âž– User Guide Documentation support on feature change/addition
  • ✅ Accessibility and Readability
  • ✅ Code review from 1 Varbase core team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Update Release Notes and Update Helper on new feature change/addition
  • ✅ Release varbase-9.0.14 → , vartheme_claro-3.0.11 →

Varbase update type

  • ✅ No Update
  • âž– Optional Update
  • âž– Forced Update
  • âž– Forced Update if Unchanged

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

📌 Task
Status

Fixed

Version

3.0

Component

Code

Created by

🇯🇴Jordan Qusai Taha Amman

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024