zii CGridView crashes at special character

Hey folks,

I just recognized a strange behavior after a standard gii setup of webapp, controller, model and crud. Setup was done without errors, but checking the site, especially the manage and show operations, I received the following exception:


Description

The column must be specified in the format of "Name:Type:Label", where "Type" and "Label" are optional.


Source File

/volume1/web/yii/framework/zii/widgets/grid/CGridView.php(288)



Tracing down the problem I found that a special character - in my case the ß / & - used in a column name in the mysql db was the cause. Replacing it with ‘ss’ in the db and re-running the gii scripts solved it.

If it was not just my stupidity and you can confirm this bug, please move this post to the bug reports.

Thank you

Steffen

can I ask why are you using those characters in your tables?

It is a character of the German word ‘Straße’ (street) and to be honest, I was not clear about the implications. So far I’ve never had any problems.

IMHO, tables and fields names should follow the same naming restrictions that the ones for naming variables in php…

yep, true. That’s the lesson I learnt. Actually I only code in English including db columns. I think I found the reason why I started that :wink: