Updating to 1.5 crashes website due to duplicated method in .module file.

Created on 9 November 2023, about 1 year ago

Problem/Motivation

Updating to 1.5 causes site to crash with the following error:
Cannot redeclare entity_embed_library_info_alter() (previously declared in /var/www/drupal/docroot/modules/contrib/entity_embed/entity_embed.module:308) in /var/www/drupal/docroot/modules/contrib/entity_embed/entity_embed.module on line 362

Examining the offending code file indicates that the method is indeed duplicated in the module file.

Steps to reproduce

Use composer to update to 1.5.

Proposed resolution

Remove the undesired version of the method.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

1.5

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States bgronek

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

Comments & Activities

  • Issue created by @bgronek
  • πŸ‡ΊπŸ‡ΈUnited States bgronek

    I just found that the same is also true for the entity_embed_ckeditor4to5upgrade_plugin_info_alter method.

  • Status changed to Postponed: needs info about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States dave reid Nebraska USA

    Check if you are applying a patch and test without it. We would be seeing test failures if this were true.

  • πŸ‡¨πŸ‡¦Canada danrod Ottawa

    I had the same issue when trying to install the latest DEV release of the WxT distribution (composer.json was updated to increment entity_embed version from ^1.4 to ^1.5):

    Fatal error: Cannot redeclare entity_embed_library_info_alter() (previously declared in /var/www/html/html/modules/contrib/entity_embed/entity_embed.module:308) in /var/www/html/html/modules/contrib/entity_embed/entity_embed.module on line 376

  • πŸ‡­πŸ‡ΊHungary Balu Ertl Budapest πŸ‡ͺπŸ‡Ί

    @bgronek β†’ & @danrod β†’ does any of you might have the chance to test the same procedure with the latest stable version 8.x-1.6 β†’ , please?

    Otherwise it seems to be a quite odd and edgy case.

  • πŸ‡«πŸ‡·France eliechoufani Marseille, Beirut

    Hello, I have the same issue with the latest stable version 8.x-1.6 on Drupal 10.3.5 and Drupal 10.3.10.

    PHP Fatal error:  Cannot redeclare entity_embed_library_info_alter() (previously declared in /home/users/irp_user/www/web/modules/contrib/entity_embed/entity_embed.module:308) in /home/users/irp_user/www/web/modules/contrib/entity_embed/entity_embed.module on line 362
     [warning] Drush command terminated abnormally.

    Downgraded back to 8.x-1.4

  • πŸ‡«πŸ‡·France eliechoufani Marseille, Beirut

    Sorry, false alarm, I don't know why an old patch was still applied after upgrading " https://www.drupal.org/files/issues/2023-06-19/entity_embed-3272732-93.p... β†’ "

    I had to delete the folder web/modules/contrib/entity_embed manually
    Clear composer cache : composer clearcache
    Then require the new version : composer require drupal/entity_embed:1.6

    To fix the issue.

    Thank you.

Production build 0.71.5 2024