ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

30 comments = blank page?

February 25, 2008 9:45pm

Subscribe [2]
  • #1 / Feb 25, 2008 9:45pm

    dfbills

    56 posts

    For some reason, one of the entries on my site seems to generate a blank page when 30 or more comments are displayed.  Any ideas how to fix?  I’ve got the limit unspecified right now, but setting to 50 doesn’t seem to have any effect.

    {exp:comment:entries sort="asc"}
    <div class="comment">
    <div class="comment_avatar">{if avatar}{avatar_url}{/if}</div>
    <div class="comment_author">{name} said:</div>
    <div class="comment_date">{comment_date format="%F %d, %Y"} (<span class="comment_time">{exp:time_of_day}{entry_date format="%H"}{/exp:time_of_day}</span>)</div>
    
    {comment}
    
    </div>
    
    {/exp:comment:entries}
  • #2 / Feb 25, 2008 11:27pm

    Derek Jones

    7561 posts

    Can you make sure that error reporting is enabled and that display_errors is turned on in the PHP environment?  You might verify it by introducing a syntax error into a PHP enabled template:

    <?php
    $a = 'foo'
    echo $a;
    ?>
  • #3 / Feb 27, 2008 12:21pm

    dfbills

    56 posts

    I turned on debugging and now see:

    Parse error: syntax error, unexpected T_STRING in /usr/www/users/dfbills/system/core/core.functions.php(635) : eval()'d code on line 130

    Line 130 if that file is part of the “Create a custom URL” routine.  Specifically:

    $full_segment = $segment;

    Relevant system source below:

    /** ----------------------------------------
        /**  Create a custom URL
        /** ----------------------------------------*/
        
        // The input to this function is parsed and added to the
        // full site URL to create a full URL/URI
        
        function create_url($segment, $trailing_slash = true, $sess_id = 1)
        {
            global $PREFS, $REGX, $SESS;
                    
            // Since this function can be used via a callback
            // we'll fetch the segiment if it's an array
            
            if (is_array($segment))
            {
                $segment = $segment['1'];
            }
            
            if (isset($this->cached_url[$segment]))
            {
                return $this->cached_url[$segment];
            }
    
            $full_segment = $segment;         
            $segment = str_replace(array("'", '"'), '', $segment);
            $segment = preg_replace("/(.+?(/|\/))index(/|\/)(.*?)/", "\\1\\2", $segment);       
            $segment = preg_replace("/(.+?(/|\/))index$/", "\\1", $segment);
  • #4 / Feb 27, 2008 12:30pm

    Derek Jones

    7561 posts

    Parse error: syntax error, unexpected T_STRING in /usr/www/users/dfbills/system/core/core.functions.php(635) : eval()'d code on line 130

    This is actually referring to line 635 of core.functions.php, alerting you of a syntax error in line 130 of the eval()‘d code, namely, your template.  So this would be coming from either PHP in your template, or a problem with EE conditionals.  What is the full template?  You might also check the comments for that entry in the control panel and look for anything suspicious.  It should not be coming from the content of a comment, but we might as well check to be certain.

  • #5 / Feb 27, 2008 9:12pm

    dfbills

    56 posts

    Well, I made a copy of the template and started messing with my conditionals.  I broke it down and built it back up in the copy and it worked.  I tried the *untouched* original template and it just worked with no modifications.

  • #6 / Feb 27, 2008 9:22pm

    Derek Jones

    7561 posts

    Are the circumstances any different?  Logged in, not logged in.  Still viewing the same entry?  Did you check the comments for the entry in the control panel?

  • #7 / Feb 27, 2008 9:32pm

    dfbills

    56 posts

    Same circumstances, same browser window open from last time, still logged in. The comments were clean text, nothing tricky (last two in the list).

    http://dfbills.com/display/240/


    Now that it’s working, I think I’m going to update from 1.6.1 to 1.6.2.

  • #8 / Feb 27, 2008 9:43pm

    Derek Jones

    7561 posts

    Well it was definitely an error with how something was being parsed - those generally don’t go away on their own. 😛 You might try clearing your caches to make sure that the “good” state isn’t being delivered from a cache file and preventing the original error from rearing it’s head.  I hope that you’re right and that it was just a fluke, but there’s no harm in being thorough.

  • #9 / Feb 27, 2008 10:29pm

    dfbills

    56 posts

    I updated to 1.6.2 and cleared all the caches.  Still looking good, but I’m going to keep an eye on it.  Thanks, Derek.

  • #10 / Aug 18, 2008 10:49am

    dfbills

    56 posts

    And right you were, Derek.  Now that I’ve passed the 40 comment threshold, I’m seeing a nice php error from core.functions.

    Parse error: syntax error, unexpected T_STRING in ....../core/core.functions.php(637) : eval()‘d code on line 143

    Closing the 41st comment allows the page to load and the comment is plain text, no odd characters.  I’m running 1.6.4 20080710.

    Is this a conditionals issue?

  • #11 / Aug 18, 2008 10:54am

    Robin Sowell

    13255 posts

    Hm- if you pull out the avatar code- the whole conditional- any difference?  (I see nothing wrong with it- but it’s a quick way to test.)

  • #12 / Aug 18, 2008 11:05am

    dfbills

    56 posts

    I think I got it: there were no quotes around the 1 in this conditional check.  Adding them in allows the check to work. 

    {if {comment_total}>“1”}comments on this post:{/if}

    Could it be that simple?

  • #13 / Aug 18, 2008 11:06am

    Derek Jones

    7561 posts

    You also do not want to brace that variable in the conditional.  KB article: Troubleshooting Conditionals.

  • #14 / Aug 18, 2008 11:13am

    dfbills

    56 posts

    Done.  Let’s hope I don’t see this again at comment #51

  • #15 / Aug 18, 2008 11:33am

    Derek Jones

    7561 posts

    Nah, if you’ve combed the template to make sure all of your conditionals are using correct syntax, you should be good to go!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases