Skip to content

feat: remove parent:: call for the onPathTranslation method

boaz requested to merge feature/complete-path-translation-overwrite into master

This PR was created as a fix for the following Monday ticket. To summarize: when using the 'preview' feature in the Drupal CMS a 500 error would be thrown by the /router/translate-path endpoint with the following message:

| Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("view_mode_id") to generate a URL for route "entity.node.preview". in Drupal\Core\Routing\UrlGenerator->doGenerate() (regel 187 van /data/www/werkenbijhvc.nl/releases/release_1.27.0/docroot/core/lib/Drupal/Core/Routing/UrlGenerator.php). |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|

This PR prevents the issue by removing the parent::onPathTranslation() call and effectively overwrites the method as a whole. Some changes have been made to make sure the reponse will stay the same, preventing the need for a major version bump to release this fix.

Merge request reports

Loading