Contributions 1 min read

# URL slug route fix

Any published Data Object with a URL Slug should be reachable. But any time a part of the URL Slug matches a full path of an unpublished Document page, the URL Slug will return a 404. Final

Last updated on 29 August, 2025

## Key takeaways

1. A published Pimcore data object's URL slug returned an error when it matched the full path of an unpublished document page, and static routes had the same problem.
2. Because fixing the behaviour outright would break older installations, Factory's developer added a config option to enable or disable it.
3. From Pimcore 11, URL slugs and static routes are meant to keep working by default even when they match an unpublished document's path.

## **What was the issue?**

There was an issue with the Pimcore object URL Slug. If the URL Slug matches a full path of the unpublished Document page there URL would return an error. The same problem was also occurring for static routes.

## **How did you solve it?**

Just fixing this would be a breaking change for older Pimcore installations because maybe some users rely on this functionality as a default Pimcore functionality. So I added a config option that will allow users to choose whether they want to disable or enable this. In Pimcore 11, the default behavior will be that if URL slug matches a full path of an unpublished Document page, it will still work. It goes the same for static routes.

## **Why is this fix important?**

It’s important because it gives users a possibility to choose how Pimcore URL Slug and static routes interact with unpublished documents.

## **How does it feel to contribute to a platform such as Pimcore?**

After a few pull requests I’ve made, it started to feel like “business as usual”. Still, it’s awesome that my code is a part of Pimcore and that these fixes are making life easier for me and all the other Pimcore developers.

And if you want to check out this [pull request](https://github.com/pimcore/pimcore/pull/10163), just follow the link!

## Related

[Contributions **Option to allow free input in select editable** More power is given to the developers through this fix. Now, it's up to them allow editors even more freedom when working in Pimcore. Find out what's new. 1 min read](https://factory.dev/pimcore-knowledge-base/contributions/free-input-select-editable) [Contributions **Validation errors with subItems without context stack fix** Our Pimcore developer, Tomislav, has solved another issue on the Pimcore platform. Find out why this pull request is important and what use will users have from this… 1 min read](https://factory.dev/pimcore-knowledge-base/contributions/validation-errors-fix) [Contributions **Added async option to headscript fix** Check out one of our Pimcore developers helped add the async option to the headscript, and bringing closer the release of Pimcore X! 1 min read](https://factory.dev/pimcore-knowledge-base/contributions/added-async-option-headscript-fix)

---

Source: https://factory.dev/pimcore-knowledge-base/contributions/url-slug-route-fix
