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

Evaluate path and redirect on content creation #232

Closed
jimafisk opened this issue Nov 5, 2022 · 1 comment
Closed

Evaluate path and redirect on content creation #232

jimafisk opened this issue Nov 5, 2022 · 1 comment
Labels
cms Git-backed content editing

Comments

@jimafisk
Copy link
Member

jimafisk commented Nov 5, 2022

When creating new content we use hash routing like http://localhost:3000/#add/pages/test - not the actual path that the content will eventually live at.

This is because we don't necessarily know what the full path is going to be when first adding the content. We allow for route overrides that use :field() to get value from the content source, so those values wouldn't have been created yet.

After the first save of new content, we should compute the path and redirect to it. doing a hard refresh from there is still a race against the CI clock, but it's probably better than staying on the hash which is always expecting to be starting from scratch on reload.

@jimafisk jimafisk added the cms Git-backed content editing label Nov 5, 2022
@jimafisk
Copy link
Member Author

jimafisk commented Sep 9, 2024

This should be all set in v0.6.60 🎉

We are also trying to redirect on edit if the evaluated route changes. This is most common if you're using replacement patterns from your content fields, and you change one of the computed field values. If folks run into weird issues because of this, please let me know!

@jimafisk jimafisk closed this as completed Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cms Git-backed content editing
Projects
None yet
Development

No branches or pull requests

1 participant