New answers tagged

0

I figured it out from sub_process plugin's documentation: /** * Available configuration keys: * ... * - include_source: (optional) If TRUE, all source plugin configuration and * values will be copied into the sub-processed row in a new property named * for the source_key configuration value (see below). Defaults to FALSE. * - source_key: (...


4

You have the right idea, there are just a few details that need to be fixed. The TrustedCallbackInterface was first added to Drupal 8.8; it didn't exist before Drupal 8.8. While it is optional in Drupal 8.8 and 8.9, it is mandatory in Drupal 9. So your module isn't compatible with Drupal 9 until you make this change. First, copy the entire body of your ...


0

Here are the highlights of the process plugin I wrote, in case anyone is interested in a custom solution: class Prepend extends ProcessPluginBase { public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) { $return = []; foreach ($value as $item) { $return[] = implode($item); } ...


1

I don't think this is possible with concat in a single pipe, because you need to define two sources for concat, and AFAIK you can't fill the source partly with the result from the previous section and partly with a completely new value. Workaround: Use the str_replace plugin instead, which is a wrapper for PHP's preg_replace. preg_replace will detect if ...


1

You can replace Space, Underscores with '%20' and '%5f'. You can use module migrate_plus with process plugin str_replace like this: source_full_path: - plugin: concat delimiter: / source: - constants/source_base_path - filepath - plugin: urlencode - plugin: str_replace search: [" ", ...


0

The YAML looks good although I fundamentally disagree with all these modules that try to inline several migrations into one. I am not sure what your source plugin is. If I were doing this, I'd write a custom one by copying EmptySource and changing id = "empty", to id = "my_json_source" and change initializeIterator to return new \...


0

Accepted answer did not solve my issue . But the answer from @Mike-Ryan helped me to go into right direction. migration plugin is deprecated so I used migration_lookup plugin which helped me to solve the issue. My migration mapping definition as follows : uid: - plugin: migration_lookup migration: luxus_users source: uid


1

I am not aware about any plugins for this case. But you can write your custom plugin. In the custom plugin you will need to parse text by a regular expression and create youtube media entities from it manually. Here are some code examples to point you to a right direction. The migration process plugin will parse the text, and process embed parts: <?php ...


0

OK, I figured it out. I'm new to using the Migrate system, so this may apply to anything with revisions like this, but apparently you MUST set both. billing_profile/target_id: plugin: default_value default_value: 34338 billing_profile/target_revision_id: plugin: default_value default_value: 34338 Only setting target_id fails.


Top 50 recent answers are included