Error : Call to a member function autoGeneratesTitles() on null #8435
-
Hi folks, I've just upgraded Statamic from version 3.4 to 4.0 and I'm trying to clean up the test suite. I was initially getting this error when I tried to create an entry within my test: LogicException : Cannot set date on non-dated collection entry. After checking the docs, I was able to resolve this issue, but when I rerun my tests I now get this error: Error : Call to a member function autoGeneratesTitles() on null This is an example of one of the tests where I get the above error:
Has anyone else experienced this error yet? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
Did you try setting the collection before you set data() |
Beta Was this translation helpful? Give feedback.
Although my test setup was ok, my database seeders were causing the issues. It was just a matter making sure the collection was created and then set for the entry before the date was set.