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

API_ERROR __ is not a valid ref name #7341

Open
The64thGamer opened this issue Dec 4, 2024 · 4 comments
Open

API_ERROR __ is not a valid ref name #7341

The64thGamer opened this issue Dec 4, 2024 · 4 comments
Labels
type: bug code to address defects in shipped code

Comments

@The64thGamer
Copy link

Describe the bug
When attempting to save pages, an API ERROR will come up stating the article's name isn't a valid ref name.

To Reproduce

  1. Go to example page
  2. Edit Article
  3. Save Article
  4. See error

Expected behavior

Screenshots
image

Applicable Versions:

  • Decap CMS version: 3.4.0
  • Git provider: Github
  • OS: POP OS
  • Browser version Firefox

CMS configuration
https://github.com/The64thGamer/cheeseepedia/blob/main/static/admin/config.yml

Additional context
This started happening after I had issues where changing an article would rename it and save it under a different file (eg "My Article.html" into "my-article.html"). I messed with article slugs and settings a few times to try and have it save under the original filename, but then this error happened.

@The64thGamer The64thGamer added the type: bug code to address defects in shipped code label Dec 4, 2024
@martinjagodic
Copy link
Member

@The64thGamer You are using editorial workflow, so I suspect you renamed this article while it had a status under EW. EW works with pull requests. There was probably a PR open for this file's original name, and after you changed it, the CMS couldn't find the match between main branch and PR branch.

I don't see any branches in your repo though, so I'm probably wrong. Unless you deleted them :)

BTW, how is it possible that Decap renames your files? It should not be able to do that.

@The64thGamer
Copy link
Author

No articles were renamed. This error happens when attempting to save to any article on the site. Just attempted a few more changes and same stuff happening.

Also didn't clarify well, Decap didn't rename the files, it would create new ones. A user submitted a pull request using Decap to edit this existing page, and the pull submitted it under this new file.

But now whatever error is happening is just stopping any files from being saved.

@The64thGamer
Copy link
Author

After more testing it's letting me only save articles who don't have spaces in their filename. I assume that narrows things down to whatever the issue is.

@martinjagodic
Copy link
Member

@The64thGamer how did you manage to save files with spaces in the first place? It doesn't seem possible to do via CMS with your config.

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

2 participants