Showing existing CK5-full HTML-content

Created on 29 September 2024, 3 months ago

Problem/Motivation

Existing with CKE5 in Full HTML mode produced content can´t be shown for editing after installing CKE5-Plgin Pack.
Edit-window can´t be open, if Full HTML mode is selected, see picture attached.
System recommended the upgrade to CKE5-Plugin Pack for Drupal version 10.3.x .
Installing process as well as operation report of Drupal do not show any error or note.
No comment or help link refer that problems could rise.

Steps to reproduce

Installed system:
Drupal 10.3.5, CKE5-Pludin-Pack 1.2.1, all modules with latest compatible version, PHP 8.3.x
Blocks were build with CKE5 in Full HTML mode and working normal until installation of CKE5-Plugin-Pack

Proposed resolution

Fix the problem with the installing process

Remaining tasks

Fix the problem in the installing process and/or give right advise for installing the CKE5-Plugin Pack
Prevent the installation if the prerequicites are not sufficient

User interface changes

API changes

Data model changes

💬 Support request
Status

Active

Version

1.2

Component

Code

Created by

🇩🇪Germany Andreas Dvorak

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

Comments & Activities

  • Issue created by @Andreas Dvorak
  • 🇵🇱Poland salmonek

    Hi @andreas-dvorak
    Is there anything in the browser's developer console?
    Can you tell what are the other contrib (or custom) plugins that you use in Full HTML?

  • 🇩🇪Germany Andreas Dvorak

    Dear @salmonek
    One message in the console found: e.g. see the attachment.
    I use the CK5-Editor and other modules without any modifications of the standard
    as well as no manipulation of the code, e.g. HTML with other tools.
    The Full-HTML-format is used with the predefined CK5-Buttoms / modules only and
    the editing works fine until the installation / updates of the pludin-pack and drupal 10.3.x .
    The new versions of Drupal 10.3.6 and CK5-Editor-Plugin Pack 1.1.2 don´t solve the problem.
    Thanks for your help
    Andreas

  • 🇵🇱Poland salmonek

    The TypeError: r.Model is not a constructor seems to be key issue here. Drupal 10.3 came with CKEditor 5 version that introduced some backwards incompatibilities. This error may occur when incompatible (older) version of some plugin is used. In your situation it is font.js file.

    By default Plugin Pack is dwnloading compatible versions of required plugins from CDN, but we allow to set plugins directory manually at /admin/config/ckeditor5-plugin-pack. Do you by any chance have set some local directory for CKEditor plugins?

    If not then please tell what is the source of font.js file (full url should show when you hover over the file name in the developer console).

  • 🇵🇱Poland salmonek

    @andreas-dvorak
    Sorry for long response. I was convinced that I already did.
    The font.js file which you're using comes from ckeditor_font module. It was built using older CKEditor 5 version and is incompatible with CKEditor in Drupal 10.3.
    You can use Fonts sub-module of CKEditor 5 Plugin Pack instead (You'll need to configure colors again). With Plugin pack you'll get always font plugin in version that matches version of CKEditor 5 in the Drupal Core you're using.

  • 🇩🇪Germany Andreas Dvorak

    Additional info.
    I can see some milliseconds the existing content in the editorbox.
    Than the box collaps to one split line with the collaps symbol.
    I can´t expand the textbox.

    In my opinion it is an real important error.

    Anybody working on a solution?

  • 🇵🇱Poland salmonek

    I agree that this is important. Yet the problem doesn't seem to be within Plugin Pack.
    /modules/contrib/ckeditor_font/js/ckeditor5_plugins/ckeditor5-font/build/font.js - font.js file is loaded from CKEditor Font module, which has reported issue of being incompatible with Drupal 10.3 - https://www.drupal.org/project/ckeditor_font/issues/3456088 🐛 Incompatibilidad con Drupal 10.3.0 Postponed: needs info

    Please try to uninstall "CKEditor Font" module and use "CKEditor 5 Font Plugins".
    In CKEditor 5 Font Plugins all plugin files are by default downloaded from CDN with version that matches main CKEditor 5 library in the Drupal Core.

  • 🇩🇪Germany Andreas Dvorak

    Thanks Salmonek for your assistance.
    I´ve uninstall the "CKEditor Font module" and can see my content.
    But I have two windows for editing now,
    - one with the existing content and text format
    - an other which is empty and the format is "Basic HTML".
    Is there a need for the second (empty) window or can I remove it?
    What will be happen, if I use both windows - any conflicts appears?

  • 🇩🇪Germany Andreas Dvorak

    A new problem appear with the "Font family" buttom.
    I have configured the buttom with some font families but I see/can select only the first family name.
    In the past I could choose all configured font families.
    What can I do or is it an error?

  • 🇵🇱Poland salmonek

    In case if you're referring to the Body field that you showed on screenshot in your previous message then it looks like you have Body set as multi value field (there is a "Add another item" button, so you can add even more field items). In that case yes - you can safely remove the empty one. If you use both there won't be conflicts as content for both items will be saved in a different rows in the database.

    As for #10 issue if you configured all families in a single row separated by commas then this will be a single rule - all those values will be added as a single font-family attribute, and fonts will be prioritized to use the first one or next in order in case if previous are for some reason unavailable.
    To have fonts as separate options they should be entered in new lines of the configuration field.

  • 🇩🇪Germany Andreas Dvorak

    I configure the font families in
    Configuration/Content authoring/Text formats and editors/Configure/Full HTML.

    If I enter each font family name in a new line (with or without comma) and will save it,
    I get the message "Unacceptable values provided for the CKEditor 5 Font Family plugin".
    See Screenshot: "CKE5 Font Families configuration one line for each family"

    If I enter the font family names comma separated in one line I can save the settings,
    but I can choose the first font family name only.
    See sceenshot: "CKE5 Font Families configuration comma separated"

  • 🇩🇪Germany Andreas Dvorak

    Refering to your comment to the Body field.
    Where can I configure the field as "Multi value field" or ...?

  • @salmonek opened merge request.
  • 🇵🇱Poland salmonek

    See Screenshot: "CKE5 Font Families configuration one line for each family"

    Indeed there was a bug. I pushed fix to the issue's fork. You can download a patch by clicking "plain diff" in the branch info box.

    Where can I configure the field as "Multi value field" or ...?

    Structure -> Content Types -> {your conten type} -> Manage fields -> Edit (operations column related to Body field)
    In the form there will be a "Allowed number of values" option where you chan select Unlimited and Limited (with specific limit number)
    Please be aware that this setting will affect field across all content types where it's being used (it's possible tha you set unlimited values for other content type). And if you already have a node with multiple values for given field you won't be able to set lower limit than maximal current number of values (in a single node) stored in the database. It will be communicated with an error message similar to this "There is 1 entity with 2 or more values in this field, so the allowed number of values cannot be set to 1."

  • Status changed to Needs review 19 days ago
  • 🇩🇪Germany Andreas Dvorak

    Hello, any news regarding bug-fixing? Selection of families still doesn´t work.
    Your suggestion for an intermediate solution "plain diff" is for somebody with deeper knowledge.
    But I´m not an expert and waiting for the final solution in an update of the module.

  • Hi Andreas, the fix for this issue is likely to be included in the next release.

Production build 0.71.5 2024