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

[5.x] Fix edit form errors after change of term slug #11056

Open
wants to merge 5 commits into
base: 5.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions resources/js/components/terms/PublishForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,11 @@ export default {
window.location = this.listingUrl;
}

// If the edit URL was changed (i.e. the term slug was updated), redirect them there.
else if (window.location.href !== response.data.data.edit_url) {
window.location = response.data.data.edit_url;
}

// Otherwise, leave them on the edit form and emit an event. We need to wait until after
// the hooks are resolved because if this form is being shown in a stack, we only
// want to close it once everything's done.
Expand Down
Loading