Development

#3556 (Problem with sfPropel class initialization)

You must first sign up to be able to contribute.

Ticket #3556 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

Problem with sfPropel class initialization

Reported by: Romain Assigned to: fabien
Priority: minor Milestone: 1.1.0
Component: i18n Version: 1.1.0 DEV
Keywords: i18n generator propel 1.1 Cc:
Qualification: Unreviewed

Description

There is a problem if we call sfPropel::getDefaultCulture() before doing anything else with propel. Indeed, in this case, sfPropel hasn't been initialized and it doesn't return the same value after we have done any query for example (because before any query, propel is initialized).

So the method getDefaultCulture() should check that the class have been initialized or maybe you should transform sfPropel into a singleton ... i don't know.

I have detected this bug while using i18n tables in propel with the admin generator.

  • schema.yml :
propel:
  article:
    id:
    created_at:
    updated_at:
  article_i18n:
    title:      varchar(255)
    content:    longvarchar

And with an admin-generated module on class model Article, if I set sf_culture to "fr", when I create an article, the title is stored into "en" culture, and the content is stored into "fr" culture.

I have encountered this bug into 1.1 dev version of symfony.

Change History

06/23/08 06:39:01 changed by dwhittle

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

06/23/08 09:06:15 changed by fabien

  • status changed from closed to reopened.
  • resolution deleted.
  • milestone set to 1.1.0 FINAL.

06/25/08 14:24:49 changed by fabien

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

(In [9864]) fixed problem with sfPropel class initialization (closes #3556)

06/29/08 23:35:46 changed by FabianLange

  • milestone changed from 1.1.0 FINAL to 1.1.0.