statamic / cms

The core Laravel CMS Composer package
https://statamic.com
Other
3.81k stars 518 forks source link

Pages collection entry requiring a structure #1279

Closed dougstjohn closed 4 years ago

dougstjohn commented 4 years ago

I'm getting an error when I create a Pages collection entry (it's auto-added to the structure), and then I delete it from the structure and go back and look at the collection entry.

Call to a member function parent() on null Statamic\Entries\Entry::parent :496

A Pages collection entry appears to need a structure.

jasonvarga commented 4 years ago

Obviously this part needs some love, but I'm curious why you want an entry in there that's not in the structure?

dougstjohn commented 4 years ago

In this case I was using the cool writings starter kit and it uses the Pages structure as the top nav listing so every Page entry added ended up in the top nav.

marflow commented 4 years ago

I ran into this for the same reason: I want to exclude two pages (legal, privacy) from my main pages navigation, but that´s not possible. Also, {{ nav:pages exclude="legal|privacy" }} is not working. Also it seems, if a page is not included in the pages structure, it can not be reached from the front-end. Getting 404.

jasonvarga commented 4 years ago

Should be irrelevant in the next release because of the structure-related changes. Please re-open if not.