All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Next entry links to closed entries

Dylan 9 Feb 2011 08:58 problem, active

The Reorder module is working great, thanks. The only problem I am having is that the next entry tag seems to be including entries that are marked as closed. I'm using EE2.1.1 and Low Reorder 1.1.1

The code below is within a channel entries tag that returns one item.


<!--
{exp:low_reorder:next_entry field="project_order" entry_id="{entry_id}" prefix="next_" no_results=""}
<div id="next_project"><a href="{path="recent-projects/{next_url_title}"}/">Next Project</a></div>
{/exp:low_reorder:next_entry}
-->


Thanks,

Dylan

Replies

  1. Low 9 Feb 2011 09:08

    Hey Dylan,

    For now, it's probably best if you set the settings for that reorder field/channel combo not to include closed entries and save the order like that.

    I do realize tho, that if you then set an entry to Closed, you'd have to re-save the order again so the prev/next links work properly. I understand this is not optimal, and will think of a way to improve this.

  2. Dylan 10 Feb 2011 02:30

    Thanks Low, I tried re-saving the order but last open item is still linking to the closed item. I've also emptied all of the cache without success.

    I was using an older version of the module. I copied the new version over the top and also tried uninstalling it and setting it up again without success.

  3. Low 10 Feb 2011 09:14

    Ah yes, I see. Here's a quick hack to solve your issue right now, while I work on a more permanent solution.

    - Open mod.low_reorder.php in a text editor
    - Go to line #195 where it says "->where('t.site_id', $site_id)"
    - Create a new line directly below it and add "->where('t.status !=', 'closed')" without the double quotes
    - Save and try again

  4. Dylan 10 Feb 2011 21:54

    That works great, thanks.

  5. Rory Bernstein 3 Mar 2011 16:50

    Hi, I actually am having this problem, even after adding the line of code you refer to above. If I wrap my "next entry" link in an EE channel tag, it just links to itself. For now, I can get around the problem but just putting the closed entry at the end of the order, and for my purposes that works. But if you manage to get this working so that it doesn't call closed entries, that would be great.

  6. Low 4 Mar 2011 08:37

    Hey Rory, I've been working on a fix for this. Expect a new version over the weekend.

  7. glider 17 Jul 2011 01:58

    Hi Low,

    Any updates on this issue? I upgraded to Reorder 1.2.0 and it still seems to be including closed entries.

    Thanks!

  8. Low 17 Jul 2011 11:07

    Hey Andy,

    It should work with the latest version. What are the settings of your channel/reorder field combo? Make sure the Closed status isn't ticked on.

  9. glider 19 Jul 2011 15:59

    Thanks for the reply Low.

    I've tried a few different things. Right now I have the status parameter set to "not closed" for both the channel entries tag and the low_reorder tags, but it's still including the closed entries. Is that what you mean? Wasn't sure if the low_reorder tags even accepted the status parameter. I also have the closed entries at the bottom of the reorder list in the CP, and I've resaved the order and cleared the cache.

    Here's a look at my prev_entry/next_entry tags. Maybe I'm missing something:

     
    {exp:low_reorder:next_entry field="portfolio-reorder" status="not closed" url_title="{segment_2}"}
    <a href="{path="portfolio/{url_title}"}" title="Next" class="next">{title}</a>
    {if no_results}<a class="next-gray"></a>{/if}
    {/exp:low_reorder:next_entry}

    {exp:low_reorder:prev_entry field="portfolio-reorder" status="not closed" url_title="{segment_2}"}
    <a href="{path="portfolio/{url_title}"}" title="Previous" class="previous">{title}</a>
    {if no_results}<a class="previous-gray"></a>{/if}
    {/exp:low_reorder:prev_entry}
    </pre>


    Thanks for taking a look.

  10. Low 19 Jul 2011 21:04

    Could you perhaps send me SuperAdmin login credentials for this site? I think I need to take a closer look myself. You can send the info to low at loweblog dot com.