-
-
Notifications
You must be signed in to change notification settings - Fork 540
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
Call to a member function structure() on null #3478
Comments
So you created a new collection, then you went back to your Pages collection and it gave you that error? Correct? Also, when you get the error, are you in the CP or in the front-end? |
Having a similar issue, but different scenario so hopefully could provide some insight. In my case, just migrated from a V2 site. Created the Pages collection, started seeing this error pop up. After refreshing, it seems to work correctly. After deleting the page, it throws a similar console error. In both cases, refreshing seems to clear things up. Screen.Recording.2021-04-20.at.10.08.42.AM.movEnvironmentStatamic 3.1.9 Solo |
Looks like it also throws the error after every page update. Resolves on a refresh. Any idea for where to start poking around? |
And when saving pages |
I got a fix for it. In the tree directory, i deleted the pages.yaml or something, it just regenerated and now it works correctly on my side. Not the best fix i guess, but it works. |
Hmmm, doesn't seem to work here. I just loose my page tree ;-) |
Yes but then just save a page and it regenerates |
Ah! I removed { } Projects was as a structured collection before and then later I turned it into a date based collections. This seems to leave behind a nearly empty tree file which causes this error when warming the stache. Hope it helps solving this one. |
I was able to reproduce this on a fresh install by:
If you use statamic-issue-3478.zip you'll get it for free. Just run Switching to non structured collection should probably remove the tree collection.yaml file. |
I have the same issue. New site install. in terminal if I run
Also possibly related, in the CP when I click |
Bug Description
I suddenly get the error: Call to a member function structure() on null
Statamic\Structures\CollectionTree::Statamic\Structures{closure} vendor/statamic/cms/src/Structures/CollectionTree.php:19
return Blink::once('collection-tree-structure-'.$this->handle(), function () {
How to Reproduce
I made a new collection, and after that pages collection started to do this. When i save it says saved, save again, error, save again, saved, save again, error.
Extra Detail
Environment
Statamic 3.1.3 Pro
Laravel 8.35.1
PHP 7.4.16
cnj/seotamic 2.0.3
pecotamic/sitemap 1.2.1
Statamic version: 3.0.{?}
3.1.3 Pro
PHP version: 7.4.16
Install method (choose one):
statamic/statamic
THIS ONEThe text was updated successfully, but these errors were encountered: