Jump to:

3373 Posts in 998 Topics by 712 members

Data Model Questions

SilverStripe Forums » Data Model Questions » Class "ValidationResult" not found

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 165 Views
  • Joski
    Avatar
    Community Member
    1 Post

    Class "ValidationResult" not found Link to this post

    Hi,

    As looping throug my customers php log files I found following error message:

    PHP Fatal error: Class 'ValidationResult' not found in /xxx/xxxxxxx/xxxxxxxx.xxi/html/sapphire/core/model/DataObject.php on line 813

    The line seems to refer to the SilverStripe cms that is not under my management. In other words I have no previous knowledge of the system and the company that has installed and tailored it does not exist anymore. My customer howevere asked me to check whats going on so I wonder if you experts could tell me your opinion:

    - Is the situation more than just harmful? (The system seems to run ok.)
    - Is there a easy way to get rid of the problem?

    I found the module ValidationResult.php in the parent directory /xxx/xxxxxxx/xxxxxxxx.xxi/html/sapphire/core/
    but it looks that the program could not find it there.

    Thanks for your effort
    -Joski-

  • martimiz
    Avatar
    Forum Moderator
    1038 Posts

    Re: Class "ValidationResult" not found Link to this post

    Hi,

    The ValidationResult class is used to return validation results, mostly if some error is found posting a form, like a textfield that shouldn't be empty, someone trying to login with the wrong credentials, or any other validation a programmer might have included. This can either be in the CMS or on the front end of the site. But it might mean that some form somewhere now generates an error. Do you know the exact URL on which this happens?

    A class that cannot be found, can have multiple reasons, one of them being a problem with the file itself, the filename or filepermissions. But as you say, the file is present, readable(?), and, since it is a core SilverStipe file, it should be ok. So maybe it's this:

    On installation, SilverStripe builds a cache of all classes and templates, and by default stores it in the tmp directory - unless a directory 'silverstripe-cache' exists in the root of the website, that is writable, in which case the cache is stored there. Maybe something is wrong with the cache - fortunately it can be rebuilt by visiting the following url:

    yourdomain/dev/build?flush=1

    You need to be logged in to do this. Note: if you have no 'silverstripe-cache' present in your site root, first create one and make it writable.
    If it is already there, you might want to make a copy/backup of it, and then start with an empty one. This way you can always at least return to the previous situation if something goes wrong (which might happen on an olde installation)

    Let us know if this doesn't work for you,

    Martine

    165 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.