Issue: Slug field gets erased in Front Matter CMS when focusing on Markdown #641

Closed
opened 2026-10-05 02:58:02 +02:00 by adam · 11 comments
Owner

Describe the bug
When Front Matter CMS obtains focus while a Markdown file is open, even though fields are properly filled, it tends to erase the slug, resulting in the file being modified.

To Reproduce
Steps to reproduce the behavior:

  1. Open a Markdown file with filled fields.
  2. Open the lateral panel of Front Matter CMS.
  3. Observe that the slug field is erased and quotation marks are added:
    ---
    ...
    - slug: ""
    ...
    ---
    

Expected behavior
The file should remain unchanged, but properties should be loaded in the Metadata section.

Desktop (please complete the following information):

  • OS: macOS Sonoma (Apple Silicon)
  • Browser: Not applicable
  • Version: v10.1.0

Smartphone (please complete the following information):

  • Device: Not applicable
  • OS: Not applicable
  • Browser: Not applicable
  • Version: Not applicable
**Describe the bug** When Front Matter CMS obtains focus while a Markdown file is open, even though fields are properly filled, it tends to erase the slug, resulting in the file being modified. **To Reproduce** Steps to reproduce the behavior: 1. Open a Markdown file with filled fields. 2. Open the lateral panel of Front Matter CMS. 3. Observe that the slug field is erased and quotation marks are added: ```yaml --- ... - slug: "" ... --- ``` **Expected behavior** The file should remain unchanged, but properties should be loaded in the Metadata section. **Desktop (please complete the following information):** - OS: macOS Sonoma (Apple Silicon) - Browser: Not applicable - Version: v10.1.0 **Smartphone (please complete the following information):** - Device: Not applicable - OS: Not applicable - Browser: Not applicable - Version: Not applicable <!-- github-sync-id:2315531082 -->
adam closed this issue 2026-10-05 02:58:02 +02:00
Author
Owner

Thanks, @steelcoder, for opening an issue. This should not be happening indeed, can you share a bit more information, like your configuration and page contents or project/repo? That way I can try to reproduce it on my end to check what is going on.

Thanks, @steelcoder, for opening an issue. This should not be happening indeed, can you share a bit more information, like your configuration and page contents or project/repo? That way I can try to reproduce it on my end to check what is going on. <!-- github-comment-id:2129657112 -->
Author
Owner

Dear Elio,

Thank you for your prompt response. I'd be happy to provide more details
about our setup to help diagnose the issue.

We use a custom tool to package and publish, and our articles have the
following structure:

  • - .frontmatter - -
    .md (type: default) - doc -
    (doc).md (type: doc)

For your reference, I am attaching our configuration file (JSON format) to
this email.

Please let me know if you need any further information or clarification.

Regards,

Yoann.

Le ven. 24 mai 2024 à 16:24, Elio Struyf @.***> a
écrit :

Thanks, @steelcoder https://github.com/steelcoder, for opening an
issue. This should not be happening indeed, can you share a bit more
information, like your configuration and page contents or project/repo?
That way I can try to reproduce it on my end to check what is going on.

—
Reply to this email directly, view it on GitHub
https://github.com/estruyf/vscode-front-matter/issues/813#issuecomment-2129657112,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAILI2SZZ6VSMVGBHNNFQODZD5ETDAVCNFSM6AAAAABIHVR4G2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRZGY2TOMJRGI
.
You are receiving this because you were mentioned.Message ID:
@.***>

--
Yoann PANTIC

Dear Elio, Thank you for your prompt response. I'd be happy to provide more details about our setup to help diagnose the issue. We use a custom tool to package and publish, and our articles have the following structure: - <workspace> - .frontmatter - <one directory per article> - <article title>.md (type: default) - doc - <article title> (doc).md (type: doc) For your reference, I am attaching our configuration file (JSON format) to this email. Please let me know if you need any further information or clarification. Regards, Yoann. Le ven. 24 mai 2024 à 16:24, Elio Struyf ***@***.***> a écrit : > Thanks, @steelcoder <https://github.com/steelcoder>, for opening an > issue. This should not be happening indeed, can you share a bit more > information, like your configuration and page contents or project/repo? > That way I can try to reproduce it on my end to check what is going on. > > — > Reply to this email directly, view it on GitHub > <https://github.com/estruyf/vscode-front-matter/issues/813#issuecomment-2129657112>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AAILI2SZZ6VSMVGBHNNFQODZD5ETDAVCNFSM6AAAAABIHVR4G2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRZGY2TOMJRGI> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> > -- Yoann PANTIC <!-- github-comment-id:2129774159 -->
Author
Owner

@steelcoder, it seems that the attachment has been removed. It would be better to reply to the GitHub issue itself.

Besides that, would you be able to record a short video to see what the behavior is?

@steelcoder, it seems that the attachment has been removed. It would be better to reply to the GitHub issue itself. Besides that, would you be able to record a short video to see what the behavior is? <!-- github-comment-id:2129789568 -->
Author
Owner

{
"$schema": "https://frontmatter.codes/frontmatter.schema.json",
"frontMatter.taxonomy.contentTypes": [
{
"name": "default",
"defaultFileName": "article",
"filePrefix": null,
"pageBundle": true,
"previewPath": null,
"postScript": "create-structure",
"fields": [
{
"title": "Title",
"name": "title",
"type": "string",
"required": true,
"description": "SEO Title of the Article"
},
{
"title": "Slug",
"name": "slug",
"type": "slug",
"editable": true,
"default": "{{slug}}",
"required": true,
"description": "Website Article Path (Only lowercase a-z, 0-9 and hyphens)"
},
{
"title": "Description",
"name": "description",
"type": "string",
"required": true,
"description": "SEO Description of the Article"
},
{
"title": "Focus Keywords",
"name": "focus_keywords",
"type": "string",
"description": "Keywords to Find the Post (Keep Empty to Auto-Generate)"
},
{
"title": "Featured Media",
"name": "featured_media",
"type": "image",
"required": true,
"description": "Highlighted Visual Content"
},
{
"title": "Featured Media Description",
"name": "featured_media_description",
"type": "string",
"description": "Featured Media Description (Takes Priority Over Media Library)"
},
{
"title": "Featured Media Title",
"name": "featured_media_title",
"type": "string",
"description": "Featured Media Title (Keep Empty to Auto-Generate)"
},
{
"title": "Categories",
"name": "categories",
"type": "categories",
"taxonomyLimit": 1,
"required": true
},
{
"title": "Tags",
"name": "tags",
"type": "tags",
"description": "Select All Relevant Tags for the Article"
},
{
"title": "keywords",
"name": "keywords",
"type": "list",
"description": "Most Relevant Keywords for SEO Ordered By Importance"
},
{
"title": "Author",
"name": "author",
"type": "choice",
"default": "8",
"required": true,
"choices": [
{
"id": "8",
"title": "Author 1"
},
{
"id": "9",
"title": "Author 2"
}
],
"description": "Author ID of the Article on the Website"
},
{
"title": "Status",
"name": "status",
"type": "draft",
"default": "draft",
"required": true
},
{
"title": "Publish Date",
"name": "published",
"type": "datetime",
"isPublishDate": true,
"when": {
"fieldRef": "status",
"operator": "eq",
"value": "published"
}
},
{
"title": "Language",
"name": "lang",
"type": "choice",
"choices": [
"fr",
"en"
],
"default": "fr",
"required": true
}
]
},
{
"name": "doc",
"filePrefix": null,
"pageBundle": false,
"previewPath": null,
"fields": [
{
"title": "type",
"name": "type",
"type": "string",
"default": "doc",
"hidden": true
},
{
"title": "Language",
"name": "lang",
"type": "choice",
"choices": [
"fr",
"en"
],
"default": "fr",
"required": true
}
]
}
],
"frontMatter.file.preserveCasing": true,
"frontMatter.taxonomy.seoDescriptionLength": 120,
"frontMatter.framework.id": "other",
"frontMatter.content.publicFolder": "",
"frontMatter.taxonomy.dateFormat": "yyyy-MM-dd",
"frontMatter.content.draftField": {
"name": "status",
"type": "choice",
"choices": [
"draft",
"packaged",
"published"
]
},
"frontMatter.content.pageFolders": [
{
"title": "Ecostylia",
"path": "workspace",
"contentTypes": [
"default"
]
}
],
"frontMatter.dashboard.openOnStart": false,
"frontMatter.sponsors.ai.enabled": false,
"frontMatter.custom.scripts": [
{
"id": "create-structure",
"title": "Create Doc & Glossary",
"script": "./.frontmatter/config/custom/scripts/create-structure.js",
"command": "node"
},
{
"title": "Create media.xlsx from the post",
"command": "node",
"script": "./.frontmatter/config/custom/scripts/import-media-from-md.js"
},
{
"title": "Update Media Library from media.xlsx",
"command": "node",
"script": "./.frontmatter/config/custom/scripts/update-media-db-from-media-list.js"
},
{
"title": "Package",
"command": "bash",
"script": "./.frontmatter/config/custom/scripts/launch-package.sh",
"environments": [
{
"type": "windows",
"command": "powershell",
"script": "./.frontmatter/config/custom/scripts/launch-package.ps1"
}
]
},
{
"title": "Publish & Notify",
"command": "bash",
"script": "./.frontmatter/config/custom/scripts/launch-publish-notify.sh",
"environments": [
{
"type": "windows",
"command": "powershell",
"script": "./.frontmatter/config/custom/scripts/launch-publish-notify.ps1"
}
]
},
{
"title": "Publish",
"command": "bash",
"script": "./.frontmatter/config/custom/scripts/launch-publish.sh",
"environments": [
{
"type": "windows",
"command": "powershell",
"script": "./.frontmatter/config/custom/scripts/launch-publish.ps1"
}
]
}
],
"frontMatter.snippets.wrapper.enabled": false,
"frontMatter.content.snippets": {
"Embed": {
"description": "",
"body": [
"block", "type: embed", "url: [[&url]]", "caption: \"[[caption]]\"", ""
],
"fields": [
{
"name": "url",
"title": "Url",
"type": "string",
"required": true,
"single": true
},
{
"name": "caption",
"title": "caption",
"type": "string",
"required": false,
"default": ""
}
],
"isMediaSnippet": false
}
}
}

