Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not change navigation handle #1959

Closed
Konafets opened this issue Jun 20, 2020 · 1 comment
Closed

Can not change navigation handle #1959

Konafets opened this issue Jun 20, 2020 · 1 comment

Comments

@Konafets
Copy link
Contributor

Can not change navigation handle

Bug Description

The handle of a navigation can not be changed once it got created.

How to Reproduce

  • Create new navigation called Header.
  • Edit the Header navigation and change the title to Footer and the handle to footer and save it.
  • Reload the page
  • As a result the title was saved and it shows Footer, but the handle still shows header.

Extra Detail

On the filesystem level you will see, that the file is named header.yaml and this stays the same after renaming the handle.

2020-06-20_18-55-06 (1)

Environment

Statamic version: master

PHP version: 7.4

Install method (choose one):

  • Fresh install from statamic/statamic
@Konafets
Copy link
Contributor Author

Konafets commented Jun 20, 2020

I dug a bit into it and got it working so far, that the new handle is stored and the filename is changed too. A problem I discovered along the way: The breadcrumb navigation does not know anything about the new handle and still pointing to the old handle header, as well the current url is the one for the old handle.

  1. The breadcrumb should implemented as a VueJS component, that is aware of the change. This changes the breadcrumb and somehow modifies the current url
  2. Whenever the handle changed, Statamic must redirect to the new handle.
  3. Make the handle field not editable

Would love to hear your comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants