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

Improved error messaging needed with missing id in references.yaml #933

Open
1 task done
Erin-Cecele opened this issue May 29, 2024 · 0 comments
Open
1 task done
Assignees
Labels
cli This is an issue with the quire-cli package in general status:triage needed Issue needs to be triaged by the Quire team. This label is automatically applied to new issues.

Comments

@Erin-Cecele
Copy link
Collaborator

Before proceeding, make sure there isn’t an existing issue for this bug.

  • I have searched the existing issues and determined this is a new bug.

Expected Behavior

If an id value is null in references.yaml, Quire should output a helpful error message and leave the citation unprocessed.

Actual Behavior

Instead, you don't receive an error message until adding citation shortcodes, and even then you just receive an obscure and vague error message that makes it hard to determine the root cause.

Steps to Reproduce

  1. create a references.yaml file
  2. leave one of the id blank
  3. add a citation shortcode
  4. run quire preview

Version Numbers

[ancient-glass]
quire-cli 1.0.0-rc.11
quire-11ty 1.0.0-rc.16
starter https://github.com/thegetty/[email protected]
[System]
quire-cli 1.0.0-rc.11
node v18.17.0
npm 9.6.7
os Darwin 21.6.0

Web Browser

Chrome but this is irrelevant to the issue

Relevant Terminal/Shell Output

[11ty] Problem writing Eleventy templates: (more in DEBUG output)
[11ty] 1. Having trouble rendering liquid template ./content/history.md (via TemplateContentRenderError)
[11ty] 2. Cannot read properties of null (reading 'localeCompare'), file:./content/history.md, line:32, col:572 (via RenderError)
[11ty] 3. Cannot read properties of null (reading 'localeCompare') (via TypeError)
[11ty] 
[11ty] Original error stack trace: TypeError: Cannot read properties of null (reading 'localeCompare')
[11ty]     at /Users/edunigan/GitHub/ancient-glass/_plugins/shortcodes/cite.js:81:25
[11ty]     at Array.find (<anonymous>)
[11ty]     at findCitationReference (/Users/edunigan/GitHub/ancient-glass/_plugins/shortcodes/cite.js:80:29)
[11ty]     at Object.<anonymous> (/Users/edunigan/GitHub/ancient-glass/_plugins/shortcodes/cite.js:92:22)
[11ty]     at Object.<anonymous> (/Users/edunigan/GitHub/ancient-glass/_plugins/components/shortcodeFactory.js:17:75)
[11ty]     at Object.<anonymous> (/Users/edunigan/GitHub/ancient-glass/node_modules/@11ty/eleventy/src/BenchmarkGroup.js:32:26)
[11ty]     at Tag.render (/Users/edunigan/GitHub/ancient-glass/node_modules/@11ty/eleventy/src/Engines/Liquid.js:170:39)
[11ty]     at render.next (<anonymous>)
[11ty]     at toPromise (/Users/edunigan/GitHub/ancient-glass/node_modules/liquidjs/dist/liquid.node.cjs.js:479:32)
[11ty]     at async toPromise (/Users/edunigan/GitHub/ancient-glass/node_modules/liquidjs/dist/liquid.node.cjs.js:487:25)
[11ty] Wrote 0 files in 11.61 seconds (v2.0.1)


### Supporting Information

_No response_
@Erin-Cecele Erin-Cecele added status:triage needed Issue needs to be triaged by the Quire team. This label is automatically applied to new issues. cli This is an issue with the quire-cli package in general labels May 29, 2024
@Erin-Cecele Erin-Cecele self-assigned this May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli This is an issue with the quire-cli package in general status:triage needed Issue needs to be triaged by the Quire team. This label is automatically applied to new issues.
Projects
None yet
Development

No branches or pull requests

1 participant