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.

Archive Entry List Errors

February 18, 2012 12:36am

Subscribe [1]
  • #1 / Feb 18, 2012 12:36am

    bcrabtree

    60 posts

    For some reason after updating to v2.4.0 - Build: date 20120123

    I’m receiving the following errors only on my archive entry page:

    A PHP Error was encountered
    Severity: Notice
    Message:  Undefined offset:  1
    Filename: channel/mod.channel.php
    Line Number: 1274

    A PHP Error was encountered
    Severity: Warning
    Message:  Cannot modify header information - headers already sent by (output started at /system/codeigniter/system/core/Exceptions.php:170)
    Filename: core/Common.php
    Line Number: 405

    If I turn off “Generate HTTP Page Headers?” in the Output and Debugging Preferences the second error goes away.

    My template code is:

    {exp:channel:entries channel="{current_channel}" orderby="date" sort="desc" disable="custom_fields|categories|member_data" cache="yes" refresh="60"}
     {date_heading display="yearly"}
      <h1 class="newsHeader">{entry_date format="%Y"}</h1>
     {/date_heading}
     {date_heading display="monthly"}
      <h2 class="date">{entry_date format="%F"}</h2>
      <ul id="archiveList">
     {/date_heading}
       <li><a href="http://{title_permalink=%27{template_group}%27}">{title}</a></li>
     {date_footer display="monthly"}
      </ul>
     {/date_footer}
    {/exp:channel:entries}

    Also, if I turn on “Enable GZIP Output?” I receive the following fatal error only on the archive entry page, the rest of my site is fine:
    Fatal error: ob_start() [ref.outcontrol]: Cannot use output buffering in output buffering display handlers in /system/codeigniter/system/core/Exceptions.php on line 166

    Any help would be greatly appreciated.

  • #2 / Feb 19, 2012 7:40am

    Sean C. Smith

    3818 posts

    Hi Bryan,

    I’m sorry that you are experiencing these errors. I tested your code above and it worked fine for me. Since there doesn’t appear to be any problem with your code I’m wondering if you have any add-ons in use that interact with your archives or that may be in use only on the template that is causing the trouble.

    Could you post up your complete template as additional context will be helpful for troubleshooting in this case.

    Sean

  • #3 / Feb 19, 2012 9:44pm

    bcrabtree

    60 posts

    Sure no problem,

    Here’s the entire template code:

    {preload_replace:current_channel="news"}
    {preload_replace:template_group="news"}
    {embed="includes/header" page_title="News"}
    
    <h1 class="contentHeader"><a href="http://{path={template_group}}">News</a> <span class="red">//</span> Archives</h1>
    <div id="colWrapper" class="noBorder">
     <div id="newsLeft">
    {exp:channel:entries channel="{current_channel}" orderby="date" sort="desc" disable="custom_fields|categories|member_data" cache="yes" refresh="60"}
     
     {date_heading display="yearly"}
      <h1 class="newsHeader">{entry_date format="%Y"}</h1>
     {/date_heading}
     {date_heading display="monthly"}
      <h2 class="date">{entry_date format="%F"}</h2>
      <ul id="archiveList">
     {/date_heading}
       <li><a href="http://{title_permalink=%27{template_group}%27}">{title}</a></li>
     {date_footer display="monthly"}
      </ul>
     {/date_footer}
    
    <!--PAGINATION-->
     {paginate}{if {total_pages} > 1}
      <div id="pagination" class="news">
      {if previous_page}
       <div class="prev" title="Newer Entries"><a href="http://{auto_path}">Newer Entries</a></div>
      {/if}{if next_page}
       <div class="next right" title="Older Entries"><a href="http://{auto_path}">Older Entries</a></div>
      {/if}
      </div>
     {/if}{/paginate}
    <!--PAGINATION-->
    
    {/exp:channel:entries}
    
     </div>
     {embed="{template_group}/sidebar"}
     
    </div>
    {footer}

    As you can see it’s a super light template, not much besides the code I already posted: {embed="includes/header" page_title="News"} and {footer} (a snippet) are found on every template and {embed="{template_group}/sidebar”} is found on every template within my news section. But the archives template is the only one returning the error.

  • #4 / Feb 23, 2012 5:49pm

    Dan Decker

    7338 posts

    Hi Bryan,

    The first error bing generated is related to this bug.

    Can you apply the fix outlined in the solution of the bug report and see if the error goes away for you?

    Cheers,

  • #5 / Feb 23, 2012 7:32pm

    bcrabtree

    60 posts

    That did it, thank you for the update 😊

  • #6 / Feb 24, 2012 5:54pm

    Sean C. Smith

    3818 posts

    Bryan,

    Glad to see that Dan was able to get you sorted out. Is there anything else I can assist you with?

    Sean

  • #7 / Feb 24, 2012 5:56pm

    bcrabtree

    60 posts

    Nope, that was it.

    Thanks again,
    Bryan

  • #8 / Feb 25, 2012 6:15pm

    Sean C. Smith

    3818 posts

    Great. I’m going to close out this thread, but feel free to post again when you have more questions.

    Sean

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

ExpressionEngine News!

#eecms, #events, #releases