-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Delivery API: behavior of redirection after renaming Node #14413
Comments
Hi there @cf-marc! Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better. We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.
We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions. Thanks, from your friendly Umbraco GitHub bot 🤖 🙂 |
Hi @cf-marc 👋 Thank you for reporting this 👍 The API should return a valid redirect response, but perhaps something broke. I'll dive into this today and get back to you 😄 |
Ok... I can't reproduce this 🙈 I have a content item that was renamed from "Delete Me Too" to "Delete Me Too Too Shoo": When I request If you're testing this in Postman or a similar tool, it might be that the tool automatically follows redirects. Postman does so by default; you have to go to Settings to turn that off explicitly: Alternatively (provided you use Postman) you can open the Postman console and see the HTTP301: Could I ask you to test this again? |
Hey @kjac Thanks for the input and sorry for that. I switched off this setting in postman and the response is absolutely fine. |
Awesome @cf-marc 🥳 and thank you for taking the time to test the API 💪 |
@kjac Was this actually solved? Or what's the solution? Do we need to disable redirects, and manually handle the redirects? |
Okay, it "kinda" makes sense, since it returns the actual URL for the page you requested. I've set redirect to export default async function Page({ params }: Props) {
const result = await fetchUmbracoPath(params.slug);
if (result.response.status === 301) {
// Content was moved.
redirect(result.response.headers.get("Location")!);
}
...
} |
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
12.0.0-rc3
Bug summary
If you rename an item in Umbraco e.g. from 'About' to 'About us' and try to get the Item with the old path '/umbraco/delivery/api/v1/content/item/about', you will be redirected to the path '/about-us'.
Specifics
No response
Steps to reproduce
Expected result / actual result
Actual response:
Expected result:
or at lead a valid json response:
The text was updated successfully, but these errors were encountered: