apostrophecms / apostrophe

A full-featured, open-source content management framework built with Node.js that empowers organizations by combining in-context editing and headless architecture in a full-stack JS environment.
https://apostrophecms.com
Other
4.36k stars 590 forks source link

do not let a page become a child of itself #4726

Closed boutell closed 2 months ago

boutell commented 2 months ago

Summary

Summarize the changes briefly, including which issue/ticket this resolves. If it closes an existing Github issue, include "Closes #[issue number]"

What are the specific steps to test this change?

See unit tests. I don't know how an end user can convince the UI to attempt it, but the important thing is that the backend API refuse to do it, which is what I've implemented here. (My new test did fail until I made the fix.)

What kind of change does this PR introduce?

(Check at least one)

Make sure the PR fulfills these requirements:

If adding a new feature without an already open issue, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

linear[bot] commented 2 months ago

PRO-6585 A page must never become a child of itself