We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 52634
    • 60 Posts
    One of my sites (currently development, not live) has an annoying, strange error, which occurs only with certain Browsers (FF and IE: error, Chrome: no error!) on specific pages of the site.

    The error is a fatal error, resulting of course in blank pages. Debug output reveals this:
    Fatal error: 
    Call to a member function getTVValue()
    on a non-object in /var/www/core/cache/includes/
    elements/modsnippet/14.include.cache.php on
    line 50
    

    From time to time, FF renders these pages without problems - despite of the cache status: tried clearing it, turning it off etc.
    This error happens, if it does, only on some special pages of the site:

    • redirect page of FormIt-forms
    • search & result page of SimpleSearch
    • container page of Articles
    All other pages (in fact using the same page template as the above) never caused that error.
    And the Chrome-Browser never shows that error an any page (why I have noticed it quite late in development process, unfortunately)! Strange, isn't it?

    I am using ModX Revo 2.2.4-pl (traditional), PHP 5.3.10-1 on Ubuntu 12.04., all packages up to date.

    Has anyone noticed a strange behaviour like that before or - even better - a solution for that?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Is it always 14?
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 52634
        • 60 Posts
        Quote from: sottwell at Dec 09, 2012, 07:28 AM
        Is it always 14?

        Yes, as far as I can see for now. Will check that later again to make sure.
          • 38169
          • 7 Posts
          Browsers (clients) cant make any difference on a server side error i think you are propably confused because you are always logged in backend with chrome and not with other browsers. For easier debuging of the problem i suggest to clear cache/flush permitions first and then view the contents of var/www/core/cache/includes/elements/modsnippet/14.include.cache.php to see what snippet is causing the problem.
            • 52634
            • 60 Posts
            Quote from: cktdesign at Dec 09, 2012, 09:06 AM
            Browsers (clients) cant make any difference on a server side error i think you are propably confused because you are always logged in backend with chrome and not with other browsers. For easier debuging of the problem i suggest to clear cache/flush permitions first and then view the contents of var/www/core/cache/includes/elements/modsnippet/14.include.cache.php to see what snippet is causing the problem.
            I don't think it is confusion about the login state. As the website's state is set to offline, I always have to be logged into the manager to see the frontend, regardless of the browser I use.
            But I will investigate your hint and try to search for the problem snippet.
              • 18373 ☆ A M B ☆
              • 3,141 Posts
              What snippet has the ID of 14, as indicated in the cache file url? The failing getTVValue() method call will be around line 43 of that snippet (cache files take abt 7 lines before getting to actual snippet content).
                Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.