Issue: Initializing project with multiple VSCode project roots fails #665

Closed
opened 2026-10-05 02:59:21 +02:00 by adam · 5 comments
Owner

Steps:

  • loading my repo
  • activating frontmatter (latest version, as well as latest beta version)
  • screen pops up:
    image
    note how the paths don't have the folder names... could be an issue? kollitsch.dev is in ~/github.com/davidsneighbour/kollitsch.dev, the other folders identical
  • selecting kollitsch.dev
  • full window reloads (closes, opens again)
  • same dialogue pops up > circle back to step 2 above.

At the same time the following notices pop up:

image

Those folders exist in ~/github.com/davidsneighbour/kollitsch.dev/content

I can't find a frontmatter.json though... up to the home directory.

The initialization process is stuck here... I can select Hugo as system, but nothing else below it and the first step is a circular error.

image

I tried CTRL + P and "frontmatter clear cache" without success. I also tried "create non-existent content folder," but the folder did not appear anywhere. Restarting VSCode results in the notices above popping up again.

I had a frontmatter configuration and deleted it recently.

Steps: - loading my [repo](https://github.com/davidsneighbour/kollitsch.dev) - activating frontmatter (latest version, as well as latest beta version) - screen pops up: ![image](https://github.com/user-attachments/assets/feb52396-be0a-4e64-b1b8-06b83e8c069d) note how the paths don't have the folder names... could be an issue? kollitsch.dev is in `~/github.com/davidsneighbour/kollitsch.dev`, the other folders identical - selecting kollitsch.dev - full window reloads (closes, opens again) - same dialogue pops up > circle back to step 2 above. At the same time the following notices pop up: ![image](https://github.com/user-attachments/assets/c617ede2-14a0-4a3d-9b33-3af5c5768569) Those folders exist in `~/github.com/davidsneighbour/kollitsch.dev/content` I can't find a frontmatter.json though... up to the home directory. The initialization process is stuck here... I can select Hugo as system, but nothing else below it and the first step is a circular error. ![image](https://github.com/user-attachments/assets/ce10af5c-d2d2-4572-a1b6-56dda1cf9ef1) I tried CTRL + P and "frontmatter clear cache" without success. I also tried "create non-existent content folder," but the folder did not appear anywhere. Restarting VSCode results in the notices above popping up again. I had a frontmatter configuration and deleted it recently. <!-- github-sync-id:2485218637 -->
adam closed this issue 2026-10-05 02:59:21 +02:00
Author
Owner

Interesting to note maybe: I have more folders inside content, but it complains only about blog and tags... I have the feeling FrontMatter kept the old config somewhere and clear cache is not removing the remnants?

Interesting to note maybe: I have more folders inside `content`, but it complains only about `blog` and `tags`... I have the feeling FrontMatter kept the old config somewhere and clear cache is not removing the remnants? <!-- github-comment-id:2308813073 -->
Author
Owner

You can try to verify the diagnostic logging to see the config that was loaded, but there isn't a config cache. Only a cache for the content and that is cleared by manually triggering it, or a version update.

You can try to uninstall the stable version, install the beta and open the dashboard. That should trigger re-index of the content.

Currently on vacation, so can't verify it until beginning of September.

You can try to verify the diagnostic logging to see the config that was loaded, but there isn't a config cache. Only a cache for the content and that is cleared by manually triggering it, or a version update. You can try to uninstall the stable version, install the beta and open the dashboard. That should trigger re-index of the content. Currently on vacation, so can't verify it until beginning of September. <!-- github-comment-id:2308816672 -->
Author
Owner

Don't waste a minute on this ;) If it would be a global issue you would have more reports. Enjoy your holidays. I'll try to debug diagnostic logging.

I have the beta installed and tested with the same results. It's a weird thing.

Don't waste a minute on this ;) If it would be a global issue you would have more reports. Enjoy your holidays. I'll try to debug diagnostic logging. I have the beta installed and tested with the same results. It's a weird thing. <!-- github-comment-id:2308817245 -->
Author
Owner

note: please ignore until after your holidays.

The issue is connected to a backup of the old config in a scratch subfolder. I remember reading in recent release notes that subfolder configs are possible now, or some existing issue with subfolders was fixed, but I had thought this would be done by explicit configuration. FrontMatter, though, seems to search recursively, finds the fragments in my scratch, and loads them as proper config. The folder is ignored by .gitignore -- if that is an easy way to implement some form of ignore mechanism. It's not a part of the repository (or "project").

I'll keep this open, please close if this is the expected behaviour. This is, however, a weird way to move subfolder-config up-wards. This should be done somehow via a parameter a la "look into folder x to load the config", IMHO. I would understand if the system looks up into containing folders to find a configuration... like having a global config in my home directory and that being overridden by the local config. Not in the other direction, at least not automatically and recursive.

note: please ignore until after your holidays. The issue is connected to a backup of the old config in a `scratch` subfolder. I remember reading in recent release notes that subfolder configs are possible now, or some existing issue with subfolders was fixed, but I had thought this would be done by explicit configuration. FrontMatter, though, seems to search recursively, finds the fragments in my scratch, and loads them as proper config. The folder is ignored by .gitignore -- if that is an easy way to implement some form of ignore mechanism. It's not a part of the repository (or "project"). I'll keep this open, please close if this is the expected behaviour. This is, however, a weird way to move subfolder-config up-wards. This should be done somehow via a parameter a la "look into folder x to load the config", IMHO. I would understand if the system looks up into containing folders to find a configuration... like having a global config in my home directory and that being overridden by the local config. Not in the other direction, at least not automatically and recursive. <!-- github-comment-id:2308886440 -->
Author
Owner

Hi @davidsneighbour, Thanks for providing the details. FM CMS is expected to look for the frontmatter.json file in your project. However, as you are working in a VS Code workspace and have multiple frontmatter.json files, it tries to find the "root" folder to start from. This is where it goes wrong.

There is no exclude or ignore logic, and I think it would be easier to change the file name so that the CMS can ignore it.

Hi @davidsneighbour, Thanks for providing the details. FM CMS is expected to look for the `frontmatter.json` file in your project. However, as you are working in a VS Code workspace and have multiple frontmatter.json files, it tries to find the "root" folder to start from. This is where it goes wrong. There is no `exclude` or `ignore` logic, and I think it would be easier to change the file name so that the CMS can ignore it. <!-- github-comment-id:2330852879 -->
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#665