Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-01-14 12:26:14

hypp74
New Member
From: Sweden
Registered: 2009-01-14
Posts: 2

lowercase vs uppercase

Hello,

I’m new to Textpattern; I recently downloaded and installed version 4.0.7
and I’ve found something that I think is bit strange.

After installation, I started playing around and created Sections.
For some reason I used uppercase for the first letter in the sections name, eg About, Contact

I then tried to use a txp:section_list and txp:if_section to create a menu, and just couldn’t get it to work.
This example reproduces my problem:

               <txp:variable name="currentSection" value='<txp:section />' />
                <txp:variable name="currentSection" />
		<txp:section_list wraptag="ul" break="li">
			<txp:section link="1" title="1" />
                        <txp:variable name="currentSection" />
                        <txp:variable name="thisSection" value='<txp:section />' />
                        <txp:variable name="thisSection" />
			<txp:if_section name='<txp:variable name="thisSection" />'>
                           this never prints...
			</txp:if_section>
		</txp:section_list>

It turns out to be a problem with case.
When using txp:section outside of the section_list, the section name is automatically converted to lowercase,
but when using it inside the section_list is uses the original case i.e. first letter uppercase

The solution for me was to change all my section names to use only lowercase.

Offline

#2 2009-01-14 13:32:09

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: lowercase vs uppercase

Hint: always use a lower case section name… but you can set the section Title to whatever you want.

Offline

#3 2009-01-14 19:29:32

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: lowercase vs uppercase

Will or not changed behaviour of txp – when i create category/section with non-latin chars it translitarates to UPPERCASE name. Was it made by some factor i don’t know?


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#4 2009-01-14 20:02:54

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: lowercase vs uppercase

Victor, /textpattern/lib/i18n-ascii.txt is a transliteration table that contains upper case characters as transliterations for the many cyrillic characters, so something like Бой у озера Хасан transliterates to BOI-U-OZERA-KHASAN I have no idea of those should be upper or lower case. You may want to check if those are correct.

It’s possible to create lowercase section and category names by default when the user creates categories and sections (the title is entered upon creation, not the name). I wouldn’t mind doing that.

Offline

#5 2009-01-14 20:59:56

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: lowercase vs uppercase

Should I post here or by email you right (as I see it) cyrillic part of i18n table?


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#6 2009-01-14 21:28:31

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: lowercase vs uppercase

Go ahead and post here, so others can comment as well.

Offline

#7 2009-01-14 22:09:34

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: lowercase vs uppercase

Ruud, can you wait some days before making this changes in core? I’d like to discuss this with russian community.

If here are any russian spoken members – happy to see you in this topic with your disagrees of my version (based on ISO 9 except of letter Ц)

/textpattern/lib/i18n-ascii.txt Lines 494-557:

А = "A"
Б = "B"
В = "V"
Г = "G"
Д = "D"
Е = "E"
Ё = "Yo"
Ж = "Zh"
З = "Z"
И = "I"
Й = "J"
К = "K"
Л = "L"
М = "M"
Н = "N"
О = "O"
П = "P"
Р = "R"
С = "S"
Т = "T"
У = "U"
Ф = "F"
Х = "H"
Ц = "Ts"
Ч = "Ch"
Ш = "Sh"
Щ = "Shch"
Ы = "Y"
Э = "E"
Ю = "Yu"
Я = "Ya"
а = "a"
б = "b"
в = "v"
г = "g"
д = "d"
е = "e"
ё = "yo"
ж = "zh"
з = "z"
и = "i"
й = "j"
к = "k"
л = "l"
м = "m"
н = "n"
о = "o"
п = "p"
р = "r"
с = "s"
т = "t"
у = "u"
ф = "f"
х = "h"
ц = "ts"
ч = "ch"
ш = "sh"
щ = "shch"
ы = "y"
э = "e"
ю = "yu"
я = "ya"
Ъ = ""
ъ = ""
Ь = ""
ь = ""

Last edited by the_ghost (2009-01-14 22:10:35)


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#8 2009-01-14 22:52:39

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: lowercase vs uppercase

You may want to open a topic (with a better title) in the russion TXP subforum as well.

Offline

#9 2009-01-14 23:45:04

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: lowercase vs uppercase

ruud wrote:

It’s possible to create lowercase section and category names by default when the user creates categories and sections (the title is entered upon creation, not the name). I wouldn’t mind doing that.

Yes please. I’ve requested this before. Either that or add a warning in the section/category tabs, how else are users supposed to know that they shouldn’t use uppercase in names? It still happens on a regular basis that problems arise because of this, and though there are numerous relevant threads, a forum search is not likely to point to the solution because no one is searching for ‘uppercase’ or ‘lowercase’ when content is not displaying as expected.

Offline

#10 2009-01-15 08:51:39

hypp74
New Member
From: Sweden
Registered: 2009-01-14
Posts: 2

Re: lowercase vs uppercase

I think that since uppercase clearly doesn’t work, lowercase should be enforced.

Offline

#11 2009-01-15 23:28:46

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: lowercase vs uppercase

see SVN changeset 3072, affects creating new category/sections.

Offline

#12 2010-02-24 23:56:36

northtoronto
New Member
Registered: 2008-03-28
Posts: 8

Re: lowercase vs uppercase

I have the same problem too. I just transferred to Dreamhost and now my sections dont work unless I change the section in the URL bar to uppercase.

Eg:

http://www.iqra.net/whatsnew

Doesn’t work. But if I change the url to uppercase it works i.e.

http://www.iqra.net/WHATSNEW

How do I fix it to the way it was before?

Offline

Board footer

Powered by FluxBB