Skip to content

Globals publish form doesn't sync the active tab to the URL hash #14513

@JiveDig

Description

@JiveDig

Bug description

The publish form's URL-hash tab deep-linking works for entries and terms but is silently disabled for globals. Opening /cp/globals/{handle}#some-tab does not activate some-tab, and switching tabs within a global doesn't update window.location.hash.

This makes it hard to link colleagues or clients directly to a specific tab in a multi-tab globals blueprint (e.g. Peak SEO's 6-tab global, or any custom tabbed Site Settings blueprint).

How to reproduce

  1. Create a globals blueprint with two or more tabs.
  2. Visit /cp/globals/{handle}#{second-tab-handle} — the first tab loads instead of the linked one.
  3. Switch tabs manually — the URL hash stays empty.
  4. Repeat with an entry that has multiple tabs — the hash syncs both ways as expected.

Expected behavior

Globals' publish form should sync the active tab to window.location.hash and activate the tab from the hash on load, matching the behavior already shipped for entries, terms, and assets.

Suspected cause

The machinery lives in resources/js/components/ui/Publish/Tabs.vue (setActiveTabFromHash() on mount + a watcher that writes window.location.hash) and is gated on a rememberTab prop.

  • components/entries/PublishForm.vue passes :remember-tab=\"!isInline\"
  • components/terms/PublishForm.vue passes :remember-tab=\"!isInline\"
  • components/globals/PublishForm.vue does not pass :remember-tab → defaults to false

Looks like an oversight rather than an intentional decision — the isInline guard isn't relevant to globals either way, so :remember-tab=\"true\" (or the same !isInline form if globals ever grow an inline variant) should be safe.

Happy to open a PR if that's helpful.

Versions

  • Statamic: v6.14.0
  • Laravel: 13.x
  • PHP: 8.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions