processwire / processwire-issues

ProcessWire issue reports.
45 stars 2 forks source link

Creating a page does not add a row to pages_parents table #1956

Closed Toutouwai closed 3 months ago

Toutouwai commented 3 months ago

Short description of the issue

I noticed that no new row is added to the pages_parents table when a page is added and published.

In a clean installation of PW 3.0.240...

Page with ID 1019 is added and published:

2024-08-08_123726

pages_parents table afterwards (note that there is no row for page ID 1019):

2024-08-08_123811

If I add a child page to this newly created page there is no row for that child page either.

I don't understand exactly how the pages_parents table is used, but it looks like it's important for the functioning of the PagesParents class so I wanted to check if it's meant to be added to as pages are created.

Setup/Environment

ryancramerdesign commented 3 months ago

Having every page in the pages_parents table isn't necessary. The pages_parents table should just have pages_id columns for pages that themselves have children.

Toutouwai commented 3 months ago

Thanks for the explanation.