Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292052

base_url used in routed Url assembler, but not in unrouted assembler

$
0
0

Problem/Motivation

When building routed Urls, you're able to set the option absolute to TRUE, and set the base_url option. When assembling the URL, this will result in the specified base URL being used in the URL.

But this option doesn't work for unrouted URLs. We should probably make this behavior consistent.

Steps to reproduce

This will work for a routed URL:
drush php:eval "echo \Drupal\Core\Url::fromUri('internal:/', ['absolute' => 1, 'base_url' => 'https://test.com'])->toString();"
will return https://test.com/

But it won't work for unrouted URLs:
drush php:eval "echo \Drupal\Core\Url::fromUri('internal:/404', ['absolute' => 1, 'base_url' => 'https://test.com'])->toString();"
will return https://your-local-domain/404

Proposed resolution

Adjust UnroutedUrlAssembler to take into account the base_url option.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 292052

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>