Problem/Motivation

When installing the module the patch https://www.drupal.org/files/issues/entity_embed_links-2511404-31.patch fails to apply on entity_embed 8.x-1.0-beta2:

- Installing drupal/entity_embed_linkit (1.0.0-beta1): Loading from cache
- Applying patches for drupal/entity_embed_linkit
https://www.drupal.org/files/issues/entity_embed_links-2511404-31.patch (2511404 - Add link field to entity embed dialog)
Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/entity_embed_links-2511404-31.patch

That seems to be because the patch is set for "drupal/entity_embed_linkit" instead of "drupal/entity_embed", though I have not been able to test if it applies when changed.

Proposed resolution

I can think of two options:
1. Fix the patch dependency in the composer.json.
2. Remove the patch dependency completely from the code, and add it in manual installation instructions so that entity_embed_links code will not need to be changed when entity_embed is updated.

CommentFileSizeAuthor
#2 entity_embed_patch-2903596-1.patch440 bytesRumyanaRuseva

Comments

RumyanaRuseva created an issue. See original summary.

RumyanaRuseva’s picture

StatusFileSize
new440 bytes

Here is a patch for fixing the dependency.
Unfortunately I am not able to test if it works. It seems that entity_embed/composer.json is cached on module install and even though it's changed by the attached patch, it still executes the original code.

RumyanaRuseva’s picture

Status: Active » Needs review

  • bd103f9 committed on 8.x-1.x
    Issue #2903596 by RumyanaRuseva: Patch for entity_embed fails to apply...
eric.chenchao’s picture

Status: Needs review » Fixed

Hi RumyanaRuseva, thanks.

Status: Fixed » Closed (fixed)

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

amaisano’s picture

Still does not work. Is this meant to apply to the dev version of drupal/entity_embed??

amaisano’s picture

The patch partially applies, but fails.

Gathering patches for root package.
Removing package drupal/entity_embed so that it can be re-installed and re-patched.
  - Removing drupal/entity_embed (1.0.0-beta3)
    The package has modified files:
    M entity_embed.module
    M src/Form/EntityEmbedDialog.php
    Discard changes [y,n,v,d,?]? y
Deleting web/modules/contrib/entity_embed - deleted
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 1 update, 0 removals
Gathering patches for root package.
Gathering patches for dependencies. This might take a minute.
  - Updating drupal/core (8.6.15 => 8.6.16): Downloading (100%)
  - Installing drupal/entity_embed (1.0.0-beta3): Downloading (100%)
  - Applying patches for drupal/entity_embed
    https://www.drupal.org/files/issues/entity_embed_links-2511404-31.patch (2511404 - Add link field to entity embed dialog)
   Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/entity_embed_links-2511404-31.patch