Problem/Motivation

We currently have a token [site:url]. The URL of the site's front page. The language prefix is added if the page is multilingual (e.g. http://www.example.com/pl).

In many cases a language prefix is unnecessary.

Example:

Open graph image path
[site:url]/sites/default/files/og_image.jpg

JSON LD ImageObject path
[site:url]/sites/default/files/logo.jpg

We need a new token that returns the base url without the language prefix.

Proposed resolution

Add token [site:base-url]. Base URL.

Remaining tasks

Add test.

User interface changes

Users can use the new token [site:base-url].

API changes

Data model changes

CommentFileSizeAuthor
#74 Site Base URL token.png81.01 KBmitthukumawat
#69 reroll_diff_1088112_63-69.txt1.7 KBankithashetty
#69 1088112-69.patch5.62 KBankithashetty
#63 interdiff_58-63.txt1.74 KBraman.b
#63 1088112-63.patch5.62 KBraman.b
#61 Screen Shot 2020-09-12 at 9.38.00 AM.png22.78 KBAnas_maw
#58 drupal-base_url_path_tokens-1088112-58-D8.patch5.52 KBLiam Morland
#56 drupal-base_url_path_tokens-1088112-56-D8.patch5.52 KBLiam Morland
#53 drupal-base_url_path_tokens-1088112-53-D8.patch5.52 KBLiam Morland
#52 interdiff-51-52.txt1.25 KBjungle
#52 1088112-52.patch5.51 KBjungle
#51 drupal-base_url_path_tokens-1088112-51-D8.patch5.18 KBLiam Morland
#48 1088112-48-44-interdiff.txt1.7 KBmbovan
#48 1088112-48.patch4.48 KBmbovan
#48 1088112-48-TEST-ONLY.patch4.48 KBmbovan
#44 1088112-44-43-interdiff.txt806 bytesmbovan
#44 1088112-44.patch4.2 KBmbovan
#43 1088112-43-40-interdiff.txt2.23 KBmbovan
#43 1088112-43.patch4.09 KBmbovan
#40 1088112-40-30-interdiff.txt3.23 KBmbovan
#40 1088112-40.patch2.9 KBmbovan
#30 base-url-token-1088112-30.patch3.11 KBmrshowerman
#27 base-url-token-1088112-27-23.txt2.89 KBmbovan
#27 base-url-token-1088112-27.patch3.06 KBmbovan
#23 interdiff-21-23.txt543 bytesKrzysztof Domański
#23 core_base-url-token-1088112-23.patch3.03 KBKrzysztof Domański
#21 interdiff-19-21.txt3.46 KBKrzysztof Domański
#21 core_base-url-token-1088112-21.patch2.87 KBKrzysztof Domański
#19 interdiff-18-19.txt2.54 KBKrzysztof Domański
#19 core_base-url-token-1088112-19.patch2.52 KBKrzysztof Domański
#18 interdiff-16-18.txt457 bytesKrzysztof Domański
#18 core_base-url-token-1088112-18.patch961 bytesKrzysztof Domański
#16 base-url-token-1088112-13-16-interdiff.txt436 bytesYurkinPark
#16 base-url-token-1088112-16.patch960 bytesYurkinPark
#13 base-url-token-1088112-13.patch962 bytesLukas von Blarer

Issue fork drupal-1088112

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dave Reid’s picture

Status: Active » Closed (works as designed)

Passing a string when $options['language'] needs to be a language object is invalid input and would cause PHP notices. This works as designed. Sounds like you want to be using 'Path based negotiation with fallback to default language if no defined path prefix identified.' mode for locale.module instead.

ao2’s picture

Changing the focus a little bit, as code out of context can be misleading sometimes.

The point is that I would have expected the [site-url] token to give back the base URL, without the language prefix in it, for the latter maybe another token could be used. What is your opinion on that?

@Dave Reid: I am already using the “Path prefix with language fallback” setting.

BTW, your suggestion sounded more about the “input” URL for getting to contents, while my concerns were more about the token “output” itself, but maybe I am still missing something.

Thanks,
Antonio

Dave Reid’s picture

Pardon, it's the 'Path prefix only' setting on that will not output the default language prefix when using url() which is what you want.

