Hello all, been struggling with handling the users() collection recently, I canāt seem to return anything other than the username and avatar of a user. When I try to call ->firstName() or any other custom field, or try to run a filterBy(āroleā, āxxxā), PHP throws some fatal errors at me.
Iāve seen these two errors come up:
Undefined offset: 2 line 274 code 8 file /kirby/toolkit/lib/collection.php
and
Call to undefined method Data::read() in /kirby/core/user.php on line 46
Anyone know whatās happening here? Any help would be much, much appreciated, thanks!
Hm, thereās nothing wrong with that code, I just threw it at my test install and everything is fine, apart from the firstName throwing an error because I donāt have a user called ālacielā.
Alright, definitely strange! It works fine on a fresh starterkit. So what could even possibly be causing this issue on my other website? What a strange situation!
Itās strange that you get the āCall to undefined method Data::read()ā error, because that means that somehow the Toolkit is not loaded correctly.