Duplicate URL Segment - Generating Preview Failed
A duplicate URL segment warning typically arises when a space content source is added to a Viewport site instead of the Scroll Document that is located within that space.
Symptom
The preview generation fails with one or more warnings of the type ‘Duplicate URL segment’. Several pages in your content source(s) use a URL segment that is already used by another page in that content source(s).
Explanation
A duplicate URL segment warning typically arises when a space content source is added to a Viewport site instead of the Scroll Document that is located within that space.
When creating a Scroll Document and saving one or more versions, the URL segment values are copied over from the pages of the working version to the pages of the saved version.
In Scroll Viewport, URLs need to be unique.
When your content is added as a Scroll Document, Scroll Viewport will handle the article segment duplicates by adding a version segment to the URL (e.g. /my-document/version-1/page-1 and /my-document/version-2/page-1).
However, if you add the space where that document is located as a content source to the site, then Scroll Viewport won’t add these version segments, resulting in two attempts to create the same URL (e.g /my-document/page-1) and therefore a fatal error when generating the site.
Resolution
Remove your space content source from the site
Click ‘Add new content source’
Select the type ‘Scroll Documents’
Proceed to add your Scroll Document(s) to the site
Click ‘Update site’
The preview should now generate without the error.