Skip to content

Placeholder {tenantDomain} is not replaced with SPFX_SERVE_TENANT_DOMAIN #9010

@DenisChimbor

Description

@DenisChimbor

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

Windows

What browser(s) / client(s) have you tested

  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

Additional environment details

  • SPFx version 1.17.3
  • Node.js version 16.20.0

Describe the bug / error

When I run gulp serve the placeholder {tenantDomain} in serve.json is not replaced with SPFX_SERVE_TENANT_DOMAIN environment variable.

If I correctly understood the issue happens because placeholder case-sensitive.

In the file SpfxServeTask.js in the method _getPlaceHolderDomainName expression placeHolderDomainName.includes(TENANT_DOMAIN_PLACEHOLDER) retruns false because

  • placeHolderDomainName is https://{tenantdomain}/SitePages/myPage.aspx?...
  • but TENANT_DOMAIN_PLACEHOLDER is {tenantDomain} (different case).

Placeholder is changed from {tenantDomain} to {tenantdomain} in the method _convertServeConfigurationToPageUrl.

Steps to reproduce

  1. $env:SPFX_SERVE_TENANT_DOMAIN = "mydomain.sharepoint.com"
  2. gulp serve

Expected behavior

Placeholder {tenantDomain} is replaced with SPFX_SERVE_TENANT_DOMAIN environment variable value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:spfxCategory: SharePoint Framework (not extensions related)status:trackedCurrently tracked with Microsoft’s internal issue tracking system. DO NOT ADD/REMOVE (MSFT managed)type:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions