-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Prevent overwriting existing file #1164
Comments
@tech4him1 I agree, and a warning should be straightforward to implement. |
Can I claim this? |
@brianlmacdonald That would be great, thanks! |
I agree, this should be a warning until #445 and |
@brianlmacdonald Let me know if you have any questions on this. |
@tech4him1 , yes, can you point me to the files I need to be looking at for this? |
@brianlmacdonald The area where the slug is created from the file title is: You could likely just throw an error there, and it would be caught in the action: I'm not sure if something else would need to be done when in Editorial Workflow mode, that would be something to test. |
@tech4him1 As a starting point, I was thinking about calling |
@brianlmacdonald That sounds reasonable enough to me. The entry data is probably already stored under |
@tech4him1 I got it working in regular mode-- it throws a nice error when you try to save with a duplicate filename. Is it possible to set up editorial workflow mode using the default test repo? |
@brianlmacdonald No, you have to use a live repo for editorial workflow currently. (One way to do it is just creating a blank GitHub repo for testing -- it doesn't need to be connected to a Netlify site.) |
Adding editorial workflow support to the test backend in #1225. |
Re-opening, #1239 was reverted a while back. |
Can I claim this issue? |
@siddhant1 for sure! |
@siddhant1 Are you still working on this? I'm keen to get this issue fixed, so happy to lend a hand or take it over if you're no longer working on it. 😁 |
So sorry for the delay ! I am a beginner and will appreciate a helping hand to resolve this ! Thanks :) |
I think this PR #1931 has a fix for this issue. |
Great! Thanks @barthc |
- Do you want to request a feature or report a bug?
BUG
- What is the current behavior?
When I add a file with the same title as an existing one and my slug equals title, the existing file is overwritten.
- If the current behavior is a bug, please provide the steps to reproduce.
make sure your slug equals title. add a file, choose a title that is already used by another file, save.
you have overwritten the existing file
- What is the expected behavior?
a new file is created (i.e. with counter to filename)
a warning that the file cannot be saved as it needs a unique title
Less urgent if #1069 were implemented.
The text was updated successfully, but these errors were encountered: