You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had a collection where entries did not require slugs called functional_pages that was working just fine before I added a third blueprint. The existing blueprints focussed around templating 404 pages and search results pages.
When I created a blueprint, I added a slug field in the sidebar section and was able to get entries using said blueprint to appear in my browser just fine. When I was testing adding new entries using one of the older 2 blueprints, I was met with this error in my network response:
{
"message": "The given data was invalid.",
"errors": {
"slug": [
"This URI has already been taken."
]
}
}
I checked the entries that already existed, and they did not contain slug or URI data and I was able to edit these in the control panel with no issues. I'm puzzled because the collection's "require slugs" option is definitely switched off, although I did have to add a route pattern when adding the notorious third blueprint: {parent_uri}/{slug}.
It appears to be that when setting a route pattern in a collection, the slug field is sent in the payload of the request:
I feel as though it should be possible to have entries that do and don't contain slugs in the same collection. If this is not a bug then I feel it should be documented somewhere in the collections page of the docs.
How to reproduce
Create a collection
ensure that slugs are not required
ensure there is a route pattern
Create a blueprint that does not contain a slug field
Create a blueprint that does contain a slug field
you will be able to create new entries using the blueprint with a slug, but not using the one without
There are 13 sites in this project, so I've had to grapple with a lot of multi-site features in order to get things working in a certain way. For example I'm hiding the localisation menu so that users cannot translate pages.
The text was updated successfully, but these errors were encountered:
Bug description
I had a collection where entries did not require slugs called
functional_pages
that was working just fine before I added a third blueprint. The existing blueprints focussed around templating 404 pages and search results pages.When I created a blueprint, I added a slug field in the sidebar section and was able to get entries using said blueprint to appear in my browser just fine. When I was testing adding new entries using one of the older 2 blueprints, I was met with this error in my network response:
I checked the entries that already existed, and they did not contain slug or URI data and I was able to edit these in the control panel with no issues. I'm puzzled because the collection's "require slugs" option is definitely switched off, although I did have to add a route pattern when adding the notorious third blueprint:
{parent_uri}/{slug}
.It appears to be that when setting a route pattern in a collection, the slug field is sent in the payload of the request:
I feel as though it should be possible to have entries that do and don't contain slugs in the same collection. If this is not a bug then I feel it should be documented somewhere in the collections page of the docs.
How to reproduce
Logs
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
There are 13 sites in this project, so I've had to grapple with a lot of multi-site features in order to get things working in a certain way. For example I'm hiding the localisation menu so that users cannot translate pages.
The text was updated successfully, but these errors were encountered: