The domain_path module is not compatible with Drupal 11 due to the deprecation of AliasWhitelistInterface
in favor of AliasPrefixListInterface
. When enabling the domain_path module on Drupal 11, the site breaks with fatal errors because the module is still using the deprecated interface.
The core issue is that in Drupal 11, the path_alias.manager
service constructor changed from using AliasWhitelistInterface
to AliasPrefixListInterface
, but the domain_path module's DomainPathAliasManager
class still references the old interface.
1. Install Drupal 11.1.8
2. Install the domain_path module (8.x-1.5)
3. Enable the domain_path module
4. Clear cache or access the site
5. Site breaks with fatal error: TypeError: Drupal\domain_path\DomainPathAliasManager::__construct(): Argument #1 ($alias_repository) must be of type Drupal\path_alias\AliasRepositoryInterface, string given
Update the DomainPathAliasManager
class to use the new AliasPrefixListInterface
instead of the deprecated `AliasWhitelistInterface`:
1. Change the import statement from use Drupal\path_alias\AliasWhitelistInterface;
to use Drupal\path_alias\AliasPrefixListInterface;
2. Update the constructor parameter from AliasWhitelistInterface $whitelist
to AliasPrefixListInterface $prefix_list
3. Update the parameter documentation to reflect the new interface
4. Update the parent constructor call to use the new parameter name
This change maintains backward compatibility while ensuring the module works with Drupal 11's updated path alias system.
- [ ] Apply the patch to the domain_path module
- [ ] Test the module functionality with Drupal 11
- [ ] Verify that domain-specific path aliases work correctly
- [ ] Test with various domain configurations
- [ ] Update module documentation if needed
No user interface changes. This is a backend compatibility fix that maintains all existing functionality.
Breaking change: The DomainPathAliasManager::__construct()
method signature changes:
- Before: __construct(AliasRepositoryInterface $alias_repository, AliasWhitelistInterface $whitelist, LanguageManagerInterface $language_manager, CacheBackendInterface $cache, TimeInterface $time)
- After: __construct(AliasRepositoryInterface $alias_repository, AliasPrefixListInterface $prefix_list, LanguageManagerInterface $language_manager, CacheBackendInterface $cache, TimeInterface $time)
This change is necessary for Drupal 11 compatibility and follows the core API changes.
No data model changes. The fix only updates the service interface usage without affecting any stored data or database schema.
Active
1.5
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
No activities found.