Development

#2489 (generator.yml wrong field identifiers for table columns ending with an underscore and digits)

You must first sign up to be able to contribute.

Ticket #2489 (closed defect: fixed)

Opened 2 years ago

Last modified 1 month ago

generator.yml wrong field identifiers for table columns ending with an underscore and digits

Reported by: maex Assigned to: fabien
Priority: minor Milestone:
Component: generator Version: 1.0.8
Keywords: admin generator fields Cc:
Qualification: Unreviewed

Description

It seems that there is a proplem how the admin generator maps fields that have an underscore and digits at the end. The issue is, that the field identifier for a label can be not generated correctly. The following example should explain this in detail.

In my case I have the following schema:

article:
  id:
  image_a:   { type: varchar(255) }
  image_1:   { type: varchar(255) }
  image_22:  { type: varchar(255) }

Then I generate the admin module via 'propel-init-admin app module Article'.

I open the generated 'generator.yml' which I edit as follows:

generator:
  class:              sfPropelAdminGenerator
  param:
    model_class:      Article
    theme:            default
    fields:
      image_a:        { name: Image One }     # Works, Image One is shown
      image_1:        { name: Image Two }     # Works not, Image1 is shown
      image_22:       { name: Another Image } # Works not, Image22 is shown

Workaround for me, was to change 'image_1' to 'image1' (same for image_22) then the admin generator works as I thought it to do.

This is my first report, I hope, I havent done too much wrong. By the way, I have not spend much time looking for duplicates, so dont slap me, if someone has already reported this issue. :p

Best regards,

Martin

Change History

02/18/10 12:59:02 changed by FabianLange

  • status changed from new to closed.
  • resolution set to fixed.

this should have been fixed by the new admin generator introduced in symfony 1.2

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting.
Sensio Labs also supports several large Open-Source projects.