Hi there, I am getting an Error: Call to member function url() on null when I try to visit just my homepage (www.pamelaryckman.com). How do I fix this? It happened after I adjusted some descriptions/images on the site.
The error is here
$entry = $site->find($item->entry()); // this returns null, so no next line throws the error
$link = $entry->url();
One way to prevent the error
$link = $entry?->url(); // will then return null if entry is null
But maybe the error is somewhere else, what is stored in your structure field? Please post blueprint.
Hi there, where do you access the blueprint from the backend panel (on the CMS)? I have looked everywhere…Thanks!
You don’t, you need access to the file system.
I was under the impression that you had access to the code. If you only made changes via the Panel and are running into this error, then whoever developed the site didn’t account for all possible uses.
Is there no way to access the file system from the cms? Am I stuck until I hear back from the developer?
No, that’s not possible and would be very insecure. You need FTP/SSH access to the file system, don’t you have your own hosting account?
The only thing you can try is to undo the changes, like if you deleted something, add it again. Better than a broken site. It’s not good that the site shows the actual errors, the developer left it in debug mode, which is a no-go.
Thank you - I have reached out to my developer and just waiting to hopefully hear back.
If I don’t hear back by today I will try and undo all of the changes - but I deleted items so not sure how to get those back.
Also, yes I am hosting the account on Opalstack - is there any way to get access code from there?
If you don’t hear back from the developer, maybe post a screenshot of this feature field, so that the actual fields in such an entry are visible.
What is a feature field?
This field that causes the error, it’s called featured and is a so-called structure field, ie. a field into which you can enter multiple entries, I can’t tell with what label it shows up in your Panel.
Yes, you should have access via your account.
I have heard back from my developer and he said he will look into this tomorrow morning, I will share this conversation - which will hopefully provide some helpful context!