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

cli fails to start if site contains single quote (missing escaping?) #210

Open
thesunlover opened this issue Oct 21, 2024 · 1 comment
Open
Assignees
Labels

Comments

@thesunlover
Copy link

thesunlover commented Oct 21, 2024

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:

  1. Create a new Digital experience and include single quote: for example name it "my daughter's test" and complete the setup
  2. run sf lightning dev site
  3. 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
@nrkruk nrkruk added the BUG P3 label Oct 23, 2024
@nrkruk nrkruk self-assigned this Oct 23, 2024
Copy link

git2gus bot commented Oct 23, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants