This project is not covered by Drupal’s security advisory policy.
Provides a migration process plugin that converts absolute links to relative.
Inspired by the Pathologic module, a list of 'base urls' may be provided as parameters and any absolute links that start with these base urls are converted to relative links.
This is designed to avoid the problem that occurs when migrating a production site and then creating a test site to examine the new content. Typically there would be many embedded links in body fields that would point back to the production site. If this process filter is used correctly during migration then all 'absolute' links to content within the same site will be replaced by relative links.
Once the module is installed, you may then add the 'filter_absolute_links' plugin to your migration Yaml file as shown in the following example:
plugin: filter_absolute_links
replace_urls:
http://www.mysitename.co.uk
https://www.mysitename.co.uk
http://test-sitename.net
This would most commonly be used to filter absolute links out of a body field.
In the example above, a link such as https://www.mysitename.co.uk/news would be converted to /news during the migration.
An 'external' link such as http://bbc.co.uk/news would be left untouched by the migration.
Project information
Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed.Maintenance fixes only
Considered feature-complete by its maintainers.- Project categories: Developer tools
- Ecosystem: Migrate Plugins
2 sites report using this module
- Created by duttonma on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
