Error in URLEmbed constructor when alternative cache modules enabled

Created on 3 September 2024, 4 months ago
Updated 4 September 2024, 4 months ago

Problem/motivation

Druapl 10.3
php 8.2

I have installed filecache
when I install ane enable url_embed 3.x I get the following error:

TypeError: Drupal\url_embed\UrlEmbed::__construct(): Argument #1 ($config) must be of type array, Drupal\filecache\Cache\FileSystemBackend given, called in /drupal-10.3.x/html/core/lib/Drupal/Component/DependencyInjection/Container.php on line 261 in Drupal\url_embed\UrlEmbed->__construct() (line 34 of drupal-10.3.x/html/modules/contrib/url_embed/src/UrlEmbed.php).

Steps to reproduce

  1. Go to...
  2. Click on...
  3. Observe [describe the expected and actual output]

Proposed resolution

This module uses Gitlab CI for automated testing of proposed code changes. To contribute code changes, create a merge request. Patch files will not trigger automated testing and are not sufficient for review.
πŸ› Bug report
Status

Needs review

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States SocialNicheGuru

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

Comments & Activities

  • Issue created by @SocialNicheGuru
  • πŸ‡ΊπŸ‡ΈUnited States SocialNicheGuru
  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

    Thanks for reporting this. I am unable to reproduce the problem using a standard Drupal installation of 10.3 with the 3.x branch of this module. Below are the steps I took. Can you provide more specific steps to reproduce this problem? (Please make sure this problem occurs with a standard Drupal installation without any other modules first!)

    1. Install the "standard" installation of Drupal.
    2. composer require drupal/url_embed:^3
    3. Enable the url_embed module.
    4. Add a "Link" field to the Basic Page node type.
    5. Set the field formatter to "Embedded URL"
    6. Add a Basic page node and populate the Link field with a valid embeddable URL. -- no problems.
    7. Add the URL Embed button to the "Basic HTML" text format and enable the "Display embedded URLs" text format filter.
    8. Create a Basic page and use the URL Embed button in the CKEditor 5 toolbar to embed a URL -- no problems.

  • Status changed to Postponed: needs info 4 months ago
  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson
  • Status changed to Active 4 months ago
  • πŸ‡ΊπŸ‡ΈUnited States SocialNicheGuru

    In your steps
    add redis or filecache modules
    Enable them
    the error occurs.

  • πŸ‡ΊπŸ‡ΈUnited States SocialNicheGuru
  • πŸ‡ΊπŸ‡ΈUnited States SocialNicheGuru
  • Status changed to Needs review 4 months ago
  • πŸ‡ΊπŸ‡ΈUnited States SocialNicheGuru
Production build 0.71.5 2024