Jump to content

Alphabetic sort, unintelligible behavior


olafgleba
 Share

Recommended Posts

Hi,

simple task, simple Question. I have a (quit large) result list with a alpabetic sorting on given titles only.

$results = $pages->find("... sort=job_titel");

Funnily enough the output looks like this (on first page):

screenshot-results-sort.png.fbdbc14450d6d38c5486fed353030ea6.png

So two entries obviously don't want to get sorted ? (beside those two entries all is sorted well)

Any idea how that is possible? Checked the entries,- no weird characters or whitespace/LF s.o. in field job_titel

Thanks for any hint, cheers, Olaf

- ProcessWire 3.0.148

 

Link to comment
Share on other sites

My first guess would be that there is actually something in the job_titel field for those two entries that is causing the sorting error.

Have you looked directly into the database fields themselves – using something like phpMyAdmin or Adminer (hosting companies often provide a tool in Control Panel or the like)? You'll find it's quite easy to navigate the PW database once you take a look at it. You may see something that you're not seeing using other methods.

 

 

 

  • Like 1
Link to comment
Share on other sites

Thx @BillH

I did that shortly after i sent my post. And there it was,- each of both related entries had a single whitespace before the string. Solved.

Sorry for not posting this more in time.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...