statamic / v2-hub

Statamic 2 - Feature Requests and Bug Reports
https://statamic.com
95 stars 5 forks source link

Error saving Homepaage #2511

Open damonjentree opened 4 years ago

damonjentree commented 4 years ago

Describe the bug When saving the homepage (with our without any changes), the entry is being saved but getting the error, "Call to a member function id() on null".

Looking through the trace in debugbar, it looks like the main complaining is here: /vendor/statamic/cms/src/Structures/Tree.php#236

public function move($entry, $target) {
    if ($this->page($entry)->parent()->id() === $target) {
        return $this;
    }
    ...

To Reproduce Steps to reproduce the behavior:

  1. Log into the CP
  2. Click on "Collections" --> "Pages" --> "Home"
  3. With (or without) making any changes to the content click on "Save & Publish"
  4. See error

Expected behavior A user should see the "Saved" message.

Screenshots If applicable, add screenshots to help explain your problem.

Environment details (please complete the following information):

Additional context