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

Support archive

Using the category_group="not x" parameter, Low Reorder still loops through all entries, regardless of group.

Visiluna 26 Sep 2014 16:47 problem, complete

Here is the tag I am using:

{exp:low_reorder:entries
set="faqs"
fallback="yes"
category_group="not 10"
}
{!-- FAQ QUESTION/ANSWER PAIR --}

{faq_question}

{faq_answer}

{/exp:low_reorder:entries}

There are 233 entries in the channel. Two entries do not have a category assigned. I am using the above tag to display all the entries that are not assigned to a category. My intent is that this tag should display only the two unassigned entries.

When this page loads, it renders the above s 100 times (the automatic limit when no limit is specified). However all the s are empty of content except two. The two that should be displayed are displayed correctly, but why are the others returning anything at all?

Thanks,
Philip

Replies

  1. Visiluna 26 Sep 2014 16:47

    It stripped out all my HTML example.

  2. Low 27 Sep 2014 08:28

    Check the notes for the category="" parameter here, which also applies to the category_group parameter. In short: technically, any entry that doesn't have an assigned category, also doesn't have category_group 10 assigned, so is returned. You need to add the uncategorized_entries="no" parameter to get the behaviour you want.

  3. Visiluna 30 Sep 2014 19:22

    I'm confused. It's the uncategorized entries I DO want. Even though there are only two (at the moment), the tag loop is displaying its content for every entry, categorized or not.

  4. Visiluna 30 Sep 2014 19:28

    Group 10 is the only category group assigned to this channel. Therefore, an entry in this channel (or set) can ONLY be assigned to a group 10 category, OR be uncategorized. So my thinking is I should be able to use the above code to display all uncategorized entries.

    I'm open to any corrections you may have to that line of thinking.

  5. Low 30 Sep 2014 19:32

    There's a couple of things you can try.

    Try adding {categories backspace="1"}{category_group},{/categories} to the entry to see which category group they are assigned to. Each group should be added to the param, eg: category_group="not 1|2|3"

    Have you tried getting the entries using the native channel:entries tag? Did you get the (unordered) entries there?

  6. Visiluna 30 Sep 2014 19:44

    Here's what I've done since your reply.

    I added {categories backspace="1"}{category_group},{/categories} to the template. Some of the entries showed nothing, others showed that they belonged to group 9. I'm not sure why that is because this channel does not have access to group 9, only group 10. It is not possible to assign any entry in this channel to any category in group 9.

    In an effort to narrow this down further, I changed category_group="not 10" to category_group="not 9|10|11", as these are the only three category groups in the site. This eliminated all the entries that previous said they belonged to group 9. However, there were still 64 loops of the tag displayed, the two uncategorized entries, plus 62 other empties.

    I have not yet tried listing these with only the native "entries" tag. I'll try that next.

  7. Visiluna 30 Sep 2014 19:51

    Okay, I tried it using the native "entries" tag with the following code:

    {exp:channel:entries
    channel="faqs"
    category_group="not 9|10|11"
    limit="1000"
    }

    It listed only the two uncategorized entries I wanted and nothing else.

    I tried it again with "not 10" instead of "not 9|10|11" and again got only the two desired entries with nothing else.

    It seems as if Low Replace may be including category groups that cannot be assigned to the current channel/set, possibly even category groups from other sites on the same MSM install. Is that possible?

  8. Low 30 Sep 2014 20:04

    I'll need to take a look myself. Please send SuperAdmin login credentials to hi at gotolow dot com if you can.

  9. Low 30 Sep 2014 21:00

    I added channel="faqs" to the tag, which solved the issue.

    Reason being: the faqs reorder set needs a category ID to be valid, because it's "Show entries per single category" preference. Not specifying a category results in an invalid set, so none of the set's filter settings are applied to the tag. Instead, it just calls the Channel Entries tag with the parameters present on the tag. And since there isn't a channel parameter on there, it displayed entries from all channels. So, adding channel="faqs" to the tag solved the issue.

  10. Visiluna 30 Sep 2014 21:08

    I see. So I had "fallback" enabled, but it didn't know what to fallback to?

    That leads to my next question/request. I really need to be able to order uncategorized entries. I know I can set the "Categories" setting to "Show entries from all categories," but that is an organizational nightmare. What I really need is something like the "...per single category" "Select category..." dropdown to include an option for uncategorized entries.

    Any thoughts on the feasibility of that?

    Thanks so much for your help.

  11. Low 30 Sep 2014 21:12

    Well, fallback="yes" will "fall back to the regular channel:entries tag when no valid Low Reorder Set is found", so having an invalid set (which is the case here because the category ID is missing) will just call the channel:entries tag with existing parameters.

    As for ordering uncategorized entries: I think you might be better off just creating a "General Questions" category instead, which makes everything on that page consistent.

  12. Visiluna 1 Oct 2014 16:10

    The problem with that solution is the category group is also used for channels other than our FAQs, channels for which a "General Questions" category would be inappropriate and confusing. Then I would also have to exclude that category when coding navigation, etc.

    I think we'll just stick with not ordering uncategorized entries (<--Feature Request) for now since we have so few.

    Thanks for all your help.