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

widget: "string" - when entering single line text and saving, text in yml frontmatter splitting over 2 lines in error! #6444

Open
andisaba opened this issue Apr 22, 2022 · 0 comments
Labels
type: bug code to address defects in shipped code

Comments

@andisaba
Copy link

andisaba commented Apr 22, 2022

My CMS is functioning as expected with the exception of the following issue:

When entering text in the title widget as a single line and saving, the preview pane display a single line, however when deployed the line is being split over 2 lines, in the frontmatter, in error as shown:

1 ---
2 title: AFTER HOURS... No Problem! | Call us NOW for Rapid Response to your
3 Plumbing Emergency!
4 message: false
5 ---

Q: Is there a limit to the length of the string widget?
I have tried using Text widget with same result!

Describe the bug
When entering text in title widget: string and publishing, the text is saving in markdown frontmatter over 2 lines in error as shown here:

1 ---
2 title: AFTER HOURS... No Problem! | Call us NOW for Rapid Response to your
3 Plumbing Emergency!
4 message: true
5 ---

To Reproduce

Expected behavior
when saving and publishing, the string should remain on one line as shown here:
1 ---
2 title: AFTER HOURS... No Problem! | Call us NOW for Rapid Response to your Plumbing Emergency!
3 message: true
4 ---

Screenshots

Applicable Versions:

  • Netlify CMS version: 2.10.192
  • Git provider: GitHub
  • OS: mac OS
  • Browser version google Chrome: Version 100.0.4896.127
  • Node.JS version: v16.14.0

CMS configuration
The offending widget in config.yml is:

  • label: "Emergency Plumbing"
    name: "emergency"
    files:
    - label: "Emergency Attention Message"
    name: "emergency-attention-message"
    file: "src/markdown/emergency-attention-message.md"
    fields:
    - {label: "Attention Message", name: "title", widget: "string"}
    - {label: "Show Message", hint: "Toggle switch to Show or Hide attention message", name: "message", widget: "boolean", default: true}

hopefully you can provide some insight into this problem or at least advise me what I am doing wrong!

thanks!

@andisaba andisaba added the type: bug code to address defects in shipped code label Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

No branches or pull requests

1 participant