Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Documentation incorrect

SudoCatSudoCat Drowning under a Sea of Clients New

Hi,

I'm attempting to create my own application for a client's website, which has ended up leading me here:
http://docs.vanillaforums.com/developers/framework/models/

... Which is a complete dead end. Nothing on this page works. The second I put in the Validation and Model statement the page crashes without even providing an error message.

So, any suggestions?

Comments

  • If you get a blank page, apply common troubleshooting to see the actual PHP errors. I noticed you tagged your topic with 'bonk', so if you get a bonk error, apply the change in conf/config.php to see the error details

    There was an error rendering this rich post.

  • SudoCatSudoCat Drowning under a Sea of Clients New

    Probably shouldn't have used the bonk tag, as it doesn't even hit the error page (Despite having it set to the deverror.master.php); I'm not exactly sure how to approach debugging this considering the second I add:

    $Validation = new Validation();

    The page crashes. The source code for the page is entirely empty, no error messages - nada. I also used the SublimeText search in folder to scour the files for any mention of new Validation() or new Model() being used and found nothing - so why the hell are the docs reporting something that doesn't seem to exist yet in Vanilla? (Or has possibly been deprecated). Considering this page wasn't even there a month ago or so when I last was using the docs, I would at least expect the docs to be updated with actual usable information.

  • x00x00 MVP
    edited August 2014

    SudoCat is correct their is not such class for one classes are prefixed with Gnd_

    grep is your friend.

  • should be

    // Create a validation object to handle validation issues that the model will encounter:
    $Validation = new Gdn_Validation();
    
    // Create a new model based on a table in the database called "Blog":
    $BlogModel = new Gdn_Model('Blog', $Validation);
    

    however three is no point doing this without the structure in the table.

    grep is your friend.

  • SudoCatSudoCat Drowning under a Sea of Clients New

    @x00 said:
    should be

    // Create a validation object to handle validation issues that the model will encounter:
    $Validation = new Gdn_Validation();
    
    // Create a new model based on a table in the database called "Blog":
    $BlogModel = new Gdn_Model('Blog', $Validation);
    

    however three is no point doing this without the structure in the table.

    Thanks a lot, that's just what I needed :D I'll submit this to the git docs, if you haven't already.

  • LincLinc Detroit Admin

    @SudoCat Sorry about that, those docs are super stale. I was literally rewriting that entire page over the weekend but haven't finished & pushed yet.

  • The point is also that it shouldn't give a blank page. Guess it has something to do with error_reporting(E_ALL & ^E_NOTICE)

    There was an error rendering this rich post.

  • SudoCatSudoCat Drowning under a Sea of Clients New
    edited August 2014

    @UnderDog said:
    The point is also that it shouldn't give a blank page. Guess it has something to do with error_reporting(E_ALL & ^E_NOTICE)

    I think you might be right, I haven't put any effort into my MAMP setup yet, although most other errors appear fine... Whatever, I'll have a look tomorrow at work.

    @Linc said:
    SudoCat Sorry about that, those docs are super stale. I was literally rewriting that entire page over the weekend but haven't finished & pushed yet.

    Hahah that's okay, I'm just bloody grateful you've started updating them at all! This project had been absolute hell up until this point, it's suddenly all started falling into place with some documentation. I even got my boss to add the git feed to our flowdock so I can keep up with every new bit of information xD

Sign In or Register to comment.