New Entries not showing up when viewing a list of all entries.
Hi Low,
I seem to be having an issue when adding new entries.
I have one reorder set with the following settings:
New Entries: Prepend
Check "Clear Cache": Yes
Categories: Show entries per single category...
On the front end my navigation is set up so that users can choose to view ALL entries regardless of their category or they can click a category name to view a list of entries within that specific category.
I'm using "Show entries per single category..." because my client wanted to be able to sort entries within each category.
When I add a new entry and click on the category that the entry was assigned too, the entry shows up at the top of the list as I would expect. However the problem occurs when I view the all entries list, the new entry is nowhere to be found. Even if I reorder the new entry within Low Reorder and save, it still does not show up.
I've also tried clearing all caches using "Tools > Data > Clear Caching"
Any thoughts?
Thanks,
Bryan
Side note: I also have a count on the all entry list that pulls the total number of entries using the query module and the count shows 49 entries, but only 48 are being displayed.
Replies
Low 19 Jul 2012 06:48
Hi Bryan,
Are you using the low_reorder:entries or channel:entries to show the list of all entries? If you're using the low_reorder:entries tag, what set ID are you passing? If you're passing the one where the settings "Show entries per single category" is enabled, a category ID is needed. Or are you using a set that includes that entire entries list?
Bryan 19 Jul 2012 22:13
Hey Low,
I'm using the same low_reorder:entries to show both the category views and all entries view. I'm doing this using session variables to determine the category id. In the case of the all entries view the category id is null so it should show all the entries.
Which is pretty much how I had it set up using channel:entries before installing Reorder.
Here's my code:
{exp:low_reorder:entries set="1" category="{exp:session_variables:get name='session_cat'}" parse="inward" limit="9999"}
{lv_work_list_view}
{/exp:low_reorder:entries}
From what you're saying it sounds like I'm going to have to create a new set within Reorder that includes the entire entries list to properly display all the entries or just use one of the standard channel:entries sort orders, which seems kind of inconvenient.
Low 20 Jul 2012 11:29
As of LR2, a Set is defined by set_id + category_id. If you're using 'show entries per single category', a category_id is needed to fetch the order of the entries. If that's not given, an empty set is returned.
So yeah, you either need to create another LR set which has no category filter, or use the channel:entries tag if no category_id is given.
I'll look into adding a parameter to define fallback behaviour when a set is not found, just returning unordered entries instead of an empty set.
Bryan 20 Jul 2012 20:18
Eh, no worries :) I see why it is set up that way, especially if you have an entry assigned to multiple categories. Trying to figure out any kind of consistant order for an all entries list based on multiple category orders could end up being a nightmare...
The thing that I thought was weird though, was that for my all entries view the low_reorder:entries loop was still publishing all the entries, except for any new entries that were added after I installed Reorder. Even though the category id was invalid.
Low 21 Jul 2012 10:48
Yes, that last thing is rather weird. It is possible that there is an entry in the DB with set_id 1 and cat_id 0, but that isn't getting updated anymore after a bug fix.
Do you require any more assistance with this?
Bryan 22 Jul 2012 02:31
Nope all set. Thanks for all the help :)