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.

display_by="day" issue

January 03, 2008 3:27am

Subscribe [5]
  • #1 / Jan 03, 2008 3:27am

    Andy Morris

    30 posts

    I have seen other posts on this, but wanted to offer my problem to see if it is a bug or I have something set wrong.

    I’m running version 1.6.1 and want to use display_by=“day” and only 1 entry is being returned when I use the limit=“1” parameter.

    I created a clean template page with the code section i’m fighting. It seems that at one point it worked fine and now it doesn’t. Maybe it was my imagination.

    I am running some extensions: edit alert, category checkboxes, LG add sitename, File by Mark Huot, edit tab ajax, empty options. I have tried disabling them and have had no luck. The are all currently disabled

    I have tried to remove sort and author_id parameters as well.

    {exp:weblog:entries weblog="blog" sort="desc" author_id="2|3" display_by="day" limit="1"}
    <div class="date_header">{date_heading}{entry_date format="%l %F %d, %Y"}{/date_heading}</div>
    
    
    <div class="time_stamp">{url_or_email_as_author} at {entry_date format="%g:%i %A %T"}</div>
    <span class="blog_title"><a href="http://{url_title_path=site/blog}">{title}</a></span>
    
    {body}
    
    {if allow_comments}({comment_total}) Comments | 
    {/if}<a href="http://{url_title_path=site/comments}"> View or leave a Comment</a>
    {date_footer display="daily"}
    
    This day's Categories: {categories backspace="1"}<a href="http://{path=site/blog}">{category_name}</a>, {/categories}
    {/date_footer}
    
    {/exp:weblog:entries}

    Here is a link to My Test Template

    Mod Edit: Moved to the Technical Support forum.

  • #2 / Jan 03, 2008 10:30am

    Robin Sowell

    13255 posts

    Since it’s a Core question, it really should go in the ‘Core’ forum.  But no reason I can see that it wouldn’t work w/core.  Can you replicate on your full install?  And you definitely have other entries for today by those authors?  I’d probably test with the author_id bit removed- and I’d put up a comparison tag with no display_by and say a limit of 10- make sure there are extra entries for ‘today’ that aren’t showing hen you include it.

  • #3 / Jan 03, 2008 1:12pm

    Andy Morris

    30 posts

    This site will eventually get a full install, but for the moment it’s core. I can try to replicate it in a full install, but it shouldn’t matter. (((update! now running version 1.6.1. - not core!!!!)))

    I have removed the author_id parameter as I said in my original post. I have 3 entries from the last day an entry was made.(Jan. 2nd) Two from one author and a third from another.

    Only one entry shows up unless I change the limit=“1” to another number…then that many entries show up. I’ll relink to my test page with the limit variable at 1 and then 7. (there are only 8 days worth of entries)

    Test Page

    You can see that the display_by parameter is just being ignored.

    Even if I directly call a day:
    http://andyandroxanne.net/index.php/site/blog/2007/12/18
    I still only get 1 post.

  • #4 / Jan 03, 2008 1:17pm

    Lisa Wess

    20502 posts

    Just as a note, I have gone ahead and moved this to the Core Technical Support forum since this is about an EECore installation.

  • #5 / Jan 03, 2008 10:13pm

    Andy Morris

    30 posts

    I have updated the site to the full version of 1.6.1 and the problem still exists. I have pulled down the site this was replacing in order to not violate the one license per site limitation.

    I would really like some support on this. This is my 4th or 5th ExpressionEngine site and I cannot for the life of me figure out why it won’t display more than one entry. I’ve provide every piece of information I can. I’m so close to having this site done and this is my one hold up.

    Will someone please move my post back to the Technical Support Forum?

  • #6 / Jan 03, 2008 10:17pm

    Lisa Wess

    20502 posts

    I’ve moved it back. =)  Ok, what we need to do is get some raw data, see what EE is seeing. So, can you create a blank template and put *only* this code in it:

    {exp:weblog:entries weblog="blog" sort="desc" author_id="2|3"  limit="20"}
    {title}: {entry_date format="%l %F %d, %Y"}
    
    {/exp:weblog:entries}

    and give us a link to the template?  Also, are you running any extensions?

  • #7 / Jan 03, 2008 10:22pm

    Andy Morris

    30 posts

    http://andyandroxanne.net/index.php/site/lisa_test/

    all my extensions are disabled. The following are installed but disabled:
    edit alert, category checkboxes, LG add sitename, File by Mark Huot, edit tab ajax, empty options

    thanks lisa.

  • #8 / Jan 03, 2008 10:28pm

    Lisa Wess

    20502 posts

    I edited my code, can you re-paste it? I made the error missing the slash in {/exp:weblog:entries} *blushes*

  • #9 / Jan 03, 2008 10:34pm

    Andy Morris

    30 posts

    i was a little suprised by the result and then i noticed the error. It’s ok. I make mistakes typing all day as well.

    updated.

  • #10 / Jan 03, 2008 10:40pm

    Lisa Wess

    20502 posts

    Ok, now, under that code, can you add your code?  So the end template wil be as below; just going to add some headings to keep things clear:

    <h1>no display_by parameter</h1>
    {exp:weblog:entries weblog="blog" sort="desc" author_id="2|3"  limit="20"}
    {title}: {entry_date format="%l %F %d, %Y"}
    
    {/exp:weblog:entries}
    
    <h1>display_by day</h1>
    {exp:weblog:entries weblog="blog" sort="desc" author_id="2|3" display_by="day" limit="1"}
    <div class="date_header">{date_heading display="daily"}{entry_date format="%l %F %d, %Y"}{/date_heading}</div>
    
    {title}: {entry_date format="%l %F %d, %Y"}
    
    <hr >
    {/exp:weblog:entries}

    Hopefully no typos this time, I definitely see slashes. =) thank you!

  • #11 / Jan 03, 2008 10:44pm

    Andy Morris

    30 posts

    O.K. I have done that.

  • #12 / Jan 03, 2008 10:47pm

    Lisa Wess

    20502 posts

    Ok, can you do another favor for me?  Delete all the code in the template and put this instead:

    <h1>no display_by parameter</h1>
    {exp:weblog:entries weblog="blog" sort="desc" author_id="2|3"  limit="20"}
    {title}: {entry_date format="%D, %F %d, %Y - %g:%i:%s""}
    
    {/exp:weblog:entries}
    
    <h1>display_by day</h1>
    {exp:weblog:entries weblog="blog" sort="desc" author_id="2|3" display_by="day" limit="10"}
    <div class="date_header">{date_heading display="daily"}{entry_date format="%D, %F %d, %Y - %g:%i:%s"}{/date_heading}</div>
    
    {title}: {entry_date format="%D, %F %d, %Y - %g:%i:%s"}
    
    <hr >
    {/exp:weblog:entries}

    and let me know when that’s done? thank you =)

  • #13 / Jan 03, 2008 10:51pm

    Andy Morris

    30 posts

    Done. There are only 14 total entries in this weblog spanning 8 days.

  • #14 / Jan 03, 2008 11:01pm

    Lisa Wess

    20502 posts

    Can you do one more thing for me? Change all of the %g to %G ? Just need to see it all in 24 hour time format. =)  Thanks for working through this with me!

  • #15 / Jan 03, 2008 11:08pm

    Andy Morris

    30 posts

    oh, no problem.  I’m on the clock. Thursdays are slow at the office. Just like every other day.

    I have made that change.

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

ExpressionEngine News!

#eecms, #events, #releases