Nicolas Bouteille’s picture

Category: task » support
Status: Closed (works as designed) » Active

Sorry I don't understand how I am supposed to obtain the base url via a token.
I want my open graph image path to be set as [site:url]/sites/default/files/og_image.jpg
Unfortunately the language prefix is added so the path http://www.mywebiste.com/fr/sites... does not exist.
What should I do ?

guile2912’s picture

I had the same problem, finished creating my own token so that images in mail works. Just use [url-abs] and tadda, you have the web url without the language prefix.

/*Declare token*/
function mymodule_token_info() {
  $info['tokens']['site']['url-abs'] = array(
    'name' => t('Absolute URL'),
    'description' => t('Url of the site, no language prefix garanted'),
  );
  return $info;
}

/*Token replacement*/
function mymodule_tokens($type, $tokens, array $data = array(), array $options = array()) {
  $replacements = array();
  global $base_root;

  if ($type == 'site') {

    foreach ($tokens as $name => $original) {
      switch ($name) {
        case 'url-abs':
          $replacements[$original] = $base_root;
          break;
      }
    }
  }

  return $replacements;
}
Wtower’s picture

Alternatively, if you do not wish to create a new module, you can use the Custom Tokens module and create the new custom token url-abs with the following PHP code in it:

global $base_root;
print $base_root;

I didn't manage to do #5 in template.php, which is a nice solution. I don't understand why standard token module does not have such a token.

candelas’s picture

Issue summary: View changes

Thanks @guile2912 I could use your code in menu_token to link to pdfs, as you can see here
https://drupal.org/node/1151856#comment-8794261

allenfantasy’s picture

Just in case someone is looking for this answer, this comment has already made the shot:

https://api.drupal.org/comment/46528#comment-46528

Lukas von Blarer’s picture

Version: 6.x-1.15 » 8.x-1.x-dev

This issue still seems to exist. Can we provide a token for this?

Berdir’s picture

Yes, it exists, but it does so by design. "Fixing" it to work like you'd expect might break it for others that expect it.

The only solution would be to define a new token, something like [site:base]

Lukas von Blarer’s picture

True, this would make more sense. Should we use this issue or a new one for this?

kopeboy’s picture

This is true in Drupal 7 too, OMG! I've been using this wrong forever :/

This is so serious for Metatag module..

Lukas von Blarer’s picture

Title: [site-url] token shows language prefix » Provide a token for the site's base URL
Project: Token » Drupal core
Version: 8.x-1.x-dev » 8.5.x-dev
Component: Code » token system
Category: Support request » Feature request
Status: Active » Needs work
Issue tags: +Needs tests, +Needs issue summary update
FileSize
962 bytes

I tried to find the right place to fix this. The token contrib module doesn't seem to be providing the site tokens. Drupal core's system module provides them.

The attached patch fixes the issue for me. Three things are missing:

1) IS update

2) The other tokens add cachable dependencies:
$bubbleable_metadata->addCacheableDependency($result);
My patch doesn't for the new [site:base-url] token.

3) Test are missing.

For those that want to implement this in a custom module, here is a gist: https://gist.github.com/luksak/6e1d24e10be056a304b46ce77e90b71f

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

YurkinPark’s picture

Status: Needs work » Needs review
FileSize
960 bytes
436 bytes

I've checked your patch and realized that it doesn't work, i'm providing own.

weseze’s picture

Status: Needs review » Reviewed & tested by the community

Patch works perfectly. Can't believe this is not in core...

Krzysztof Domański’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
961 bytes
457 bytes

Missing dot in the description text.

Krzysztof Domański’s picture

Status: Needs review » Needs work

The last submitted patch, 19: core_base-url-token-1088112-19.patch, failed testing. View results

Krzysztof Domański’s picture

Improving test and bubbleable metadata.

$bubbleable_metadata->addCacheContexts(['url.site']);
Krzysztof Domański’s picture

Issue summary: View changes
Issue tags: -Needs tests, -Needs issue summary update

Update issue summary.

Krzysztof Domański’s picture

The description of the token [site:url] requires more details. The new and old token are very similar. It can be confusing. I suggest change the description of the old token [site:url].

