Tried to install this module with Drupal 9.1.10 and it failed because of an outdated patch.
Updating to https://www.drupal.org/files/issues/2021-06-03/2685749-92.patch works.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3218659-1.patch | 480 bytes | tvalimaa |
Issue fork machine_name_widget-3218659
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
tvalimaa commentedMade patch
Comment #3
kiwimind commentedHaving had this failure during an upgrade from D8 to 9.2.5, this patch does now fix the problem.
In case it helps anyone, you're unable to use this patch via composer due to the order of execution. We've had to move this contrib module in the custom directory and apply the patch there, which allows the upgrade to complete. Not looked in to moving it back yet.
Thanks for the updated patch.
Comment #6
radimklaskaAs mentioned, patching composer is tricky. Issue forks for the rescue.
I opened a new fork, applied the patch and created a merge request.
Here is how to use the fork before this gets merged:
* read https://www.drupal.org/docs/develop/git/using-git-to-contribute-to-drupa...
*
composer.json:*
composer require drupal/machine_name_widget:"dev-3218659-update-core-patch"Comment #7
progzy commented@radimklaska -> thank you for the tip and the link. However I have 2 questions:
EDIT: I've found the answer for one of them.
1/ About the tip
what to do if you have a dependency? In my case I have the "block_content_machine_name" module that I forked because it needs "drupal/machine_name_widget": "^2.0" whereas it has currently "drupal/machine_name_widget": "^1.0".
Because of this dependency I get
when I run
composer require drupal/machine_name_widget:"dev-3218659-update-core-patch"EDIT: the solution is to use aliases as described here: https://getcomposer.org/doc/articles/aliases.md then proceed with
composer require drupal/machine_name_widget:"dev-3218659-update-core-patch as 2.x-dev"2/ Why is the patch / or module necessary?
I wonder since it is written on the main page of the module that it will be useless once integrated in the core. Isn't that a kind of duplicate? I may have missed something.
Thank you.
Comment #8
usmanjutt84This patch is not work with PHP 7.4 & MySQL 5.7 and Drupal 9.3.0.
Comment #9
trickfun commentedYes, patch doesn't work.
Can you fix?
The bug is blocking
Thank you
Comment #10
trickfun commentedNo response?
is this module still alive?
Comment #11
tvalimaa commentedYou need to follow https://www.drupal.org/project/drupal/issues/2685749 and use latest patch which is currently https://www.drupal.org/files/issues/2021-12-29/2685749-101.patch.
I didn't check what this module actual do because this module was just one project what I got. My solution was patch this module with my https://www.drupal.org/files/issues/2021-07-09/3218659-1.patch patch and move this module folder under modules/custom.
Comment #14
ankondrat4 commentedHello.
I have changed patch for working with Drupal 9.5.8.
Comment #16
ankondrat4 commentedComment #17
ankondrat4 commentedComment #18
ankondrat4 commentedComment #19
tgoeg commentedThe patch https://www.drupal.org/files/issues/2023-05-17/drupal-9-5x-machine-name-... pulled in by composer.json is broken.
It creates unnecessary files. See #2685749-127: Add a 'machine_name' widget for string field types with a UniqueField constraint for a fix.
Comment #20
tgoeg commentedSorry - the patch itself is correct. It's just
composer-patchesthat messes things up in case of newly created files.Because it tries all values of
patch's-p0till-p4, it creates new files everywhere. Currently investigating how to prevent that.