Hi, I found out that this module isn't the source of the issue I've described, it's a different module that also redirects and uses entities called redirect. I'm closing the issue, thanks for the help.
Great, thank you. I will try the whole thing again on a clean slate.
Hi, thanks. Would it be possible to detail the required steps including order?
What I did was migrate the site/content (thousands of nodes with images), before trying out this module. They were migrated successfully, including field definitions and corresponding images.
Then I used this migrate module and eventually seemed to run it successfully, although without parameters. I can see the crop table in the database with the correct width, height and fids (and also the calculations regarding X and Y - are these adjustments compatible in all cases...?).
After all this I found out that all of the image styles the use cropping were not migrated in the initial site migration so I defined one as a first test, enabled image_widget_crop, and defined the field that uses the image style to use image_widget_crop.
It didn't work... am I missing something? I can see the connection in the table between files and crop parameters but nothing connecting to specific fields or nodes. Should I change the order of actions? missing some step altogether?
It would be very helpful if you can add some instructions for the module...
Thank you!
Sorry, nevermind, I managed to overcome these issues, now dealing with the actual code but will try and figure it out myself before asking dumb questions :)
Hi, thank you @sir_squall for this module and also @candelas for the further instructions.
I've tried running this and have also encountered the message
Class "\Drupal\drush_migratecrops\Commands\MigrateCropsCommands" does not exist
@candelas, would you mind explaining what you've done other than generating the file via
drush generate drush:command-file
you've written that you've generated drush.services.yml by mistake. What does it mean? Did you create a composer.json file and drush.services.yml? and assuming you did, I'd really appreciate if you'd detail what is written in each file.
Thank you!
Dana
Hi @keshavv, thanks, just to make sure I understand your suggestion in the comment you referred to, since we're talking about redirect, no need for the loop, just do it for redirect (and is 'redirect' the correct entity type id)?
$entity_type_manager = \Drupal::entityTypeManager();
$entity_type_manager->clearCachedDefinitions();
$entity_type = $entity_type_manager->getDefinition('redirect');
\Drupal::entityDefinitionUpdateManager()->installEntityType($entity_type);
Hi, thank you. Unfortunately it didn't help, I applied the patch and then as required ran a small database update, but afterwards I still get the same message.
FYI I'm using Drupal 10.1.6 with PHP 8.2.