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'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.
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
Would the Summary function have the same effect?
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.
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 :(
Yeah that if statement is basically exactly what i've done. Will have to wait and see if the problem occurs again.