Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apply Drupal 8 Patch by Composer for fix multi fields on Signature Field

I try to patch the Signature Field Drupal module.

I follow this tutorial (https://groups.drupal.org/node/518975) but I don't get any changes.

What I try:

1-Run: composer require cweagans/composer-patches

2-Edit the composer.json

"extra": {
    "installer-paths": {
    ...
    },
    "patches": {
        "drupal/signature_field": { //here my module is signature_field
            "Drupal Signature Field fix multi feilds": "https://www.drupal.org/files/issues/2019-02-21/signature_field-2993223-08.patch"     
        }
    }
}

3- Run composer install

PROBLEM: I run the composer install but all packages installed or updated but no change on my module. what is wrong?

like image 832
Nasser Ali Karimi Avatar asked Apr 15 '19 06:04

Nasser Ali Karimi


People also ask

How do I apply a patch in Drupal 8?

To apply the patch to the contrib module, we have to edit the composer. json file in the site root folder. And that's it. The module will be downloaded and the patch automatically applied.

How do Drupal patches work?

A patch is a small text file that contains a list of all the differences between the code as published (usually on drupal.org) and the code as you wish it to run on your site. You "apply" it to the original code, and the changes are made so that you can use the code the way you want it.


1 Answers

As I search and try some way I got that I should install the module with the composer again and the issue will fix.

Configuration in the question is fine Just run this command to reinstall the module with patch

Run composer require drupal/signature_field

Your output will be like this:

enter image description here

I hope this help Some one!

like image 113
Nasser Ali Karimi Avatar answered Oct 18 '22 02:10

Nasser Ali Karimi