Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-03-01 18:24:24

Niconemo
Member
From: Rhône-Alpes, France
Registered: 2005-04-18
Posts: 557

Something weird with the alphabetical sort of articles

sort="Title asc"

Produces something weird with accentuated characters :

Example, the title “Étoile” should be somewhere around the “E” initial… But it appears between the “A” and the “B” :

My example articles :

  1. Abricot
  2. Arbre
  3. Étoile
  4. Banane
  5. Duduche
  6. Euh…
  7. Filtre à café
  8. Textpattern
  9. Zèbre

Nico

Offline

#2 2007-03-01 19:18:14

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Something weird with the alphabetical sort of articles

Hmm. Well, it’s not a bug I can replicate – that list works fine for me on my local Windows server. This might be it.

Offline

#3 2007-03-02 03:18:26

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: Something weird with the alphabetical sort of articles

Nico, what’s your version of MySQL, what charset are you using, and what collate?

Offline

#4 2007-03-02 07:19:26

Niconemo
Member
From: Rhône-Alpes, France
Registered: 2005-04-18
Posts: 557

Re: Something weird with the alphabetical sort of articles

Thank you for you answers

Txp alert :

Certaines fonctions PHP sont désactivées sur le serveur: exec, system, shell_exec, passthru

Txp diagnostic :

Version de Textpattern: 4.0.4 (r1956)
Version de PHP: 5.2.0
Register globals PHP: 1
Date & heure du serveur: 2007-03-02 08:16:02
MySQL: 4.0.26-standard
Locale: fr_FR.UTF-8
Serveur: Apache/1.3.33 (Unix)
API PHP du serveur: cgi-fcgi
Entêtes RFC 2616:
Système d’exploitation serveur: Linux 2.6.15-1-686-smp
Plugins actifs: sab_substr-0.5, stw_category_tree-0.6.1, upm_insert_tab-0.2.1, swf_if_empty-0.2, upm_image-0.4.5, asy_sitemap-0.7m, mkp_header_link-0.93, upm_img_popper-1.3.2, ajw_admin_workflow-0.3.1, cno_replace_file-0.1, zem_contact_reborn-4.0.3.16, zem_contact_lang-4.0.3.02m, wan_pdf-0.30, vdh_flickr-0.8.7, jmc_event_manager-0.2 beta, zem_ir-0.5, zem_event-0.30, zem_paginate-0.1, hpw_autolinks-0.4

<meta http-equiv=“content-type” content=“text/html; charset=utf-8” />

My host is celeonet.fr

I can reproduce that issue on several sites and with any word

Here is the way I use the article tag :

<txp:article allowoverride="0" form="article_avec_breadcrumb" limit="30" listform="trombino-liste" pgonly="0" searchall="0" searchsticky="0" sort="Title asc" />

But it is the same every time I use <txp:article sort="Title asc" />

Jeremie wrote:

… and what collate?

I hope this information is above… I must admit I don’t know what it means

Last edited by Niconemo (2007-03-02 07:52:33)


Nico

Offline

#5 2007-03-02 22:55:36

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: Something weird with the alphabetical sort of articles

Nico

Collations are the way that MySQL is told how to do things like sort strings held in table fields — so it could well be the problem.

If you have phpMyAdmin access to your DB you should be able to check out what collation is being used on your table quite easily, just log in and select your database. You should see a column called ‘collation’ and a value for each table. You can also drill down and look at the structure of your textpattern table to look at the collations setup on each field.

Last edited by net-carver (2007-03-03 22:52:02)


Steve

Offline

#6 2007-03-05 12:20:57

Niconemo
Member
From: Rhône-Alpes, France
Registered: 2005-04-18
Posts: 557

Re: Something weird with the alphabetical sort of articles

net-carver wrote:

If you have phpMyAdmin access to your DB you should be able to check out what collation is being used on your table quite easily, just log in and select your database. You should see a column called ‘collation’ and a value for each table. You can also drill down and look at the structure of your textpattern table to look at the collations setup on each field.

Thank you.
But I haven’t find any “collation” column in the preset phpMyAdmin on my host… :-( (version 2.7.0-pl2)
I have searched a collation setting in Eskuel too : no “collation”…

Last edited by Niconemo (2007-03-05 12:22:29)


Nico

Offline

#7 2007-03-05 16:05:40

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: Something weird with the alphabetical sort of articles

Nico

Hhmm, from your diagostics I see that’s an old version of MySQL, I’m not sure when collations were introduced but AFAIK utf-8 support only came in with MySQL version 4.1.

Just for your reference here is a screenshot of my list of txp404 tables in phpMyAdmin showing the collation column…


Steve

Offline

#8 2007-03-05 16:40:31

Niconemo
Member
From: Rhône-Alpes, France
Registered: 2005-04-18
Posts: 557

Re: Something weird with the alphabetical sort of articles

OK. I confirm. I have exactly the same screen except the collation collumn.

So I went to a most recent site I made on the same host but with a more recent server with MySQL 4.1
I now have the “collation” column (“interclassement” in french). The default value is “latin1_swedish_ci” (and the issue is the same as my other sites).

What setting do you think I sould test ?


Nico

Offline

#9 2007-03-13 10:24:02

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: Something weird with the alphabetical sort of articles

Nico

does your sorting problem still exist on the more recent environment?


Steve

Offline

#10 2007-03-13 10:34:07

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: Something weird with the alphabetical sort of articles

Well, it depend. Your data are probably saved as “false utf8”. If you feel up to it (or wanna test), try to dump your old db, alter the dump in a text editor to update it to MySQL 4.1 or 5.0 (depending on what you’re using) and setting charset and collate in it.

Then, create a new database on your new MySQL server, set the charset and collate (utf8 and utf8_general_ci) and import the dump.

That should work.

Do a backup first anyhow.

Offline

Board footer

Powered by FluxBB