1

I have an EE1 site I created a few years ago that was chugging along happily until just recently. I had upgraded it to 1.7.3 about a year ago but beyond that there has been very little that was done to the site after it was set free into the wild.

For the most part the site is still working but one embed isn't working as it should. The site is has four groups that users are assigned to, via member groups, and when you login you are sent to the page for your group. Each group is identical in terms of the look and feel as well as what type of content is displayed for each with the exception of one group that has an extra nav item that links them to a discussion forum (EE Forum Module). The site is built with four template groups, one for each group, and an embeds template group (there are a couple other groups but they are irrelevant to this problem) that has all the common code shared amongst them. Each group has an events page that shows past events organized by years and hidden behind tabs (2009, 2010, 2011, etc.). Beneath this is a list of upcoming events for each group (don't ask, I tried to set it up the other way). Both of these past and upcoming event lists are embeds pulled from the embed template group and passed the groups category id.

Here's where things get strange. Three of the four groups show past events while one has suddenly stopped displaying the embed. Period. It's not even parsing it at all from the groups events template. Any idea why this might be happening? Other groups are working fine. Until a few days ago the site was parsing the embed without any problems.

On a semi-related note, I was going to update the site to EE2 and see if I could improve the way the site handled things like the events page but I ran into trouble with that as well. I started an EESE question for this problem but since I'm having trouble there as well I need to tackle this from both sides and see if I can get the site working properly first then worry about upgrading later.

UPDATE Template code for the group events page and the previous events list embed (be kind this was one of my first EE sites ever):

ebs/events

{if not_logged_in}
    {redirect="/"}
{/if}

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    {embed="_embeds/_head"}
    <body id="{segment_1}">
        <div id="page_wrapper">
            {embed="_embeds/_main_nav"}
            {embed="_embeds/_user_nav"}
            <div id="content">
                <!-- Previous Events -->
                {embed="_embeds/_previous_events" cat_id="4"}

                <!-- Upcoming Events -->
                {if segment_3 >= "{current_time format='%Y'}"}
                    {embed="_embeds/_upcoming_events" cat_id="4"}
                {/if}
            </div>
        </div>
        {embed="_embeds/_footer"}
    </body>
</html>

_embeds/_previous_events

<div class="section">
    <div class="left_column">
        <h2 style="padding-top: 0.5em;">Previous Events:</h2>
    </div>
    <div class="right_column">

        <!-- tabs -->
        <ul class="tabs">
        {exp:weblog:entries weblog="events" orderby="event_start_date" show_expired="yes" category="{embed:cat_id}" show_future_entries="no" status="open" sort="asc" dynamic="off"}
        {if {expiration_date} < {current_time}}
            {date_heading display="yearly"}
                <li><a{if {segment_3} == {year}} class="current"{/if} href="{site_url}{segment_1}/{segment_2}/{year}">{year}</a></li>
            {/date_heading}
        {/if}
        {/exp:weblog:entries}
        </ul>

        <!-- tab panels -->
        <div class="panels">
        {exp:weblog:entries weblog="events" orderby="event_start_date" show_expired="yes" category="{embed:cat_id}" show_future_entries="no" status="open" sort="asc" dynamic="off"}
            {if {expiration_date format="%Y"} == {segment_3} && {expiration_date} < {current_time}}
            <div class="events">
                <div class="event_entry">
                    <h3 class="event_title"><a href="{url_title_path='{segment_1}/event_details'}">{event_topic}</a></h3>
                    <h4 class="event_date">
                        <span class="event_days">{event_start_date format="%F"} {event_start_date format="%j"}{if {event_start_date format="%j"} != {event_end_date format="%j"}}&ndash;{event_end_date format="%j"}{/if},</span>
                        <span class="event_year">{event_start_date format="%Y"}</span>
                        <span class="entry_divider">|</span>
                        <em>{event_location}</em>
                    </h4>
                    {event_description}
                </div>
            </div>
            {/if}
            {if no_results}
            <div class="event_entry">
                <p>There have been no events for your group yet. There may be upcoming events listed below.</p>
            </div>
            {/if}
        {/exp:weblog:entries}
        </div>

    </div>
</div>
  • have you hit the hardcoded weblog entries limit="100" thing? (you can override it with a higher number) – James Smith Feb 21 '13 at 17:25
  • Nope. Even the number for all events, regardless of group, is under 100. – Stuart McCoy Feb 21 '13 at 17:33
  • Please post your template code to pastie.org. – Anna_MediaGirl Feb 21 '13 at 17:54
  • Anna, I added the code to the two templates in my question. Keep in mind the ebs/events template is identical to the other three groups with the exception of the cat_id variable being passed to the embedded code and the embedded code is working on the other three sections. – Stuart McCoy Feb 21 '13 at 18:09
  • I would recommend that you take your weblog entries tag and copy it into an otherwise blank template, and hard-code your values. Does it work then? Just a reduction test - the results may help lead you down the path to knowing what's up. :) – Lisa Feb 21 '13 at 18:15
1

I'd suggest further reduction of the previous_events code. Remove all fields from inside the tag... does it still work? Add a couple lines of code back in at a time until it breaks. Then narrow down to exact the field that is breaking. Most likely it's something in a specific entry. I've seen this before.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.