Skip to content

Commit

Permalink
@W-12277635@: bug fix - the value for urlPathPrefix in ExperienceBund…
Browse files Browse the repository at this point in the history
…le isn't valid (#176)

* W-12277635 : workaround for "The value for urlPathPrefix in ExperienceBundle isn't valid" error on scratch orgs

* self registration updates for B2B

* removing _B2B from profile since this only executes for B2C

* only remove urlPathPrefix in the catch block; fixed sequence of events with store deploy fails

* updated message on search index since dependency is no longer required
  • Loading branch information
sandragolden authored Jan 20, 2023
1 parent cc22d77 commit 6b2aa50
Showing 5 changed files with 101 additions and 78 deletions.
54 changes: 27 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ $ npm install -g @salesforce/commerce
$ sfdx COMMAND
running command...
$ sfdx (-v|--version|version)
@salesforce/commerce/244.0.1 darwin-x64 node-v16.13.2
@salesforce/commerce/244.0.6 darwin-x64 node-v16.16.0
$ sfdx --help [COMMAND]
USAGE
$ sfdx COMMAND
@@ -146,9 +146,9 @@ USAGE
[--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
-d, --outputdir=outputdir [default: ~/.commerce
/force-app] Directory to output the
conversion
-d, --outputdir=outputdir [default:
~/.commerce/force-app]
Directory to output the conversion
-f, --definitionfile=definitionfile (required) config file
@@ -172,7 +172,7 @@ EXAMPLE
sfdx commerce:examples:convert -f store-scratch-def.json
```

_See code: [src/commands/commerce/examples/convert.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.1/src/commands/commerce/examples/convert.ts)_
_See code: [src/commands/commerce/examples/convert.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.6/src/commands/commerce/examples/convert.ts)_

## `sfdx commerce:extension:map [-r <string>] [-n <string>] [-i <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`

@@ -207,7 +207,7 @@ EXAMPLES
sfdx commerce:extension:map --registered-extension-name test-extension-name --store-id test-store-id
```

_See code: [src/commands/commerce/extension/map.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.1/src/commands/commerce/extension/map.ts)_
_See code: [src/commands/commerce/extension/map.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.6/src/commands/commerce/extension/map.ts)_

## `sfdx commerce:extension:points:list [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`

@@ -234,7 +234,7 @@ EXAMPLE
sfdx commerce:extension:getEPN
```

_See code: [src/commands/commerce/extension/points/list.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.1/src/commands/commerce/extension/points/list.ts)_
_See code: [src/commands/commerce/extension/points/list.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.6/src/commands/commerce/extension/points/list.ts)_

## `sfdx commerce:extension:register [-r <string>] [-e <string>] [-a <string>] [-m <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`

@@ -276,7 +276,7 @@ EXAMPLE
--apex-class-name test-apex-class
```

_See code: [src/commands/commerce/extension/register.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.1/src/commands/commerce/extension/register.ts)_
_See code: [src/commands/commerce/extension/register.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.6/src/commands/commerce/extension/register.ts)_

## `sfdx commerce:extension:unmap [-r <string>] [-n <string>] [-i <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`

@@ -311,7 +311,7 @@ EXAMPLES
sfdx commerce:extension:unmap --registered-extension-name test-extension-name --store-id test-store-id
```

_See code: [src/commands/commerce/extension/unmap.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.1/src/commands/commerce/extension/unmap.ts)_
_See code: [src/commands/commerce/extension/unmap.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.6/src/commands/commerce/extension/unmap.ts)_

## `sfdx commerce:files:copy [name=value...] --filestocopy <array> --dirstocopy <array> --copysourcepath <string> [-y] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`

@@ -352,7 +352,7 @@ EXAMPLES
"dir1,dir2,dir3"
```

_See code: [src/commands/commerce/files/copy.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.1/src/commands/commerce/files/copy.ts)_
_See code: [src/commands/commerce/files/copy.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.6/src/commands/commerce/files/copy.ts)_

## `sfdx commerce:payments:quickstart:setup -n <string> [-p <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`

@@ -384,7 +384,7 @@ EXAMPLE
sfdx commerce:payments:quickstart:setup -p Stripe -n 1commerce
```

_See code: [src/commands/commerce/payments/quickstart/setup.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.1/src/commands/commerce/payments/quickstart/setup.ts)_
_See code: [src/commands/commerce/payments/quickstart/setup.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.6/src/commands/commerce/payments/quickstart/setup.ts)_

## `sfdx commerce:products:import -n <string> [-c <string>] [-f <filepath>] [-o <string>] [-y] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`

@@ -397,15 +397,15 @@ USAGE
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
-c, --products-file-csv=products-file-csv [default: ~/.commerce
/examples/csv/Alpine-small.csv] The
-c, --products-file-csv=products-file-csv [default: ~/.commerce/e
xamples/csv/Alpine-small.csv] The
csv file containing products to
import. Pass in empty value to do
product-less import
-f, --definitionfile=definitionfile [default: ~/.commerce
/config/store-scratch-def.json]
config file
-f, --definitionfile=definitionfile [default: ~/.commerce/c
onfig/store-scratch-def.json] config
file
-n, --store-name=store-name (required) [default: 1commerce] name
of the site to create
@@ -435,7 +435,7 @@ EXAMPLE
sfdx commerce:products:import --store-name test-store
```

_See code: [src/commands/commerce/products/import.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.1/src/commands/commerce/products/import.ts)_
_See code: [src/commands/commerce/products/import.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.6/src/commands/commerce/products/import.ts)_

## `sfdx commerce:scratchorg:create [-u <string>] [-a <string>] [-t <string>] [-w <number>] [-y] [-v <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`

@@ -475,7 +475,7 @@ EXAMPLE
sfdx commerce:scratchorg:create --username demo@1commerce.com --targetdevhubusername ceo@mydevhub.com
```

_See code: [src/commands/commerce/scratchorg/create.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.1/src/commands/commerce/scratchorg/create.ts)_
_See code: [src/commands/commerce/scratchorg/create.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.6/src/commands/commerce/scratchorg/create.ts)_

## `sfdx commerce:search:start [-n <string> | -i <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`

@@ -506,7 +506,7 @@ EXAMPLE
// Finds a store and indexes it
```

_See code: [src/commands/commerce/search/start.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.1/src/commands/commerce/search/start.ts)_
_See code: [src/commands/commerce/search/start.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.6/src/commands/commerce/search/start.ts)_

## `sfdx commerce:store:create [name=value...] -n <string> [-t <string>] [-f <filepath>] [-o <string>] [-b <string>] [-y] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`

@@ -554,7 +554,7 @@ EXAMPLE
sfdx commerce:store:create --store-name test-store
```

_See code: [src/commands/commerce/store/create.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.1/src/commands/commerce/store/create.ts)_
_See code: [src/commands/commerce/store/create.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.6/src/commands/commerce/store/create.ts)_

## `sfdx commerce:store:display -n <string> [-b <string>] [-p <string>] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`

@@ -595,7 +595,7 @@ EXAMPLE
sfdx commerce:store:display --store-name test-store
```

_See code: [src/commands/commerce/store/display.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.1/src/commands/commerce/store/display.ts)_
_See code: [src/commands/commerce/store/display.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.6/src/commands/commerce/store/display.ts)_

## `sfdx commerce:store:open -n <string> [--all] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`

@@ -634,7 +634,7 @@ EXAMPLES
sfdx commerce:store:open --all
```

_See code: [src/commands/commerce/store/open.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.1/src/commands/commerce/store/open.ts)_
_See code: [src/commands/commerce/store/open.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.6/src/commands/commerce/store/open.ts)_

## `sfdx commerce:store:quickstart:create [name=value...] -n <string> [-t <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`

@@ -667,7 +667,7 @@ EXAMPLE
sfdx commerce:store:quickstart:create --templatename 'b2c-lite-storefront'
```

_See code: [src/commands/commerce/store/quickstart/create.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.1/src/commands/commerce/store/quickstart/create.ts)_
_See code: [src/commands/commerce/store/quickstart/create.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.6/src/commands/commerce/store/quickstart/create.ts)_

## `sfdx commerce:store:quickstart:setup [name=value...] -n <string> [-f <filepath>] [-y] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`

@@ -679,9 +679,9 @@ USAGE
[--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
-f, --definitionfile=definitionfile [default: ~/.commerce
/config/store-scratch-def.json]
config file
-f, --definitionfile=definitionfile [default: ~/.commerce/c
onfig/store-scratch-def.json] config
file
-n, --store-name=store-name (required) [default: 1commerce] name
of the site to create
@@ -708,7 +708,7 @@ EXAMPLE
sfdx commerce:store:quickstart:setup --definitionfile store-scratch-def.json
```

_See code: [src/commands/commerce/store/quickstart/setup.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.1/src/commands/commerce/store/quickstart/setup.ts)_
_See code: [src/commands/commerce/store/quickstart/setup.ts](https://github.com/forcedotcom/commerce-on-lightning/blob/v244.0.6/src/commands/commerce/store/quickstart/setup.ts)_

<!-- commandsstop -->
<!-- debugging-your-plugin -->
5 changes: 4 additions & 1 deletion messages/store.json
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@
"errorStoreQuickstartSetupFailed": "StoreQuickstartSetup failed",
"assigningShopperProfileToBuyer": "Assigning Shopper profile to the buyer user",
"changingPasswordForBuyer": "Changing password for the buyer user",
"createSearchIndexInfo": "Creating search index. You need %s plugin installed for this to work.",
"createSearchIndexInfo": "Creating search index",
"configFileDescription": "Store config file",
"storeTypeDescription": "The type of store you want to create"
},
@@ -60,6 +60,9 @@
"completedQuickstartSetup": "Completed Quickstart Setup",
"usingToRetrieveStoreInfo": "Using this to retrieve your store info: \n%s",
"getStoreMetadatFromZip": "Retrieving the store metadata and extracting it from the zip file.",
"removeUrlPathPrefix": "Removing \"urlPathPrefix\" from '%s'",
"updateSelfRegProfile": "Updating Self Registration Profile",
"urlPathPrefixDeployError": "The value for urlPathPrefix in ExperienceBundle isn't valid",
"setUpIntegrations": "Setting up your integrations",
"regAndMapIntegrations": "Registering and mapping integrations",
"doneRegAndMapIntegrations": "Done registering and mapping integrations",
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@salesforce/commerce",
"version": "244.0.1",
"version": "244.0.6",
"author": "Jonathan Arndt",
"bugs": "https://github.com/forcedotcom/commerce-on-lightning/issues",
"dependencies": {
4 changes: 1 addition & 3 deletions src/commands/commerce/store/create.ts
Original file line number Diff line number Diff line change
@@ -446,9 +446,7 @@ export class StoreCreate extends SfdxCommand {

private async createSearchIndex(): Promise<void> {
if ((await this.statusFileManager.getValue('indexCreated')) === 'true') return;
this.ux.log(
msgs.getMessage('create.createSearchIndexInfo', ['https://github.com/forcedotcom/sfdx-1commerce-plugin'])
);
this.ux.log(msgs.getMessage('create.createSearchIndexInfo'));
await SearchIndex.run(addAllowedArgs(this.argv, SearchIndex), this.config);
// TODO check if index was created successfully, all i can do is assume it was
await this.statusFileManager.setValue('indexCreated', true);
Loading

0 comments on commit 6b2aa50

Please sign in to comment.