Skip to content

URL::enforceTrailingSlashes() breaks CP breadcrumbs and CP Preferences sub items #13842

@jerwre

Description

@jerwre

Bug description

When using URL::enforceTrailingSlashes() as documented in the https://statamic.dev/knowledge-base/tips/trailing-slashes, the Control Panel loses breadcrumb navigation and the child items under Preferences disappears.

How to reproduce

Add URL::enforceTrailingSlashes() to AppServiceProvider::boot() and visit the control panel.

Logs

Environment

Environment
Application Name: Statamic
Laravel Version: 12.50.0
PHP Version: 8.3.27
Composer Version: 2.9.5
Environment: local
Debug Mode: ENABLED
URL: test.ddev.site
Maintenance Mode: OFF
Timezone: UTC
Locale: en

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: file
Database: mariadb
Logs: stack / single
Mail: smtp
Queue: sync
Session: file

Storage
public/storage: NOT LINKED

Statamic
Addons: 3
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 6.2.4 PRO

Statamic Addons
statamic-rad-pack/runway: 9.0.0
statamic/eloquent-driver: 5.1.1
statamic/seo-pro: 7.0.1

Statamic Eloquent Driver
Addon Settings: file
Asset Containers: file
Assets: file
Blueprints: file
Collection Trees: file
Collections: eloquent
Entries: file
Fieldsets: file
Form Submissions: file
Forms: file
Global Sets: file
Global Variables: file
Navigation Trees: file
Navigations: file
Revisions: file
Sites: file
Taxonomies: file
Terms: file
Tokens: file

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions