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.

Fatal error: Class 'PageModel' not found in [...] settings.php on line 45

fh111fh111 Vanilla Padawan ✭✭
edited December 2011 in Vanilla 2.0 - 2.8

When trying to activate the app i get

Fatal error: Class 'PageModel' not found in .../applications/vanillacms/settings/structure.php on line 45

Best Answers

«1

Answers

  • Hmm, weird. Is anyone else getting this problem? Maybe the models havent hooked in yet? But it works for me. You can temporarily solve this by commenting out line 45 and 49, the only thins is that you will have to resave your Example Page to get the proper UrlCode routing setup.

  • Yes, I was getting this problem as well. =(

  • ToddTodd Chief Product Officer Vanilla Staff

    I recommend you both post your Vanilla versions here.

  • fh111fh111 Vanilla Padawan ✭✭
    edited December 2011

    I'm using 2.0.18.1

    thanks for looking nto this

    edit:
    i commented out line 45 and 49 and it works great. great app!

  • SS ✭✭
    edited December 2011

    I suppose that error happened while enabling application.

    Line 45: $PageModel = new PageModel($this);
    

    Application not yet enabled, and autoloader cant find PageModel class.

    If you are using models or other plugins in structure.php (or Setup()) make sure that PHP can reach it without any magics. Just add to structure.php:
    require_once PATH_APPLICATIONS . '/<ApplicationFolder>/models/class.pagemodel.php';

  • fh111 said:
    I'm using 2.0.18.1

    thanks for looking nto this

    edit:
    i commented out line 45 and 49 and it works great. great app!

  • i get this too :(

  • edited December 2011

    require_once PATH_APPLICATIONS . '//models/class.pagemodel.php'; i've added this but still doesn't work. help me please. Stept by step.

  • RainulfRainulf New
    Answer ✓

    @fh111 @S @Ha77man @xuereb, add the following line in vanillacms/settings/class.hooks.php:

    include(PATH_APPLICATIONS . DS . 'vanillacms' . DS . 'models' . DS . 'class.pagemodel.php');
    Below line 117.

    Or you can download the latest in the github repository, https://github.com/JockeGustin/vanillacms/downloads

  • SheriffenSheriffen
    Answer ✓

    Yeah, it should be fixed in latest github version.

  • When I try to activate this, I get this the same error "Fatal error: Class 'PageModel' not found in /home/afnme/public_html/applications/vanillacms/settings/structure.php on line 45" I have download it from http://vanillaforums.org and from github repository, but made no difference.

    I am using Version 2 of vanilla forums.

  • Hmm, i have the same issue like AFN. Latest Build from GitHub and 2.0.18.1 Vanilla.

    Fatal error: Class 'PageModel' not found in vanilla/applications/vanillacms/settings/structure.php on line 45

    :/

  • I have the same issue as AFN and wiesson... latest version of Vanilla and the latest build...
    Checked /vanillacms/settings/class.hooks.php line below 117 and it matches that exactly...

    still same error... please help

  • I have done a test while I was also testing out a theme that I have cloned and the version (Vanilla 2.0.18.1) does not give me that error , however the version that I have installed on my website give me that error.

    I do not get that error with Vanilla 2.0.18.1, but fair as I know anything earlier than (Vanilla 2.0.18.1) would give you that error.

    So now my question is, how can I find out what version do I have installed on my website?

  • TimTim Operations Vanilla Staff

    var_dump(APPLICATION_VERSION); die();

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • I'm using 2.0.18.1 and it still doesn't work

  • I finally managed to reproduce the bug, this commit should fix it!

    https://github.com/JockeGustin/vanillacms/commit/f7909de34b9047dab07d54f088d55f6c5c482265

  • I updated and I'm still getting the

    Fatal error: Class 'PageModel' not found in vanilla/applications/vanillacms/settings/structure.php on line 45

  • @Sheriffen you should probably update the download from here, http://vanillaforums.org/addon/825/vanilla-cms

  • I finally managed to completely reproduce the error your getting on another server and managed to fix it in the latest commit in github (atleast now it works in both my servers). Please report if your still getting the error using the latest checkout from github!

Sign In or Register to comment.