Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Category select fields sort order

Quote Reply
Category select fields sort order
In Reply To:
* bugfix: select lists organized by creation, not alphabetically
I don't see why this should have been a bug - thought it was a feature. Crazy
With the sort order by creation my category drop down lists are unusable. I have about 350 categories, added new ones when they are needed (i.e. when a category has too many links and it makes sense to move them to subcategories).
So it is absolutely necessary for me to have them ordered alphabetically in the drop down lists - it is nearly impossible to find a specific category when they are ordered by creation (= id??).

Alex, could you please tell me how to change the sort order of the category drop down lists back to alphabetically.
Or make it an option in the admin?

thanx,
Andreas

--------------------------------------------
http://www.archaeologie-online.de
Quote Reply
Similar problem with related categories In reply to
There's a similar problem when you build a category including only related subcategories (only "@" but no "real" subcats or links): list of (related) subcats is sorted by date of creation not by alphabet. Not a big problem but perhaps in 2.03 ...

Regards,
Andy

Quote Reply
Re: Category select fields sort order In reply to
Another problem with select fields:

when I set db_gen_category_list to "No" in the Build options, I get an 500 error when adding a link (using add.cgi as user, not from the admin). Setting this option to "Yes" avoids the error.

Now, what has this to do with the sort order?
The point is that at least I don't want my users to see a category select field when it is sorted in no obvious order. At the moment it looks like that:
...
Länder/Europa/Deutschland
Entertainment
Länder/Europa/Italien
Länder/Europa/Deutschland/Institutionen
Museen & Ausstellungen
Länder/Europa/Deutschland/Regionen
...

Before Links SQL 2.0.2 it was ordered like this:
...
Entertainment
Museen & Ausstellungen
Länder/Europa/Deutschland
Länder/Europa/Deutschland/Institutionen
Länder/Europa/Deutschland/Regionen
Länder/Europa/Italien
...

which was quite perfect.

So for now my situation is that I can either present a totally cluttered category dropdown to users (and admins) or get 500-errors when a user wants to add a resource - that's not what I'd call a comfortable situation.

... Andreas


--------------------------------------------
http://www.archaeologie-online.de
Quote Reply
Re: Category select fields sort order In reply to
Just played around with db_gen_category_list and now the 500 error doesn't show up ???
If I set it to "Yes" or "No", it's working now without error. Early this morning I could clearly reproduce the error - it came up every time with db_gen_category_list = "No" and now it works...
I have no idea how that comes.
So never mind what I said in my last message about the 500 - it's gone.

Still there is that category dropdown sort order problem.

Regards, Andreas

--------------------------------------------
http://www.archaeologie-online.de
Quote Reply
Re: Category select fields sort order In reply to
Here it goes again: a 500 error! Frown
db_gen_category_list = "No" brings the error.
So I switched the setting to "Yes", went to the browser window containing the error message, clicked on the "back" button of the browser and submitted the form again. Voila - it works.

Isn't anybody else getting an error in add.cgi with db_gen_category_list = "No" ???

Andreas

--------------------------------------------
http://www.archaeologie-online.de
Quote Reply
Re: Category select fields sort order In reply to
Hast Du das Admin-Verzeichnis mit einem Passwort versehen?
Dann Chmod 755 das Verzeichnis welches davor liegt erneut.

Hoffe das hilft

nazdarovje
Michael

Quote Reply
Re: Category select fields sort order In reply to
Ach ja,

the sort order of the select field is like you made the input when creating the select-field by admin panel.

Modify the column with the select-field (actually modify seems not to be saved) to the sort order you wish.

Michael

Quote Reply
Re: Category select fields sort order In reply to
I don't quite understand why this is changed or if there's a feature that I can't tap find or tap into, but I too have this problem. So this is what I did.

In this directory:
......admin/GT/SQL/Display

there is a file called HTML.pm

in sub select {
line 140
the following line in Version 2.0.1 was changed from:
my $sort_f = exists $opts->{sort} ? $opts->{sort} : sub { lc $hash{$a} cmp lc $hash{$b} };

to this line in 2.0.2:
my $sort_f = exists $opts->{sort} ? $opts->{sort} : '';

Don't yet know if that was intentional, but I restored the missing info from 2.0.1 and,
at first glance, things seem to be working the way they used to.

Hope that helps for the short run anyway.

Peace.

Quote Reply
Re: Category select fields sort order In reply to
Thanx, klangan!

Seems to work here, too. Smile
And it seems to be the piece of code I was searching for, but didn't find. Maybe I searched too late at night...

cheers
Andreas

--------------------------------------------
http://www.archaeologie-online.de
Quote Reply
Re: Category select fields sort order In reply to
Hi Michael,

yes the admin dir is password protetected AND the main links directory IS chmod 755.
So the permissions seem to be OK for all the links directories. But thanks for that guess.

Some more info about this special error:
Although I get it, the script does in fact work.
I get the admin notification mails and the added links are inserted into the database. Nevertheless the 500 error message is presented to the user... weird...

Greetings from Freiburg to Bonn!
Andreas

--------------------------------------------
http://www.archaeologie-online.de
Quote Reply
Re: Category select fields sort order In reply to
Hi,

I think I was too hasty in removing the alphabetizing. I will make sure the category names are sorted alphabetically, whereas custom select columns are sorted by creation.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Category select fields sort order In reply to
Ok... can this be an option?

Since you are reworking it, what about the default being alpha for links fields, and creation for custom fields, but give the option to set that in the properties table?

PUGDOG® Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: Category select fields sort order In reply to
Way cool.. way cool.. I love this forum. That is exactly what I needed as well.