-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
First parameter must either be an object or the name of an existing class #181
Comments
@bartrylant Can you post any stacktraces related to the error (either from your web.log file or the template error screen)? |
|
Hey, I have the same issue with the latest version. If I change the code from this:
to this:
it works. here is my trace:
|
I'm having the same issue. I found converting parts to an object wasn't enough, I had to make it an instance of Parts, thus:
|
I'm guessing this is still present for newer PHP versions i.e. 8/8.1. Edit: It seems to be when map field data hasn't been properly created. A process was mapping data to the map field from FeedMe, but when resaving the entry in the control panel after this, no more error. |
Description
I have a page with a maps field, called "location". I want to check if the location field is filled in, however, from the moment
entry.location
is somewhere in the template (doesn't matter where, even if it is in an if statement), I get this error:First parameter must either be an object or the name of an existing class
Example code:
Additional info
The text was updated successfully, but these errors were encountered: