Closed Bug 774184 Opened 12 years ago Closed 12 years ago

Another document with this slug already exists

Categories

(developer.mozilla.org Graveyard :: Editing, defect, P2)

x86
macOS

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: teoli, Unassigned)

References

()

Details

(Whiteboard: s=2012-07-25 p=3)

When trying to update https://developer-new.mozilla.org/en-US/docs/CSS/Getting_Started/JavaScript

I get the error message +Another document with this slug already exists+.

But I didn't touch the slug, and the document already exists (so I can't fix the template error on it.
Same here: https://developer-new.mozilla.org/en-US/docs/SVG/Tutorial/Introduction (I list them here so that I don't forget about them)
Interesting. It looks like the slug does not take the full path into consideration -- docs/CSS/Getting_Started/JavaScript is treated the same as /docs/JavaScript.

In both of these cases, there is an article with the same name but at a different path.

https://developer-new.mozilla.org/en-US/docs/JavaScript
https://developer-new.mozilla.org/en-US/docs/Introduction
Yeah, this is happening to me in a couple of places too.
Ali: This bug is not related to reading, but it is one of the more significant editor-facing bugs. Thoughts on blocker status?
Louis-Remi just ran into this in bug 776018. It's affecting a large percentage of the docs team, so it will probably affect a large percentage of our users as well.
Yeah, this is happening on several articles. I have yet to see a pattern.
Sheppy: As far as I can tell, the pattern is this: You cannot save any page that has the same slug as another document.

For example, these two articles have different paths but the same slug. This causes an error.

https://developer-new.mozilla.org/en-US/docs/CSS/length
https://developer-new.mozilla.org/en-US/docs/length
Hm. I was under the impression that the slug is supposed to be the full path of the page other than the part prior to "docs". So the first of those would be "CSS/length" and the second "length". If that's not the case, that's a bug of pretty epic proportions, since we've known all along (and made it quite clear in multiple meetings) that pages with the same name and slug were going to be common due to the same names being used in multiple APIs.
I think I know what the issue could be here, and it's to do with the secondary form validation I created, the one that ensured that no slash was present in slug returned by the form.  

The last piece of the slug gets removed, then validated, so "CSS/length" becomes just "length" which colides with "/length" which is already present.

Sheppy:  This isn't a requirements issue, it's a "there's so much that could happen with slugs that something popped up" issue;  it all relates to only accepting the last piece of the slug heirarchy in the form.  

I'll look to fix during the conference tomorrow.  I'm too exhausted from 3 weeks without a day off to try to fix it tonight.
OK, I've confirmed the root issue, have a solution working locally, will have hopefully by end of day.
Whiteboard: s=2012-07-25 p=3
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/c176e2ac567f05f4ab53e4ea9221f4c951547c03
fix bug 774184 - prevent duplicate slug error message

https://github.com/mozilla/kuma/commit/90fa492c75fc096876718b46e4b3b202a1f80262
Merge pull request #435 from darkwing/slug-taken-774184

fix bug 774184 - prevent duplicate slug error message
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
That's not yet on developer-new. How are the push to it scheduled for the moment (once a day, each couple of days, once a week)? (So that I know when to verify old bugs I reported/experienced on it).
Right now we push "as-needed" We plan to push today.

We should decide how often we would like to push.

FWIW, Raymond marks bugs as Verified:Fixed when he verifies them on -new.
Cool thanks.
Priority: -- → P2
Version: Kuma → unspecified
Component: Docs Platform → Editing
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.