cli fails to start if site contains single quote (missing escaping?)
@nrkruk is already working on this.
Since Oct 23, 2024.
Assessment
This issue has not been assessed yet.
Description
sf lightning dev site fails if digital experience site contains single quote:
Short summary of what is going on or to provide context.
Steps To Reproduce:
- Create a new Digital experience and include single quote: for example name it "my daughter's test" and complete the setup
- run
sf lightning dev site - Choose the newly create site from step 1 and continue with starting the dev server
Expected Result
Local dev server starts as expected with the selected context that includes the single quote in the name
Actual Result
The sf cli command fails and exits.
Additional Information
[local-dev] initializing: my daughter's test
Local Development setup failed MALFORMED_QUERY:
Name LIKE 'MRT_experience_%_my_daughter's_test'
^
ERROR at Row:1:Column:91
unexpected token: 's_test'
at HttpApi.getError (C:\Users\<hide>\AppData\Local\sf\node_modules\@salesforce\plugin-lightning-dev\node_modules\@jsforce\jsforce-node\lib\http-api.js:290:56)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async C:\Users\<hide>\AppData\Local\sf\node_modules\@salesforce\plugin-lightning-dev\node_modules\@jsforce\jsforce-node\lib\http-api.js:127:33
at async Query._execute (C:\Users\<hide>\AppData\Local\sf\node_modules\@salesforce\plugin-lightning-dev\node_modules\@jsforce\jsforce-node\lib\query.js:373:22)
at async C:\Users\<hide>\AppData\Local\sf\node_modules\@salesforce\plugin-lightning-dev\node_modules\@jsforce\jsforce-node\lib\query.js:305:17 {
data: {
message: '\n' +
"Name LIKE 'MRT_experience_%_my_daughter's_test'\n" +
' ^\n' +
'ERROR at Row:1:Column:91\n' +
"unexpected token: 's_test'",
errorCode: 'MALFORMED_QUERY'
},
errorCode: 'MALFORMED_QUERY'
Screenshots:
Logs:
N/A
System Information
SF CLI:
{
"architecture": "win32-x64",
"cliVersion": "@salesforce/cli/2.60.13",
"nodeVersion": "node-v20.17.0",
"osVersion": "Windows_NT 10.0.22631",
"rootPath": "C:\\Users\\<hide>\\AppData\\Local\\nvs\\node\\20.17.0\\x64\\node_modules\\@salesforce\\cli",
"shell": "C:\\Program Files\\Git\\usr\\bin\\bash.exe",
"pluginVersions": [
"@oclif/plugin-autocomplete 3.2.4 (core)",
"@oclif/plugin-commands 4.0.15 (core)",
"@oclif/plugin-help 6.2.12 (core)",
"@oclif/plugin-not-found 3.2.21 (core)",
"@oclif/plugin-plugins 5.4.9 (core)",
"@oclif/plugin-search 1.2.9 (core)",
"@oclif/plugin-update 4.5.9 (core)",
"@oclif/plugin-version 2.2.13 (core)",
"@oclif/plugin-warn-if-update-available 3.1.17 (core)",
"@oclif/plugin-which 3.2.14 (core)",
"@salesforce/cli 2.60.13 (core)",
"apex 3.4.10 (core)",
"api 1.2.2 (core)",
"auth 3.6.62 (core)",
"data 3.6.7 (core)",
"deploy-retrieve 3.12.11 (core)",
"devops-center 1.2.23 (user) published 36 days ago (Sun Sep 15 2024) (latest is 1.2.24)",
"functions 1.23.0 (user) published 229 days ago (Tue Mar 05 2024)",
"info 3.4.9 (core)",
"lightning-dev 1.9.0 (user) published 9 days ago (Fri Oct 11 2024)",
"limits 3.3.32 (core)",
"marketplace 1.2.26 (core)",
"org 4.5.10 (core)",
"packaging 2.8.11 (user) published 15 days ago (Sat Oct 05 2024) (latest is 2.8.12)",
"schema 3.3.32 (core)",
"settings 2.3.21 (core)",
"signups 2.5.18 (user) published 29 days ago (Sat Sep 21 2024) (latest is 2.5.23)",
"sobject 1.4.38 (core)",
"source 3.5.21 (core)",
"telemetry 3.6.15 (core)",
"templates 56.3.21 (core)",
"trust 3.7.31 (core)",
"user 3.5.31 (core)",
"@salesforce/sfdx-plugin-lwc-test 1.2.0 (user) published 229 days ago (Wed Mar 06 2024) (latest is 1.2.1)",
"@salesforce/sfdx-scanner 4.6.0 (user) published 26 days ago (Tue Sep 24 2024)"
]
}
OS:
Windows 11
Experience Sites Only:
PASTE_runtime-info.json_HERE
- Dominant language
- TypeScript
- Stars
- 19
- Forks
- 19
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from salesforcecli/plugin-lightning-dev
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
salesforcecli/plugin-lightning-dev#686 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
salesforcecli/plugin-lightning-dev#627 · 2 comments · 1 reaction ·
-
BUG P2
Difficulty 3/5 1-2 days Newbie friendliness 45/100
salesforcecli/plugin-lightning-dev#544 · 4 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
salesforcecli/plugin-lightning-dev#456 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in salesforcecli/plugin-lightning-dev
Similar issues
-
Type/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OpenNSW/nsw-srilanka#497 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
0xMiden/bridge-portal#132 ·
-
react-doctor severity:warning tech-debt
Difficulty 1/5 Under an hour Newbie friendliness 88/100
digidem/comapeo-cloud-app#403 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100