ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Simple channel entry dump not ordering alphabetically

March 07, 2012 6:29pm

Subscribe [2]
  • #1 / Mar 07, 2012 6:29pm

    Hue Labs

    31 posts

    When I list cities in a dropdown, some entries are not ordered alphabetically. Scroll to the bottom of the select list and you’ll see some orphaned entries:

    http://travelnevada.com/accommodations/ (look at the bottom of the select list).

    EE code:

    {exp:channel:entries channel="cities" status="open" dynamic="no" orderby="title" sort="asc"}
      <option value="{url_title}">{title}</option>
    {/exp:channel:entries}

    Thanks in advance!

  • #2 / Mar 08, 2012 4:35pm

    Shane Eckert

    7174 posts

    Hello Hue Labs,

    I am sorry to hear you are running into this problem.

    That is odd. Your code looks good.

    I wonder if the text in that field has an odd character in it that’s causing it to be thrown to the bottom of the list? If you enable the the debugging you should be able to see the queries that are run for each page. Check on the query that calls the city names and see if there is any “extra” stuff in the field.

    To turn debugging on please go to your Control Panel and navigate to Admin->System Administration-> Output and Debugging. Please set the last two settings, which are “Display Output Profiler?” and “Display Template Debugging?”, to yes.

    Please let me know what you find.

    Cheers,

  • #3 / Mar 08, 2012 5:17pm

    Hue Labs

    31 posts

    Okay, thanks Shane. I showed in the query that order_by actually had “sticky|title”. Strange because that’s not what I had in my parameter.

    However, adding the parameter sticky=“off” resolved the issue.

    -Steve

  • #4 / Mar 08, 2012 5:20pm

    Shane Eckert

    7174 posts

    Hello Hue Labs,

    That is awesome. Good work.

    Thanks for letting me know.

    Have a great rest of the week!

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases