Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sf community create should not require a url-path-prefix since that is not required by Salesforce #2005

Closed
peterTrifecta opened this issue Mar 20, 2023 · 7 comments
Labels
bug Issue or pull request that identifies or fixes a bug plugin-community https://github.com/salesforcecli/plugin-community

Comments

@peterTrifecta
Copy link

https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_community_commands_unified.htm#cli_reference_community_create_unified

When I run an sf community create command without an --url-path-prefix or with --url-path-prefix "" I get errors.

without --url-path-prefix gives me Missing required flag url-path-prefix
--url-path-prefix "" gives me Error (1): Enter a URL for your site.

The problem is that it is perfectly legitimate to not have a url-prefix on a community in a scratch org.

I am able to successfully run sfdx force:community:create and pass --url-path-prefix "".

@peterTrifecta peterTrifecta added the investigating We're actively investigating this issue label Mar 20, 2023
@github-actions
Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@mshanemc mshanemc added the bug Issue or pull request that identifies or fixes a bug label Mar 21, 2023
@git2gus
Copy link

git2gus bot commented Mar 21, 2023

This issue has been linked to a new work item: W-12726772

@mshanemc mshanemc added the plugin-community https://github.com/salesforcecli/plugin-community label Mar 21, 2023
@mshanemc
Copy link
Contributor

mshanemc commented Mar 21, 2023

Hey. I tried removing the required property of the flag, and the communities REST api that the command calls always throws if the url prefix is missing.

I think you're right, according to the docs, but not according to what the API will actually accept.

If this is important to you, open a salesforce case so that API gets fixed.

@mshanemc mshanemc removed the investigating We're actively investigating this issue label Mar 21, 2023
@peterTrifecta
Copy link
Author

Well, can the REST API accept an empty string?

This command work for me:
sfdx force:community:create --name "mystore" --template-name "B2C Commerce (LWR)" --url-path-prefix "" --description "Store mystore created by script."

The change to the new "sf community create" command broke that behavior of allowing --url-path-prefix "". Trying to pass -url-path-prefix "" should work with the new "sf community create" and it doesn't. That's the bug, I believe.

@iowillhoit iowillhoit reopened this Mar 22, 2023
@iowillhoit
Copy link
Contributor

Hey @peterTrifecta, I will give this a try and report back

@iowillhoit
Copy link
Contributor

Thanks for the followup @peterTrifecta, this was a regression! I got a quick fix in.
You can install it now with sfdx plugins install @salesforce/plugin-community (version 2.2.8) or wait until Thursday for it to be include in the latest-rc of sfdx

@cristiand391
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug plugin-community https://github.com/salesforcecli/plugin-community
Projects
None yet
Development

No branches or pull requests

4 participants