Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Fatal error: Call to a member function XML_val()


Go to End


7 Posts   4075 Views

Avatar
Double-A-Ron

Community Member, 607 Posts

26 August 2008 at 9:11am

Hi all,

We've had a site up and running for over a month, and we're starting to get reports of a weird error being displayed at random intervals on the home page.

Fatal error: Call to a member function XML_val() on a non-object in /import_wfs1/share_rw/tmp/silverstripe-cache-home-httpd-vhlinks-www.vivaexpeditions.com/.cache on line 212

This is on blank white page - nothing is loaded.

Refreshing the page fixes it it seems.

Anyone seen this? It seems to pop up a few times a week.

Cheers
Aaron

Avatar
Willr

Forum Moderator, 5523 Posts

26 August 2008 at 12:03pm

Usually happens when you have like $Title.XML or $Content.FirstParagraph and theres no $Title or $Content for example.. It shouldnt throw an error for that though so we should probably just change it so it fails silently

Avatar
Double-A-Ron

Community Member, 607 Posts

26 August 2008 at 1:25pm

Would the Summary function have the same effect?

Avatar
Willr

Forum Moderator, 5523 Posts

26 August 2008 at 1:29pm

yes.

Avatar
Double-A-Ron

Community Member, 607 Posts

26 August 2008 at 1:31pm

I have a box on the right hand side that spits out a featured random page object excerpt. This might explain why the problem is also random.

Cheers Willr
Aaron

Avatar
Willr

Forum Moderator, 5523 Posts

26 August 2008 at 1:39pm

So I think all you need to do is do something like <% if MyRandomContent %>$RandomContent.Summary<% end_if %> or something and you should be sweet!. Random bugs are always the hardest to test :(

Avatar
Double-A-Ron

Community Member, 607 Posts

26 August 2008 at 1:42pm

Yeah that if statement is basically exactly what i've done. Will have to wait and see if the problem occurs again.

Cheers
Aaron Cooper