Author Topic: Sort columns aren't working  (Read 7283 times)

Offline rhambus

  • Newbie
  • *
  • Posts: 4
Sort columns aren't working
« on: January 19, 2007, 12:24:21 AM »
I recently installed Roundcube and love it. However, I went and copied all my IMAP messages from my friend's old server to my new shared one (using Thunderbird). It worked well except that I had sorted the messages in Thunderbird alphabetically before I copied them. I didn't think it would make a difference until I opened the mailbox up in Roundcube and the messages are listed in alphabetical order. I tried clicking on the column headings to sort by date but that didn't work - nothing happened. I have read that Roundcube relies on the SORT function of the IMAP server to sort. I don't know if I have that (my webhost is 1and1.com), but at any rate, sorting isn't working. I looked it up in the forums and found this patch by Eric Stadherr that at first seemed to be to be what I need.

http://lists.roundcube.net/mail-archive/roundcube.dev/2006/08/7/

However, I believe that the code in the program/include/rcube_imap.inc file has changed since this was posted on August 1, 2006.

My question is: is there a current patch out there that will let those of us without the IMAP SORT capability sort our messages with Roundcube? I searched around but couldn't find anything. Or is there some way to make this patch work with the new code? I am running the 0.1 beta 2 package, and downloaded it just about a week ago, so it should be pretty darn recent. Any help out there would be greatly appreciated. I want my wife to be able to use this webmail and she will be pretty mad if the messages aren't in date order! If I could get this working Roundcube would be just about perfect for me.

Thanks in advance for your help!

Rhambus

Offline rhambus

  • Newbie
  • *
  • Posts: 4
Re: Sort columns aren't working
« Reply #1 on: January 28, 2007, 10:08:56 AM »
bump

Hey, someone must know about this? Can anyone give me a word of advice?

Rhambus

Offline Manfred

  • Newbie
  • *
  • Posts: 7
Re: Sort columns aren't working
« Reply #2 on: February 04, 2007, 08:11:50 AM »
I have the same problem here with the sort, even with 462. But at least with that version, hitting F5 to reload the bowser page, suddenly it starts working. This happens in both, FF2 and IE7. But there's another strange behavior:

No matter using ASC or DESC sorting, the dates are still mostly messed up, although differently in each. I suspect that the sorting happens on the received stamp but the sent stamp is the one displayed, or vice versa. Hopefully there will be a fix for all this as well soon... :-(

Manfred


Offline Saiph

  • Newbie
  • *
  • Posts: 2
Re: Sort columns aren't working
« Reply #3 on: February 05, 2007, 06:23:47 PM »
Quote from: Manfred
I have the same problem here with the sort, even with 462. But at least with that version, hitting F5 to reload the bowser page, suddenly it starts working. This happens in both, FF2 and IE7.

I had the same issue. A bit of alert-box-debugging :P helped me find out what's going on.
The problem occurs if your main inbox is empty, but you have some mails in other folders. It's because RC enables sorting when it displays the folder list, not upon switching between folders nor after the number of messages in current folder changes (for example due to deletion).
So when you have your LDA put all your mail in appropriate folders leaving your main inbox empty, then sorting will be disabled for you, and switching to filled folders won't update that state.

So my first patch attempt was to adjust the sorting capability on every folder switch and each time folder contents is updated by turning sorting on if there are more than 1 messages. But then I realised, that it should be possible to change sorting order even if the mailbox is empty, since it affects your preferences and lets you change your sorting order for future sessions. So all I changed was
make RC unconditionally enable sorting.
Here's the patch for program/js/app.js from svn-464

<      this.enable_command('toggle_status', true);
---
>      this.enable_command('toggle_status', 'sort', true);
150,153c150
<       {
<       this.enable_command('nextmessage', true);
<       this.enable_command('lastmessage', true);
<       }
---
>       this.enable_command('nextmessage', 'lastmessage', true);
155,158c152
<       {
<       this.enable_command('previousmessage', true);
<       this.enable_command('firstmessage', true);
<       }
---
>       this.enable_command('previousmessage', 'firstmessage', true);
189c183
<      this.enable_command('select-all', 'select-none', 'sort', 'expunge', true);
---
>      this.enable_command('select-all', 'select-none', 'expunge', true);

Don't forget to refresh your browser's cache after applying this.
Hope this helps.
And thumbs up to the developers - RoundCube + Dovecot simply rock together.

Offline rhambus

  • Newbie
  • *
  • Posts: 4
Re: Sort columns aren't working
« Reply #4 on: February 05, 2007, 09:33:08 PM »
I actually have plenty of messages in my inbox, and the program still won't sort. But is it worth trying this patch anyway? Will it work if I am using the 0.1 beta 2 version? I am not really comfortable fooling around with SVN releases...

Robert

Offline Saiph

  • Newbie
  • *
  • Posts: 2
Re: Sort columns aren't working
« Reply #5 on: February 06, 2007, 05:33:32 AM »
Sorry, this patch has nothing to do with client-side sorting. It just fixes a bug with making use of IMAP server sorting.
I'm not really sure RC can sort the messages at all...

I think you'd better copy your messages again having them sorted in the right order.
Or switch to a better IMAP server. IMHO Dovecot would do great - it sorts messages in a blink of an eye, because of its indexing facilities.

Offline Fazul

  • Newbie
  • *
  • Posts: 7
Re: Sort columns aren't working
« Reply #6 on: March 05, 2007, 10:44:22 AM »
I have the same problem and I use the same web hosting provider, 1 and 1.

There must be a solution to this. In fact, there was at one point but the link to the patch is dead. Switching to a better IMAP server is not an option for some of us.

Offline bugler

  • Jr. Member
  • **
  • Posts: 54
Re: Sort columns aren't working
« Reply #7 on: March 05, 2007, 03:51:36 PM »
For what i know rouncube asks the imap server whether it has sorting capabilities.

Maybe your imap server doesn´ t have it.

Have you checked that?

Good luck.

Offline Fazul

  • Newbie
  • *
  • Posts: 7
Re: Sort columns aren't working
« Reply #8 on: March 05, 2007, 04:13:23 PM »
I have a support request in with 1&1 at the moment. Hopefully they can answer what IMAP server they are using and if it has sorting capabilities.

I suspect that the server they are using does not. That being the case, the point of this thread as I understand it was to request an alternative sorting method for those users who are in the same boat that I am. Surely there are others who are experiencing a similar problem, or have in the past?

Offline rhambus

  • Newbie
  • *
  • Posts: 4
Re: Sort columns aren't working
« Reply #9 on: March 05, 2007, 10:40:12 PM »
Fazul -

That's right. I don't feel that sorting independent of the server is that rare in a webmail program - I think SquirrelMail can do it, but I'm not sure. I don't know a lot about the mechanics of Roundcube, but it seems that if it's using a database, a sort function based on various fields wouldn't be out of the question, even if it is slower. Please let me know what 1and1 says - I think but I am not sure that their own webmail client can sort, so it seems it is possible.

Rhambus

Offline Fazul

  • Newbie
  • *
  • Posts: 7
Re: Sort columns aren't working
« Reply #10 on: March 05, 2007, 11:11:43 PM »
I actually have database caching turned off at the moment since the install instructions I used recommended against it. But you're right - if enough information from the message header is stored in the database RC should be able to use that to sort. I haven't looked through the schema yet to know for sure if the received date is one of those fields.

1 and 1 typically takes about 30 hours to respond but I will be sure to post their reply here.

Offline Fazul

  • Newbie
  • *
  • Posts: 7
Re: Sort columns aren't working
« Reply #11 on: March 07, 2007, 09:36:33 AM »
Here is the response from 1&1:

Thank you for contacting us.

At the moment it is not possible to set up automatic filter
rules on the server. This means the sorting of the e-mail still has to
be done
manually using your client email program.

To access email using web interface it would only be possible
through WebMail, this provides the full functionality of an e-mail
program.
In addition to your local e-mail program, 1&1 enables you to read
and send e-mails using any web browser. You can access your
e-mail account from any Internet-connected computer.

To access 1&1 WebMail please refer to the faq link for intructions:
http://faq.1and1.com/e_mail/webmail_/3.html

If you have any further questions please do not hesitate to contact us.

As expected, our mail server can not sort so the client must do the work.

Offline miseryshining

  • Newbie
  • *
  • Posts: 7
Re: Sort columns aren't working
« Reply #12 on: April 17, 2007, 05:06:25 AM »
thx for the patch, i applied it to build 541 and it fixed the sorting with an empty inbox. perfect!

and i agree that Dovecot and Roundcube are a happy couple, works great.