Topic-icon Odd error at the top of our blog post.

Active Subscriptions:

None
10 years 8 months ago #35230 by sulkazi
Look at the page source of this page... somehow we are getting an error message injected at the very tope of the page.

www.healthylivingct.com/50-the-ymca-wellness-challenge-works

<br />
<b>Notice</b>: Trying to get property of non-object in <b>/home/healthyl/public_html/libraries/sourcecoast/articleContent.php</b> on line <b>494</b><br />
The topic has been locked.
Support Specialist
10 years 8 months ago #35233 by alzander
Scott,
Thanks for the report. The message is a PHP notice, which isn't a real issue, but something that isn't quite right and PHP just wants to let you know something may be wrong. I hope that makes sense.

On a production site, you'll want to change your Error Reporting setting in the Global Configuration area of Joomla to "None". That will hide the PHP messages like that which are uncommon, but do happen.

If you want to fix the actual issue, you can edit the /libraries/sourcecoast/articleContent.php file. Around line 494, you'll see the following block:
if(isset($article->image))
{
    $image = json_decode($article->image);
    $filePath = str_replace(JURI::root(), '', $image->url);

    jimport('joomla.filesystem.file');
    if(JFile::exists($filePath))
        $url = $image->url;
}
Change that to:
if(isset($article->image))
{
    $image = json_decode($article->image);
    if (isset($image->url)
    {
        $filePath = str_replace(JURI::root(), '', $image->url);

        jimport('joomla.filesystem.file');
        if(JFile::exists($filePath))
            $url = $image->url;
    }
}
I've already applied that change to our next release and it will be available in JFBConnect v5.1.

I hope that helps, and thanks for the report,
Alex
The topic has been locked.
Active Subscriptions:

None
10 years 8 months ago #35240 by sulkazi
I had the guys from yootheme looking into an issue and they left the error reporting on Maximum... sorry to waste your time with this... and thanks for the update. I cannot wait for 5.1. You guys are the best!

Scotty
The topic has been locked.
Support Specialist
10 years 8 months ago #35242 by alzander
Scotty,
You can't waste our time. That's what we're here for. I'm just glad it was an easy solution as well as a quick fix we could implement in time for the next release.

Thank you, and have a great weekend,
Alex
The topic has been locked.