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

Support archive

404 on Low Alphabet when filtering

Sean Delaney 19 Apr 2013 07:35 problem, complete

Any reasons for getting a 404 on Low Alphabet when I pass a letter to filter?

My A-Z list is output on a Structure managed URL like:

http://www.domain.com/services-soluti...

When I try to filter I get 404:

http://www.domain.com/services-soluti...

 
<ol class="azlist">
{exp:low_alphabet:azlist channel="gearbox" numbers="no" show_empty="no" show_expired="no" show_future_entries="no" alpha_field="title"}
<li><a href="/{segment_1}/{segment_2}/{segment_3}/{segment_4}/{low_alphabet_url}/" title="{low_alphabet_entries}">{low_alphabet_label}</a></li>
{/exp:low_alphabet:azlist}
</ol>

{exp:low_alphabet:entries channel="gearbox" numbers="no" alpha_filter="{segment_5}" orderby="title" dynamic="yes" sort="asc" disable="categories|category_fields|member_data|pagination|trackbacks"}
{if count == 1}<ol class="azlist_entries">{/if}
<li>
{if low_alphabet_heading}
<h3>{low_alphabet_label}</h3>
<ol>
<li>
{/if}
<a href="{page_url}/" title="{title}">{title}</a>
{if low_alphabet_footer}
</li>
</ol>
{/if}
</li>
{if count == total_results}</ol>{/if}
{/exp:low_alphabet:entries}

Replies

  1. Low 19 Apr 2013 07:49

    What does the Template Debugger tell you? Copy/paste the lot here, if you can. Also try dynamic="no", just to be sure. :)

  2. Sean Delaney 19 Apr 2013 07:55

    I've tried both dynamic no and yes. Neither work. TBH, the more I think about it, Transcribe might be playing a part in the issue. Each time the template debugger logs a Low Alphabet query, Transcribe does as well.

    I'll email you the template debugger output - client details are output and don't want them visible to the public.

  3. Low 19 Apr 2013 08:21

    Using Freebie (because of Structure-based URLs) to pass on the alpha_filter solved the issue here.

  4. Sean 4 Jul 2013 01:16

    Hi Low,

    I'm having the same issue and have installed freebie but am not sure what to set.

    my url structure is /region/service-directory/{page_uri} or /region/service-directory/{low_alphabet_url}

    I put service-directory in the breaking segments and then alphabet didn't filter and the individual entries didn't show up either. (but no 404s). Kind of expected this to happen.

    Is there a different way to get this to work?

  5. Low 4 Jul 2013 06:10

    Turn on template debugging and check what the actual opening tag is for the Entries tag. Check if the values for the parameters are correct. Adding dynamic="no" might also help.

  6. Sean 4 Jul 2013 16:27

    Hi Low,

    I set dynamic="no" and template debugging: here is the result

    http://pastie.org/private/kmwpotkt2zq...

    still getting 404s

  7. Low 5 Jul 2013 09:37

    First of all, i'm seeing this in the log:

    alpha_filter="industrial-service-directory"


    ...which means you've got the wrong variable in that parameter. The value should be something like "a" or "b" or "c", etc.

    Secondly, the log says it's returning entries: it's calling the channel_entries_query_result and channel_entries_tagdata hooks, which only happens when entries are returned.

    That means the 404 is triggered somewhere else, after tags are dealt with. Better go and look where you might have a {redirect="404"} tag somewhere that triggers this.

  8. Sean 5 Jul 2013 13:28

    Fixed the alpha_filter, was calling the wrong segment. No redirect="404" anywhere. Will investigate further.

    Could the issue be that segment_2, industrial-service-directory, is a structure based entry with an attached listing channel and the code for that particular page is coming through an embed template?

  9. Low 5 Jul 2013 13:30

    Well, Low Alphabet can't be triggering the 404's, so I'd be looking at Structure, yes.

  10. Sean 6 Jul 2013 11:38

    So I found the solution and thought I'd share here for anyone searching.

    Use freebie and then set freebie segments to the entire alphabet. This stops 404s but then low alphabet doesn't filter. Fortunately freebie stores the information in a new variable which I then plugged into alpha_filter parameter of Low Variables.

    {freebie_3} is the same as {segment_3}