Skip to content

URI validation based on route #4637

@aerni

Description

@aerni

Bug description

I've got a non-orderable collection with publish dates turned on. The route looks like this /tours/{year}/{slug}. I'm expecting to be able to have multiple entries with the same slug as long as their publish year is different. But I'm getting a This URI has already been taken error no matter the publish date. Is this PR only meant to work with orderable collections? It would be awesome if it was smart enough to pick up on the route.

How to reproduce

  • Create a non-orderable collection with publish dates turned on
  • Change the route to something like /tours/{year}/{slug}
  • Add two entries with the same slug and try saving

Logs

No response

Versions

Statamic 3.2.19 Pro
Laravel 8.69.0
PHP 7.4.25
aerni/livewire-forms 1.1.0
aryehraber/statamic-impersonator 2.2.0
doublethreedigital/duplicator 1.3.4
jonassiewertsen/statamic-livewire 2.7.0
spatie/statamic-responsive-images 2.8.5
visuellverstehen/statamic-classify 2.3.1
withcandour/aardvark-seo 2.0.16

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions