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.

date_footer display=daily not always working

June 26, 2010 5:46pm

Subscribe [5]
  • #1 / Jun 26, 2010 5:46pm

    Joobs

    362 posts

    I am having a problem with “date_footer” not always working, it usually works, but sometimes it doesnt and i have no idea why.

    This is my bugfix template code:

    
    
    

    basically what is happening is sometimes the code in the date footer isn’t getting displayed so it’s not closing the ul and div tag, which results in sub lists getting created.  It happens in several places and i dont understand why…

    to see this in action look:
    jumpoff (dot) tv/site/display_footer_bug/

    remove the (dot), i dont want google indexing that link since it’s a live site.

    What would be causing this to happen?

  • #2 / Jun 26, 2010 8:29pm

    Joobs

    362 posts

    I’ve added entry_date, gmt_entry_date, edit_date information to the list. To me it looks like these times might be the issue.

  • #3 / Jun 27, 2010 4:57pm

    Greg Salt

    3988 posts

    Hi Joobs,

    Can you please change your test template to just use one weblog. Have you made any specific date configurations in your site?

    Cheers

    Greg

  • #4 / Jun 27, 2010 5:05pm

    Joobs

    362 posts

    It’s now using one weblog, edited the code in my original post.

    I am not aware that we are doing anything weird with the date configurations. What do you mean by date configurations?

    settings in Admin > System Preferences > Localization Settings
    Server Time Zone = UTC-5
    Server Offset = blank
    Default Time Formatting = US
    DST = Yes
    Honour DST = Yes

    I did take over the development from another person.  Looking at the extensions and modules installed there doesn’t seem to be anything that would relate to the date.

  • #5 / Jun 27, 2010 5:25pm

    Joobs

    362 posts

    Seems if I set “honour DST” to “no” then the loop outputs as expected.

    Is this a bug with DST?

    What exactly does honour DST actually do, can you give an example how the dates would change if this was turned off or on.

    I also know that honour DST has been turned on and off a couple times during the development of the site as we had some other issues with localisation between the admins.

  • #6 / Jun 27, 2010 5:52pm

    Joobs

    362 posts

    Having experimented some more it looks like the issue is happening when an entry changes day depending if honour DST is on or not.

    I’ve attached a couple screenshots to show the differences between “honor dst” turned on and off.  I highlighted the entries that are effected so you can see how they have changed day.

  • #7 / Jun 28, 2010 3:12am

    John Henry Donovan

    12339 posts

    Joobs,

    What version and build of EE are you using?
    Are you using any extensions?

  • #8 / Jun 28, 2010 11:49am

    Joobs

    362 posts

    ExpressionEngine 1.6.9
    Build:  20100430

    We have a number of extensions installed.  I took over development, so a few of these probably arent being used anymore.

    jQuery for the Control Panel (v.1.1.1)
    Edit Tab AJAX (v.1.2.2)
    Category Checkboxes (v.1.1.5)
    Edit Menu (v.1.0.2)
    Facebook User Comment (v.1.0.0)
    FieldFrame (v.1.4.1)
    Filter By Author (v.1.0)
    Fresh Variables (v.1.1)
    LG Addon Updater (v.1.0.2)
    LG Add Sitename (v.1.2.0)
    LG Live Look (v.1.0.4)
    Low Seg2Cat (v.1.3)
    Publish Tweeks (v.0.8)
    SL Developer Info (v.1.4.5)
    User (v.2.0.9)
    MD Character Count (v.1.0.5)
    Tag Submit (v.2.6.6)
    URL title symbols (v.1.0)
    Calendar (v.1.0.4)

  • #9 / Jun 28, 2010 12:24pm

    Joobs

    362 posts

    I’ve managed to recreate something very similar on my sandbox install that has nothing installed.  But in the sandbox both the date header and the footer aren’t displaying so it’s slightly different.

    Used the template above.
    Set server time to -5
    dst = yes
    honor dst = yes
    Made some posts at 12:30am with “DST Active on Date of Entry” checked.  Make sure posts are on different days.
    Made some normal posts at different times on different days

    Again it’s happening when the entry switched day.

    I should also mention that in the live site, the posts didn’t have “DST Active on Date of Entry” ticked, but i’m not sure then why they would be changing date if dst wasn’t checked on the entry?

    I we had a number of authors in different time zones, some of which setup their own localisation settings.

  • #10 / Jun 28, 2010 7:38pm

    Brandon Jones

    5500 posts

    Joobs, you mentioned that on your sandbox both the date header and the footer aren’t displaying. Does that mean you aren’t seeing them intermittently, but not at all?

  • #11 / Jun 29, 2010 11:17am

    Joobs

    362 posts

    I realised on my sandbox install that the admin was localised to GMT and not the server time.  I couldn’t recreate the problem when I turned off member localisation.

    I meant i couldn’t see them intermittently, however, my current sandbox looks like this (it looks like just the date footer isnt being displayed) so i might have been mistaken about the date header not being shown.  The closing </ul> tag isn’t being rendered at the correct points.

    If you can’t recreate the problem, i can try to do a new install of EE and document the exact steps I took to see if anyone else can experience it.  But I would have to wait till the weekend. Would that be helpful?

  • #12 / Jun 29, 2010 6:11pm

    Brandon Jones

    5500 posts

    Yes, there have been changes to the DST implementation over the past few releases, so a clean install (rather than an upgrade) would be the best platform to try to reproduce the issue. We haven’t really seen any DST issues since the latest build was released.

  • #13 / Aug 13, 2010 2:56pm

    Brandon Rosage

    12 posts

    UPDATE: I’ve resolved this issue.

    I’ve done a fresh install of Build 20100805 and have had similar problems getting {date_heading} to behave properly. The templates simply don’t honor it and display the heading for every entry.

    Here’s the code:

    {exp:channel:entries channel="event" display_by="day" limit="4" sort="asc" show_future_entries="yes"}
                    {date_heading display="daily"}
                    <div class="date">
                        <h3><a href="#">{entry_date format="%l"} </a></h3>
    <p>                {/date_heading}<br />
                        <div class="event"><br />
                            </p><h4><a href="http://{url_title_path=event}">{title}</a></h4>
    <p>                        {exp:word_limit total="27"}{event-description}...{/exp:word_limit}<br />
                            <br />
                                <span class="type {categories}{category_name}{/categories}">{categories}{category_name}{/categories}</span><br />
                                <span class="time">{entry_date format="%g:%i %a"}</span><br />
                                {related_entries id="event-location"}<span class="location">{title}</span>{/related_entries}<br />
                                                    <br />
                        </div><br />
                    {date_footer display="daily"}<br />
                    </div><br />
                    {/date_footer}<br />
                {/exp:channel:entries}

    Yet, every entry sharing the same date displays the {date_heading}. I have DST-honoring set to “yes.” What gives?

  • #14 / Aug 14, 2010 2:20pm

    Greg Salt

    3988 posts

    Hi Joobs,

    Yes please then let us know the outcome. You may find that the explanation Robin gives about DST in this bug report helpful in understanding how DST works. I’m not certain that this is the root of the problem you are experiencing but it is useful background.

    Cheers

    Greg

  • #15 / Aug 14, 2010 4:09pm

    Joobs

    362 posts

    I never got around to doing a fresh install and replicating the issue.  I ended up turning off the option for users to change their localisation settings so that “fixed” the issue.

    If i have a spare hour today i will give it another go.

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

ExpressionEngine News!

#eecms, #events, #releases