{ "$schema": "https://frontmatter.codes/frontmatter.schema.json", "frontMatter.taxonomy.contentTypes": [ { "name": "default", "defaultFileName": "article", "filePrefix": null, "pageBundle": true, "previewPath": null, "postScript": "create-structure", "fields": [ { "title": "Title", "name": "title", "type": "string", "required": true, "description": "SEO Title of the Article" }, { "title": "Slug", "name": "slug", "type": "slug", "editable": true, "default": "{{slug}}", "required": true, "description": "Website Article Path (Only lowercase a-z, 0-9 and hyphens)" }, { "title": "Description", "name": "description", "type": "string", "required": true, "description": "SEO Description of the Article" }, { "title": "Focus Keywords", "name": "focus_keywords", "type": "string", "description": "Keywords to Find the Post (Keep Empty to Auto-Generate)" }, { "title": "Featured Media", "name": "featured_media", "type": "image", "required": true, "description": "Highlighted Visual Content" }, { "title": "Featured Media Description", "name": "featured_media_description", "type": "string", "description": "Featured Media Description (Takes Priority Over Media Library)" }, { "title": "Featured Media Title", "name": "featured_media_title", "type": "string", "description": "Featured Media Title (Keep Empty to Auto-Generate)" }, { "title": "Categories", "name": "categories", "type": "categories", "taxonomyLimit": 1, "required": true }, { "title": "Tags", "name": "tags", "type": "tags", "description": "Select All Relevant Tags for the Article" }, { "title": "keywords", "name": "keywords", "type": "list", "description": "Most Relevant Keywords for SEO Ordered By Importance" }, { "title": "Author", "name": "author", "type": "choice", "default": "8", "required": true, "choices": [ { "id": "8", "title": "Author 1" }, { "id": "9", "title": "Author 2" } ], "description": "Author ID of the Article on the Website" }, { "title": "Status", "name": "status", "type": "draft", "default": "draft", "required": true }, { "title": "Publish Date", "name": "published", "type": "datetime", "isPublishDate": true, "when": { "fieldRef": "status", "operator": "eq", "value": "published" } }, { "title": "Language", "name": "lang", "type": "choice", "choices": [ "fr", "en" ], "default": "fr", "required": true } ] }, { "name": "doc", "filePrefix": null, "pageBundle": false, "previewPath": null, "fields": [ { "title": "type", "name": "type", "type": "string", "default": "doc", "hidden": true }, { "title": "Language", "name": "lang", "type": "choice", "choices": [ "fr", "en" ], "default": "fr", "required": true } ] } ], "frontMatter.file.preserveCasing": true, "frontMatter.taxonomy.seoDescriptionLength": 120, "frontMatter.framework.id": "other", "frontMatter.content.publicFolder": "", "frontMatter.taxonomy.dateFormat": "yyyy-MM-dd", "frontMatter.content.draftField": { "name": "status", "type": "choice", "choices": [ "draft", "packaged", "published" ] }, "frontMatter.content.pageFolders": [ { "title": "Ecostylia", "path": "[[workspace]]", "contentTypes": [ "default" ] } ], "frontMatter.dashboard.openOnStart": false, "frontMatter.sponsors.ai.enabled": false, "frontMatter.custom.scripts": [ { "id": "create-structure", "title": "Create Doc & Glossary", "script": "./.frontmatter/config/custom/scripts/create-structure.js", "command": "node" }, { "title": "Create media.xlsx from the post", "command": "node", "script": "./.frontmatter/config/custom/scripts/import-media-from-md.js" }, { "title": "Update Media Library from media.xlsx", "command": "node", "script": "./.frontmatter/config/custom/scripts/update-media-db-from-media-list.js" }, { "title": "Package", "command": "bash", "script": "./.frontmatter/config/custom/scripts/launch-package.sh", "environments": [ { "type": "windows", "command": "powershell", "script": "./.frontmatter/config/custom/scripts/launch-package.ps1" } ] }, { "title": "Publish & Notify", "command": "bash", "script": "./.frontmatter/config/custom/scripts/launch-publish-notify.sh", "environments": [ { "type": "windows", "command": "powershell", "script": "./.frontmatter/config/custom/scripts/launch-publish-notify.ps1" } ] }, { "title": "Publish", "command": "bash", "script": "./.frontmatter/config/custom/scripts/launch-publish.sh", "environments": [ { "type": "windows", "command": "powershell", "script": "./.frontmatter/config/custom/scripts/launch-publish.ps1" } ] } ], "frontMatter.snippets.wrapper.enabled": false, "frontMatter.content.snippets": { "Embed": { "description": "", "body": [ "```block", "type: embed", "url: [[&url]]", "caption: \"[[caption]]\"", "```" ], "fields": [ { "name": "url", "title": "Url", "type": "string", "required": true, "single": true }, { "name": "caption", "title": "caption", "type": "string", "required": false, "default": "" } ], "isMediaSnippet": false } } } <!-- github-comment-id:2129792023 -->
Author
Owner

@steelcoder I checked the configuration. The reason there is an update when you open the panel is the default property, which is set on the slug field. The update only happens when there is no slug set on the page.

https://github.com/estruyf/vscode-front-matter/assets/2900833/dbf851df-8c78-4514-830e-310076e5a56a

@steelcoder I checked the configuration. The reason there is an update when you open the panel is the `default` property, which is set on the `slug` field. The update only happens when there is no slug set on the page. https://github.com/estruyf/vscode-front-matter/assets/2900833/dbf851df-8c78-4514-830e-310076e5a56a <!-- github-comment-id:2130212150 -->
Author
Owner

No, the slug were filled and was deleted.

Yoann PANTIC

Le ven. 24 mai 2024 à 21:18, Elio Struyf @.***> a
écrit :

@steelcoder https://github.com/steelcoder I checked the configuration.
The reason there is an update when you open the panel is the default
property, which is set on the slug field. The update only happens when
there is no slug set on the page.

https://github.com/estruyf/vscode-front-matter/assets/2900833/dbf851df-8c78-4514-830e-310076e5a56a

—
Reply to this email directly, view it on GitHub
https://github.com/estruyf/vscode-front-matter/issues/813#issuecomment-2130212150,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAILI2T53SGO6YI2UQBEOITZD6G7LAVCNFSM6AAAAABIHVR4G2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZQGIYTEMJVGA
.
You are receiving this because you were mentioned.Message ID:
@.***>

No, the slug were filled and was deleted. Yoann PANTIC Le ven. 24 mai 2024 à 21:18, Elio Struyf ***@***.***> a écrit : > @steelcoder <https://github.com/steelcoder> I checked the configuration. > The reason there is an update when you open the panel is the default > property, which is set on the slug field. The update only happens when > there is no slug set on the page. > > > https://github.com/estruyf/vscode-front-matter/assets/2900833/dbf851df-8c78-4514-830e-310076e5a56a > > — > Reply to this email directly, view it on GitHub > <https://github.com/estruyf/vscode-front-matter/issues/813#issuecomment-2130212150>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AAILI2T53SGO6YI2UQBEOITZD6G7LAVCNFSM6AAAAABIHVR4G2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZQGIYTEMJVGA> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> > <!-- github-comment-id:2130214353 -->
Author
Owner

I'm not able to reproduce it, would you be able to give me some sample data/files?

Would you be able to record the file update like I did?

I'm not able to reproduce it, would you be able to give me some sample data/files? Would you be able to record the file update like I did? <!-- github-comment-id:2130246635 -->
Author
Owner

@steelcoder, do you have an update for me?

@steelcoder, do you have an update for me? <!-- github-comment-id:2135030262 -->
Author
Owner

Hello, no but the bug is still present for me.

Yoann PANTIC

Le mar. 28 mai 2024 à 13:53, Elio Struyf @.***> a
écrit :

@steelcoder https://github.com/steelcoder, do you have an update for me?

—
Reply to this email directly, view it on GitHub
https://github.com/estruyf/vscode-front-matter/issues/813#issuecomment-2135030262,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAILI2VIIQFAUQAXEFXD3SLZERV2RAVCNFSM6AAAAABIHVR4G2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZVGAZTAMRWGI
.
You are receiving this because you were mentioned.Message ID:
@.***>

Hello, no but the bug is still present for me. Yoann PANTIC Le mar. 28 mai 2024 à 13:53, Elio Struyf ***@***.***> a écrit : > @steelcoder <https://github.com/steelcoder>, do you have an update for me? > > — > Reply to this email directly, view it on GitHub > <https://github.com/estruyf/vscode-front-matter/issues/813#issuecomment-2135030262>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AAILI2VIIQFAUQAXEFXD3SLZERV2RAVCNFSM6AAAAABIHVR4G2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZVGAZTAMRWGI> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> > <!-- github-comment-id:2135033369 -->
Author
Owner

@steelcoder, that is what I thought. It was more on the questions I asked before:

I'm unable to reproduce it. Would you be able to give me some sample data/files?

Would you be able to record the file update like I did?

@steelcoder, that is what I thought. It was more on the questions I asked before: I'm unable to reproduce it. Would you be able to give me some sample data/files? Would you be able to record the file update like I did? <!-- github-comment-id:2135036145 -->
Author
Owner

Closing the issue due to no response.

Closing the issue due to no response. <!-- github-comment-id:2288947235 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/vscode-front-matter#641