πŸ‡§πŸ‡ͺBelgium @gillesv

Account created on 14 June 2010, about 14 years ago
#

Recent comments

πŸ‡§πŸ‡ͺBelgium gillesv

Was also experiencing the same issue where the breadcrumb would refuse to use the views title defined by the override in the contextual filter settings, even with "Easy Breadcrumb" enabled.

The patch in #74 seems to work fine.

πŸ‡§πŸ‡ͺBelgium gillesv

Can confirm this issue and can also confirm that the patch/MR seems to work.

πŸ‡§πŸ‡ͺBelgium gillesv

Having a similar issue: as soon as I add "<iframe>" (with or without attributes) to "Source editing", I get the same kind of error.
Temporarily fixed by leaving "<iframe>" out of "Source editing" and adding iframe capabilities via the CKEditor iFrame β†’ module, but this still doesn't allow me to add custom attributes like "allowfullscreen".

πŸ‡§πŸ‡ͺBelgium gillesv

This is still an issue in the latest versions of Rabbit Hole 1.x and 2.x
When there are spaces in the filename, and you try to redirect to it (via [node:field_file] for example), it double encodes the URL resulting in a "Page not found" error.

@jimafisk ' s solutions to replace "PlainTextOutput::renderFromHtml" with "rawurldecode" in PageRedirect.php seems to fix the problem.

πŸ‡§πŸ‡ͺBelgium gillesv

The issue seems to be that in the "buildForm" function of IconDialog.php, the form value "family" is null when the form is initialized. This can be fixed as follows:

    $style_options = $this->getStyleOptions(); // We get the style options once so we can reuse them

    $form['icon'] = [
      '#type' => 'textfield',
      '#title' => $this->t('Icon Name'),
      '#default_value' => '',
      '#required' => TRUE,
      '#description' => $this->t('Name of the Material Design Icon. See @iconsLink for valid icon names, or begin typing for an autocomplete list.', [
        '@iconsLink' => Link::fromTextAndUrl(
          $this->t('the icon list'),
          Url::fromUri('https://material.io/resources/icons', ['attributes' => ['target' => '_blank']])
        )->toString(),
      ]),
      '#autocomplete_route_name' => 'material_icons.autocomplete',
      '#autocomplete_route_parameters' => [
        'font_family' => $form_state->getValue('family') ? $form_state->getValue('family') : (count($style_options) ? array_keys($style_options)[0] : NULL), // If the value of 'family' is null, we take the first option of the $style_options array
      ],
      '#prefix' => "<div id=\"{$field_wrapper_id}\">",
      '#suffix' => '</div>',
    ];

    $options = [];
    foreach ($settings->get('families') as $type) {
      $options[$type] = ucfirst($type);
    }
    $form['family'] = [
      '#title' => $this->t('Icon Type'),
      '#type' => 'select',
      '#options' => $style_options, // reuse previously determined style options
      '#ajax' => [
        'callback' => [$this, 'handleIconStyleUpdated'],
        'event' => 'change',
        'wrapper' => $field_wrapper_id,
      ],
    ];

I commented the changes I would implement in the buildForm function of IconDialog.php.

πŸ‡§πŸ‡ͺBelgium gillesv

Hi @mahbo,

This is what I'm seeing in my setup:

  • I activated two families: "Material Symbols - Outlined" and "Material Symbols - Rounded"
  • In the CKEditor dialog of Material Icons, the Icon Type is set to "Material Symbols - Outlined" by default
  • When I type something in the Icon Name search, I get autocomplete items that include no icon markup whatsoever. This is because the function "getFontSetFamilies" of "MaterialIconsSettings.php" returns the Material Icons families (baseline, outlined, round,...) instead of the Material Symbols families (symbols__outlined, symbols__rounded,...), resulting in an empty $font_families_intersect in the getRenderLabel function of Autocomplete.php. The $font_set variable is wrongly set to "material_icons".
  • As soon as I switch to a different Icon Type (e.g. Material Symbols - Rounded), the $font_set variable is correctly set to "material_symbols" and the autocomplete items DO display the icon markup, because $font_set_families in the getRenderableLabel now retrieves the correct font families.
πŸ‡§πŸ‡ͺBelgium gillesv

Thanks a lot @mahbo!

About the icon preview issue in the autocomplete dropdown:
I mean that in my setup the autocomplete dropdown doesn't show the icons when using the autocomplete search function in CKEditor (5). It only shows the labels of the icons. BUT I did some more testing and notice that this issue only occurs when you haven't switched between Icon Types.

So to reproduce this issue:

  • Use the Materials Icons button in CKEditor (5)
  • Start typing something in the Icon Name autocomplete field
  • Notice how only the names of the icons show, but not the icons itself
  • Now switch to a different Icon Type and try again: the autocomplete results now show the icons.

This problem does not seem to occur when multiple families are allowed and you switch between Icon Types. I guess some necessary things only gets loaded after an ajax event occurs, and not at initialisation?

I'm using Drupal 10.1.2 with CKEditor 5 and the Material Icons button.

πŸ‡§πŸ‡ͺBelgium gillesv

Thanks for implementing this.

You probably know the icons don't preview yet in the autocomplete dropdown, but another thing I'd like to mention:
The way it is implemented now, you can't change the weight/grade/optical size of the icons like you can on https://fonts.google.com/icons, via font-variation-settings (CSS).

You can fix this by changing the URL of the fonts to this:

symbols__outlined:
  version: VERSION
  css:
    theme:
      //fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200: { type: external }
symbols__rounded:
  version: VERSION
  css:
    theme:
      //fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200: { type: external }
symbols__sharp:
  version: VERSION
  css:
    theme:
      //fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200: { type: external }
πŸ‡§πŸ‡ͺBelgium gillesv

Can confirm; I'm experiencing the same issue. Have you updated to Drupal 10.1? I think it started happening after the update.

πŸ‡§πŸ‡ͺBelgium gillesv

We're experiencing the same issue, and it's breaking essential functionality. "hook_field_widget_paragraphs_form_alter" is never triggered.

πŸ‡§πŸ‡ͺBelgium gillesv

I was able to fix the issue by adding the "" element to the "elements" section of material_icons.ckeditor5.yml
Patch attached.

Production build 0.69.0 2024