S2 Member not sorting by last name on search

Hi Cristián,

Congratulations on taking over S2 Member. I quite relieved that you’ve taken it on.

Is it possible to revisit this unresolved issue Searching s2Member-List on last_name not working? After much back and forth on Github, Raam determined that it’s a a bug. I can send you the link to the Github issue if that would help. Thanks.

Thank you, Steven! I’m very happy about it, too. :smile:

Sure, I’ll look at it now. Yes, please give the GitHub issue so I can review it as well. Thanks!

I’m going to quote your original post from there, so we keep everything in one place.

First thing that comes to mind is caching. Are you using caching in your site? Could you reproduce the problem if caching is disabled for that page?

I don’t think it’s a caching issue as I was able to replicate the issue on 3 clean WordPress installations. Here’s a link to the long GitHub discussion: https://github.com/wpsharks/s2member/issues/1103#issuecomment-318742101

You’ll see that part way down Raam acknowledges that it’s a bug or a least something in need of improvement.

You can see what happens at https://sstarnet.org/find-a-therapist/. The list loads correctly when the page loads. But when you search, use New York as an example, you’ll see that the names are ordered by first name, not last name.

The test installations mentioned in the Github thread aren’t working at the moment. I can try to fix them or replicate them if necessary. Thanks.

Thanks. Let me take a look.

By the way, I just remembered that the search box shows a list sorted by user id number, not first name. It just so happens that the users were initially imported sorted by first name so the user ids align with first names. This of course is not this case when members were added after the initial import.

Yeah, I noticed in my tests. I imported them randomly to avoid that.

I could duplicate the problem, but still haven’t managed to sort out the code for it.

The problem does seem to be around the area of code the Jason pointed to in the GitHub issue.

I’ll let you know when I have an update. :slight_smile:

Thanks for helping with this. The client is an association management company in Chicago. My contact there was quite unhappy about the glitch. I struggled with it for a couple of days thinking it was something I did wrong. We both were concerned that S2 Member was abandoned and we’re both relieved that it has come back to life. She’ll be very happy if you can sort it out. Thanks again.

Hi Cristián

I’m sure you’re very busy but wanted to check in to see if there’s been any progress on this issue.

I hope all is going well with your support of S2 Member.

Thanks again for helping all of us S2 Member users.

Steve

1 Like

Thanks for following up with this. I’m really sorry it’s not ready yet.

I haven’t forgotten it, I even started studying the code and testing some things, but haven’t finished sorting it out yet. I’ve just had quite a bit going on these first months, and some issues were a bit higher priority due to their nature and the number of users they affect. But I’ll get back to this as soon as I can.

Thank you for your patience! :slight_smile: :pray:

Thanks. I’m going to do a small unrelated project with the client and I wanted to be able give her an update.

1 Like
1 Like