Problem with the themes

Feed 6 posts, 3 voices

Jul 12, 2008 20:28
Avatar
3 posts

I get this error when i use anyone of the new themes from the site Fatal error: Undefined class constant 'NONE' in D:\Work\frog-stud\frog\app\frontend\classes\Page.php(359) : eval()'d code on line 33 I know it is related to this piece of code in the theme <?php if ($this->comment_status != Comment::NONE) $this->includeSnippet('comment-each'); ?> the normal theme uses this <?php if ($this->comment_status != 'none') { $this->includeSnippet('comment-each'); } ?>

Is this an problem with the themes or is "Comment::NONE" supposed to work and I have done something wrong

ps: if I us the code from the default theme everything is pacey

 
Jul 13, 2008 03:30
Avatar
819 posts

Hi neolode - You have the solution! The comment code is the major change between versions 0.9.2 and 0.9.3. The themes that have been ported to Frog all use the 0.9.3 version, so just grab the equivalent code from the download (0.9.2) version, and that should sort things.

Hope that helps!

 
Aug 12, 2008 01:41
Avatar
8 posts

I am having the same problem and me being new to php, can someone point me exactly how to fix this error message?

 
Aug 12, 2008 02:32
Avatar
3 posts

Well it's actually quite easy to fix you edit your main theme replacing the 0.9.3 Comment::<something> code with the word after the :: operator written like this 'something' example: Comment::NONE gets replaced with 'none' Hope it helps if not I'll try to explain it further

 
Aug 12, 2008 03:15
Avatar
8 posts

I am afraid I am still in the dark, Which file shall i edit? the css file or the page.php?

 
Aug 12, 2008 05:52
Avatar
3 posts

You need to edit the theme layout

 
Aug 12, 2008 09:35
Avatar
819 posts

@abbu - Neolode (thank you!) gave you the answer already, but I will fill it out, just for the record! :)

For 0.9.2:

If you get an error message along the lines of: Fatal error: Undefined class constant 'NONE' in [path-to-frog]/frog/app/frontend/classes/Page.php(359) : eval()'d code on line 25, then go to your Frog admin, click on the "Layouts" tab, and open the Layout that you have assigned to the page throwing the error. Find the two lines that include comment-status, and make sure they look like this:

<?php if ($this->comment_status != 'none') { $this->includeSnippet('comment-each'); } ?>
<?php if ($this->comment_status == 'open') { $this->includeSnippet('comment-form'); } ?>

For 0.9.3:

This version will not throw error message if you are using the 0.9.2 code, but for the record, here is the version that works best with 0.9.3 (again, found in your relevant "Layout" file):

<?php if ($this->comment_status != Comment::NONE) 
    $this->includeSnippet('comment-each'); ?>
<?php if ($this->comment_status == Comment::OPEN) 
    $this->includeSnippet('comment-form'); ?>

Hope that helps!