Problem/Motivation
We need to use getKey() method of the entity definition to get entity keys like "id" and "bundle" instead of hardcoding them.
Steps to reproduce
Try to convert the bundle of the comment - you will see the error "id column not found in table comment"
as "id" of comment is "cid".
Proposed resolution
Use \Drupal::entityTypeManager()->getDefinition($entity_type)->getKey($entity_key) instead.
Remaining tasks
-
User interface changes
-
API changes
-
Data model changes
-
Issue fork convert_bundles-3200119
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 #5
gilmordComment #6
gilmordComment #7
el1_1el commentedI had a todo on this from long ago. Its been merged to the dev branch. Guess the merges dont come into the issues like patches used to? Reopen if you have any issues with the dev version
Comment #8
gilmordHi,
if you need a patch you can use a merge request url and add '.patch' at the end
In this case it will be: https://git.drupalcode.org/project/convert_bundles/-/merge_requests/2.patch
Comment #9
el1_1el commentedThanks gilmord,
The commit is already there (https://git.drupalcode.org/project/convert_bundles/commit/4a26475) and it looks like you got issue credit (https://www.drupal.org/u/gilmord/issue-credits/2979087) and commit credit. I suppose I could ammend the commit message with the issue to get the old notification, but I dont think it would do much more. Just getting used to the new drupal.org process
Anyway, thanks for fixing that properly!