diff --git a/core/modules/system/system.tokens.inc b/core/modules/system/system.tokens.inc
@@ -42,7 +42,7 @@ function system_token_info() {
   $site['url'] = [
     'name' => t("URL"),
-    'description' => t("The URL of the site's front page."),
+    'description' => t("The URL of the site's front page with the language prefix, if it exists."),
Kamil Jaszczuk’s picture

Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs usability review
+++ b/core/modules/system/system.tokens.inc
@@ -36,9 +36,13 @@ function system_token_info() {
+  $site['base-url'] = [
+    'name' => t("Base URL"),
+    'description' => t("The site's base URL."),
+  ];

+++ b/core/modules/system/tests/src/Kernel/Token/TokenReplaceKernelTest.php
@@ -103,6 +103,7 @@ public function testSystemSiteTokenReplacement() {
+    $tests['[site:base-url]'] = \Drupal::request()->getSchemeAndHttpHost();

The words base url are complex in Drupal. The problem is what the Symfony request thinks of as the base URL and what Drupal defines it as are different concepts. See \Drupal\Core\DrupalKernel::initializeRequestGlobals() and what's called $base_root and $base_url and how the base url global in Drupal is changed depending on the script location.

Especially as this is user-facing text we need to describe this differently. Maybe something based around the Symfony words of the scheme and HTTP host.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

mbovan’s picture

Status: Needs work » Needs review
FileSize
3.06 KB
2.89 KB

I have tried to address #25 by coming up with "Origin URL" term which sounds more user-friendly IMHO.

Anybody’s picture

+1 for #27!

Mohammed J. Razem’s picture

+1 for #27 in my opinion.
Since "location.origin" indicates protocol + domain name, to me it sounds descriptive to call it "Origin URL" [site:origin-url].

mrshowerman’s picture

Reroll of #27 against current 8.8.x; patch wasn't applying any more due to https://www.drupal.org/node/2731817

Ahmad Abbad’s picture

+1 for #30

Anybody’s picture

I agree with #29: To be consistent, it should be

"origin-url" instead of "url-origin" which would mix things up. Positive side-effect: All URL tokens are ordered below each other.

Krzysztof Domański’s picture

Issue summary: View changes
Issue tags: +Needs change record

1. I updated the issue summary according to recent comments (new token name).

2. We need a change record.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

mbovan’s picture

Title: Provide a token for the site's base URL » Introduce a token to get site's origin URL
Issue tags: -Needs change record

Prepared a change record at https://www.drupal.org/node/3092269.

mbovan’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs usability review

I triggered tests for #30 on 8.9.x branch all tests passed successfully.

Since many people, +1'd the latest changes regarding the token name I am going to remove "needs usability review" tag and RTBC it.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/system/system.tokens.inc
@@ -37,9 +37,13 @@ function system_token_info() {
-    'description' => t("The URL of the site's front page."),
+    'description' => t("The URL of the site's front page with the language prefix, if it exists."),

Doing a bit of thinking about this change. It's quite complicated because on multi-lingual sites where this is an issue what does actually mean? Which language and how it is determined.

Here's the list of site information URLs we have with core (name, token and description) - we now have both scheme and protocol describing essentially the same thing. Somehow all of these need to work together to make it is easy for the user to choose the correct one.

Login page	[site:login-url]	The URL of the site's login page.
Origin URL	[site:origin-url]	The scheme and HTTP host of the site.
URL	[site:url]	The URL of the site's front page with the language prefix, if it exists.
URL (brief)	[site:url-brief]	The URL of the site's front page without the protocol.

Another complicating factor is the fact that Drupal can be in a sub-directory and the Origin URL will not reflect that. I think the name and token need to replace that this is only the http-host and protocol/scheme. I don't think "Origin URL" quite covers that atm.

Maybe an alternative here would be to provide the HTTP_HOST only - minus the protocol/scheme. I'm pretty sure that's what people really wanted with the "URL (brief)" token and this way if people want to build URLs this will be flexible to provide the base for quite a few things. And it could be called "HTTP host" so it'd be very clear how it was different from everything else.

Berdir’s picture

> Doing a bit of thinking about this change. It's quite complicated because on multi-lingual sites where this is an issue what does actually mean? Which language and how it is determined.

Note that there is actually no change here, the only change is documenting the existing behavior. It defaults to the current URL language (like all links that don't provide the language explicitly) or the language provided to the token replace call. So for example for [site:url] in an password recovery e-mail is for the language of the user the e-mail is sent to.

Which makes it quite hard to explain, as the description is static and has no way of knowing what "the language" will be.

About base and original. I think the token *should* include the base url, and then IMHO site:base-url is still the better name. The example in the issue summary ( [site:url]/sites/default/files/og_image.jpg) does require the base path. Also, the site:url cache context that we use has this implementation:

$request->getSchemeAndHttpHost() . $request->getBaseUrl()

which is base url, so I think we should use the same implementation and name. Additionally, it also maps to Url::fromUri('base:sites/default/files/og_image.jpg').

alexpott’s picture

@Berdir great idea. +1

mbovan’s picture

Status: Needs work » Needs review
FileSize
2.9 KB
3.23 KB

Updated the patch according to the latest suggestions -> [site:base-url].

I was not sure whether we should use $request->getBaseUrl() or $request->getBasePath(). When you are on drupal.test/subdir/index.php/user/login, $request->getBaseUrl() will return /subdir/index.php which can produce unwanted results when this token is used in the mentioned example [site:base-url]sites/default/files/og_image.jpg.

However, the same URL is resolved with Url::fromUri('base:sites/default/files/og_image.jpg') so I followed the same behavior...

mbovan’s picture

Title: Introduce a token to get site's origin URL » Introduce a token to get site's base URL
Issue summary: View changes

Updated the issue summary and the change record https://www.drupal.org/node/3092269.

Berdir’s picture

Status: Needs review » Needs work
  1. +++ b/core/modules/system/system.tokens.inc
    @@ -135,11 +135,9 @@ function system_tokens($type, $tokens, array $data, array $options, BubbleableMe
    -        case 'origin-url':
    -          /** @var \Symfony\Component\HttpFoundation\Request $origin_url */
    -          $origin_url = \Drupal::request()->getSchemeAndHttpHost();
    +        case 'base-url':
               $bubbleable_metadata->addCacheContexts(['url.site']);
    -          $replacements[$original] = $origin_url;
    +          $replacements[$original] = \Drupal::request()->getSchemeAndHttpHost() . \Drupal::request()->getBaseUrl();
    

    Hm, the index.php thing is interesting. If Url::fromUri('base:') works the same way then maybe we should keep it consistent, but it does seem wrong as your example shows.

  2. +++ b/core/modules/system/tests/src/Kernel/Token/TokenReplaceKernelTest.php
    @@ -104,7 +104,7 @@ public function testSystemSiteTokenReplacement() {
         $tests['[site:url-brief]'] = preg_replace(['!^https?://!', '!/$!'], '', Url::fromRoute('<front>', [], $url_options)->toString());
    -    $tests['[site:origin-url]'] = \Drupal::request()->getSchemeAndHttpHost();
    +    $tests['[site:base-url]'] = \Drupal::request()->getSchemeAndHttpHost() . \Drupal::request()->getBaseUrl();
         $tests['[site:login-url]'] = Url::fromRoute('user.page', [], $url_options)->toString();
    

    This is a kernel test, so we should be able to hardcode what we expect exactly, afaik it's always going to be http://localhost. We could also simulate a base path by changing the request.

mbovan’s picture

Status: Needs work » Needs review
FileSize
4.09 KB
2.23 KB

Addressed #42.2.

mbovan’s picture

FileSize
4.2 KB
806 bytes

Added assertion for the cacheable metadata too.

Berdir’s picture

This looks good to me. The one remaining problem now is the getBaseUrl() vs getBasePath() thing, which is I think incorrectly implemented for Url::fromUri('base:') too. I'm not sure if we should add the likely wrong but consistent implementation here or use the correct one and open a follow-up to only fix for base:some/path.

There actually were bugs about base:, for example #2881999: Path to statistics.php is not correct when the path start with index.php, the "fix" there was to stop using base:, but maybe we should have fixed base: instead?

alexpott’s picture

I think we should prioritise what’s right. If base: is broken let’s fix it (in another issue). So let's make this work how a user would expect rather than being consistent with something that is a little bit borken.

Berdir’s picture

Status: Needs review » Needs work

Discussed with @alexpott. Lets implement it here without index.php in the path (lets also test that explicitly if possible), and open a follow-up to fix Url::fromUrl('base'), as part of that we could revert the statistics.php fix and we should have some test coverage already.

mbovan’s picture

I created a follow-up to fix URLs with base prefix #3099926: Fix base prefix when generating URLs if index.php is in the path and fixed the [site:base-url] token to exclude "index.php" if it is present in the path.

Additionally, I am uploading a test-only patch which adds test coverage for this case, created on top of #44.

The last submitted patch, 48: 1088112-48-TEST-ONLY.patch, failed testing. View results

Liam Morland’s picture

It seems to me that there should be both [site:base-url] (using Request::getBaseUrl()) and [site:base-path](using Request::getBasePath()). This doesn't work with what getBaseUrl() actually does.

Liam Morland’s picture

jungle’s picture

Fix coding standards, see https://www.drupal.org/pift-ci-job/1620405

  1. +++ b/core/modules/system/tests/src/Kernel/Token/TokenReplaceKernelTest.php
    @@ -7,6 +7,7 @@
      * Generates text using placeholders for dummy content to check token
    

    14 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph (Drupal.Commenting.DocComment.ShortSingleLine)

  2. +++ b/core/modules/system/tests/src/Kernel/Token/TokenReplaceKernelTest.php
    @@ -126,6 +129,28 @@ public function testSystemSiteTokenReplacement() {
    +    // Test [site:base-url] and [site:base-path] token with "index.php" in the path.
    

    148 | WARNING | Line exceeds 80 characters; contains 84 characters (Drupal.Files.LineLength.TooLong)

In fact, there are two more, but Drupal.org CI did not complain about it, so they are untouched.

Liam Morland’s picture

Re-roll. In #52, item 1 is in the existing code, so this patch does not touch it.

Please let me know if a version of this patch is required for 9.0.x.

slv_’s picture

Just confirming that #53 has been working well for me since I applied it a couple weeks ago on a production site.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Liam Morland’s picture

Liam Morland’s picture

Anas_maw’s picture

Patch in in #58 working fine for me

Liam Morland’s picture

@Anas_maw, feel free to mark this RTBC.

Anas_maw’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
22.78 KB

Working as expected

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
  1. +++ b/core/modules/system/system.tokens.inc
    @@ -24,6 +24,7 @@ function system_token_info() {
     
    
    @@ -131,6 +144,16 @@ function system_tokens($type, $tokens, array $data, array $options, BubbleableMe
    +        case 'base-path':
    +          $bubbleable_metadata->addCacheContexts(['url.site']);
    +          $replacements[$original] = \Drupal::request()->getBasePath();
    +          break;
    
    +++ b/core/modules/system/tests/src/Kernel/Token/TokenReplaceKernelTest.php
    @@ -126,6 +129,29 @@ public function testSystemSiteTokenReplacement() {
    +    $this->assertEquals('http://localhost/subdir', $this->tokenService->replace('[site:base-url]', [], ['langcode' => $this->interfaceLanguage->getId()], $bubbleable_metadata));
    +    $this->assertEquals('/subdir', $this->tokenService->replace('[site:base-path]', [], ['langcode' => $this->interfaceLanguage->getId()], $bubbleable_metadata));
    +    $this->assertEquals((new BubbleableMetadata())->addCacheContexts(['url.site']), $bubbleable_metadata);
    
  2. We have no test coverage to prove that base-path adds the correct cache. We only have coverage that both of them together add the cache context.
    +++ b/core/modules/system/system.tokens.inc
    @@ -37,9 +38,21 @@ function system_token_info() {
    +    'description' => t("The base URL of the site, currently: @scheme_and_http_post@base_path",
    +      [
    +        '@scheme_and_http_post' => \Drupal::request()->getSchemeAndHttpHost(),
    +        '@base_path' => $base_path,
    +      ]),
    

    I think we need to concatenate @scheme_and_http_post@base_path outside of the string. Ie.

      $site['base-url'] = [
        'name' => t("Base URL"),
        'description' => t("The base URL of the site, currently: @base_url",
          [
            '@base_url' => \Drupal::request()->getSchemeAndHttpHost() . $base_path,
          ]),
      ];
    

    That's because the current construction will make a replacement like this <em>scheme_and_http_post</e><em>base_path</em> - also scheme_and_http_post - post? :)

raman.b’s picture

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

tanubansal’s picture

Applied patch #63, Issues mentioned in #62 has been resolved
RTBC + 1

Ahmad Abbad’s picture

Patch in in #63 working fine for me

PCate’s picture

Status: Needs review » Reviewed & tested by the community

Patch applied to 8.9 and 9 and new token worked. I needed this for including urls in some emails.

Krzysztof Domański’s picture

Status: Reviewed & tested by the community » Needs work

Needs a re-roll.

ankithashetty’s picture

Rerolled the patch in #63, thanks!

Status: Needs review » Needs work

The last submitted patch, 69: 1088112-69.patch, failed testing. View results

Liam Morland’s picture

I have created an issue fork and merge request with the patch from #69.

vakulrai’s picture

Status: Needs work » Needs review

The Patch #69 is getting applied cleanly, but I have a finding:
The method\Drupal::request()->getBasePath(); is actually not taking care of A scenario if /index.php is there in the url like http://localhost/web/index.php returns '/web' should return /web, but actually its truncating that and returning empty string , and because of that

  +    $request = Request::create('/index.php/');
  +    $request->server->add($server);
  +    $request_stack->push($request);   +    $this->assertEquals('http://localhost/subdir', $this->tokenService->replace('[site:base-url]'));

is failing tests.

I think Symphony Symfony\Component\HttpFoundation\Request has a missing condition.

if (empty($basename) && !strpos(rawurldecode($truncatedRequestUri).'/', '/'.$basename.'/')) {
                // no match whatsoever; set it blank
                return '';
            }

Please review !
Thanks

mitthukumawat’s picture

The Patch #69 applied successfully and the site base URL token available now.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Liam Morland’s picture

Re-rolled for 9.3.x.

darvanen’s picture

Good candidate for review pending discussion regarding scope of this core module vs contrib token module.

rlnorthcutt’s picture

Note that we are recreating a similar thing for the Project Browser initiative, and I foresee this becoming more needed as we create more decoupled components.

https://www.drupal.org/project/project_browser/issues/3227738

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

darvanen’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll, +Needs change record updates

I've read the comments and the current version of the code, everything seems to be squared away except for:

  1. The fork needs to be rebased on 9.4.x
  2. The change record needs to be updated to mention both the new tokens rather than just one.

I'd be happy to push it to RTBC if those are complete.

JeroenT’s picture

I've updated the change record.

Only the author of the MR can change the target branch, so @Liam Morland should do this.

Liam Morland’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll, -Needs change record updates
darvanen’s picture

Status: Needs review » Reviewed & tested by the community

Ok, looks good to me, test coverage was increased earlier and all the feedback has been addressed as far as I can see.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

Setting to needs work to address the comment on the merge request.

JeroenT’s picture

Status: Needs work » Needs review

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

nod_’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

D10 version needed
At this time we need a D10.1.x patch or MR for this issue.

Patch or MR doesn't apply anymore
The last patch or MR doesn't apply to the target branch, please reroll the code so that it can be reviewed by the automated testbot.

Bhanu951’s picture

Assigned: Unassigned » Bhanu951
JeroenT’s picture

@Liam Morland, can you update the target branch to 10.1.x ?

Bhanu951’s picture

Assigned: Bhanu951 » Unassigned
Issue tags: -Needs reroll
Liam Morland’s picture

Status: Needs work » Needs review
darvanen’s picture

Status: Needs review » Reviewed & tested by the community

#84 has been addressed, as has #88. I'm having difficulty comparing the current state of the MR to what it was last time I made this RTBC because of the rebase, but the code looks good and tests are passing so I'm gonna call this RTBC again.

  • lauriii committed 84a67e9f on 10.1.x
    Issue #1088112 by Liam Morland, mbovan, Krzysztof Domański, JeroenT,...
lauriii’s picture

Status: Reviewed & tested by the community » Fixed

Committed 84a67e9 and pushed to 10.1.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.