Email us at info@henrytech.org to discuss your Drupal Migration today!
If you need a waitlist for your webform, feel free to branch off of my module as a starting point!
Email us at info@henrytech.org to discuss your Drupal Migration today!
If you need a waitlist for your webform, feel free to branch off of my module as a starting point!
Before:
To change an existing fields length if the field has data in it, you need to alter the database tables for the field and the config storage for the field, do this in a hook update as shown below.
Sometimes contrib modules need a little help, whether its a bug the maintainers haven't fixed yet, or the module just isn't working with your custom code.
First, locate the code repository for the module. You can do the by going to the module's Drupal page, and clicking "Source Code" in the right sidebar. In this example we use the "group" module page as though we were going to patch this module:
1.) go to https://www.drupal.org/project/group
2.) Click "Source code"
3.) Find the correct version of your module that you are patch and note the correct tags
Sometimes during a migration, we need a process plugin, which alters the value before it gets stored in the new database. This example is useful if the original values have too many characters to fit into the new field.
Create a new file as your_custom_module/src/Plugin/migrate/process/SkipOnTooLong.php:
Sometimes during a migration, fields are not directly migrateable in the .yml file. In this case, or if there is more processing of the data that cannot be handled by a plugin, you can use an event subscriber that fires on the migration of each row.
In your your_custom_migration_module/src/EventSubscriber/CustomMigrateSubscriber.php:
In the case that you need to have a form contained in a popup/modal window, that you also need to pass a parameter to, such as a specific node or entity id. In this case we are clicking on a link in a template file to open the form, and the entity id is available in the template file that has the link. You can also put such a link in a view, and pass it an id from the view. So you can have a view with a button for each row that references the ID from that row, that has a form that does something.
In your custom-template.html.twig file: