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

config.yml could not be found with manual init #1908

Closed
Nexuist opened this issue Nov 25, 2018 · 4 comments
Closed

config.yml could not be found with manual init #1908

Nexuist opened this issue Nov 25, 2018 · 4 comments

Comments

@Nexuist
Copy link

Nexuist commented Nov 25, 2018

Describe the bug

Netlify CMS still attempts to load config.yml, even when manual init is set.

To Reproduce

Consider the following script:

window.CMS_MANUAL_INIT = true;

import CMS, { init } from "netlify-cms";

init({
	config: ...
});

When the page is loaded, it flashes an error message (config.yml could not be loaded...) and then launches the CMS. However everything works as expected, collections are loaded properly, media can be uploaded, etc.

Expected behavior

If CMS_MANUAL_INIT is true, Netlify CMS should not attempt to load config.yml. It also appears that the module is loaded twice, as there are 2 version printouts and 2 404s.

Screenshots

image

Applicable Versions:

  • Netlify CMS version: 2.2.0
  • Git provider: GitHub
  • OS: MacOS
  • Browser version: Chrome 70
  • Node.JS version: 10.6.0

CMS configuration

N/A

Additional context

N/A

@erquhart
Copy link
Contributor

erquhart commented Nov 26, 2018

Attempting to load config with manual init isn't a bug, it's intentional. #1866 has been raised as an improvement to provide an opt-out.

Regarding everything else you're seeing, Netlify CMS doesn't load itself, you'll need to check through your source and build setup to determine why the script is being loaded twice.

@stale
Copy link

stale bot commented Oct 29, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status: stale label Oct 29, 2019
@barthc barthc closed this as completed Dec 11, 2019
@HeyITGuyFixIt
Copy link

Even after #2053, it seems the issue still persists.

@erezrokah
Copy link
Contributor

Hi @HeyITGuyFixIt, you need to explicitly configure load_config_file: false for the CMS not to try and load the config yml as specified in the example code here https://www.netlifycms.org/docs/beta-features/#manual-initialization.
If that is not working can you please open a new issue with a reproduction scenario?

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

No branches or pull requests

5 participants