Fatal error on enabling ckeditor5_plugin_pack_templates

Created on 10 May 2024, 6 months ago
Updated 28 June 2024, 5 months ago

Problem/Motivation

I've been attempting to test the templates feature. After enabling ckeditor5_plugin_pack_templates, I get a fatal error if I visit any text format configuration that has ckeditor 5 enabled, specifically:

Error: Unknown named parameter $productivity_pack in Drupal\ckeditor5\Attribute\CKEditor5Plugin->__construct() (line 94 of core/modules/ckeditor5/src/Attribute/CKEditor5Plugin.php).

(full trace attached)

I'm using a clean install of Drupal 10.3-dev and Plugin Pack 1.0.1.

Noting the Unknown named parameter $productivity_pack in the error message, I tried enabling ckeditor5_premium_features_productivity_pack (which also enables ckeditor5_premium_features and ckeditor5_premium_features_mentions), but the error persists. Other features of the pack I've tested (block indent, word count, find/replace, full screen) all work fine with or without the "Premium Features" module/sub-modules actually enabled.

Steps to reproduce

  1. Enable ckeditor5_plugin_pack and ckeditor5_plugin_pack_templates.
  2. Visit any text format with that uses the ckeditor 5 editor (e.g. Basic HTML) and note the error.

I also tried creating a minimal template before visiting the text format. Error persists.
As noted above, I also tried enabling portions of the "Premium" module to no effect.

Am I missing a step?

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States justcaldwell Austin, Texas

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

Merge Requests

Comments & Activities

  • Issue created by @justcaldwell
  • First commit to issue fork.
  • Status changed to Needs review 6 months ago
  • πŸ‡΅πŸ‡±Poland dolszewski

    Hi @justcaldwell
    I have posted MR with the fix, feel free to test it. We will also test it internally.
    Recently, in 10.3-dev some changes were made in the ckeditor5 core module that caused this fatal error.

  • Status changed to Needs work 6 months ago
  • πŸ‡ΊπŸ‡ΈUnited States justcaldwell Austin, Texas

    Thanks @dolszewski, but the change had no effect. The patch applied successfully. I then rebuilt cache, (re) enabled ckeditor5_plugin_pack_templates, ckeditor5_premium_features, ckeditor5_premium_features_productivity_pack and ckeditor5_premium_features_mentions. Finally, I created a very simple template and made it available to the basic_html format.

    Same error occurs if I visit the basic_html format config page.

  • Status changed to Needs review 6 months ago
  • πŸ‡΅πŸ‡±Poland dolszewski

    @justcaldwell
    Ah sorry, I missed that you have installed a premium feautres productivity pack. You cannot have both installed at the same time in that case. When you install a premium features productivity pack, it overrides the "plugin pack template" plugin config and you need to have a license key for the productivity pack.
    You have that fatal error because my patch only works for the plugin pack (the same error occurs in premium features). Of course, we will also add patches for premium features before Drupal 10.3 is released.
    Please check it without the premium features productivity pack installed.

  • Status changed to RTBC 6 months ago
  • πŸ‡ΊπŸ‡ΈUnited States justcaldwell Austin, Texas

    Ah, okay -- I was under the mistaken impression that I needed to have those premium modules enabled.

    I tested without them install and the patch works just fine. Thanks for the quick response!

  • Status changed to Fixed 5 months ago
  • πŸ‡΅πŸ‡±Poland dolszewski

    The latest release (1.1.0) contains a fix for that bug.

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

Production build 0.71.5 2024