Yii Framework Forum: zii CGridView crashes at special character - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

zii CGridView crashes at special character Rate Topic: -----

#1 User is offline   steffen 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 14-December 09
  • Location:Reutlingen, DE

Posted 22 July 2010 - 01:16 PM

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
0

#2 User is offline   PoL 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 506
  • Joined: 05-November 08
  • Location:Buenos Aires, Argentina

Posted 22 July 2010 - 01:22 PM

can I ask why are you using those characters in your tables?
Don't say what you think, think what you say
The problem is communication! Excess of communication!
0

#3 User is offline   steffen 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 14-December 09
  • Location:Reutlingen, DE

Posted 22 July 2010 - 02:10 PM

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.
0

#4 User is offline   PoL 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 506
  • Joined: 05-November 08
  • Location:Buenos Aires, Argentina

Posted 22 July 2010 - 02:44 PM

IMHO, tables and fields names should follow the same naming restrictions that the ones for naming variables in php...
Don't say what you think, think what you say
The problem is communication! Excess of communication!
0

#5 User is offline   steffen 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 14-December 09
  • Location:Reutlingen, DE

Posted 22 July 2010 - 02:49 PM

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 ;-)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users