Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7954385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:24:50+00:00 2026-06-04T03:24:50+00:00

I have a problem with internalization of doctrine objects’ forms in administration. Forms worked

  • 0

I have a problem with internalization of doctrine objects’ forms in administration. Forms worked perfectly fine, but then I added support for multiple languages.

Schema looks like this:

content:
  actAs: 
    Timestampable: ~ 
    I18n:
      fields: [title, content]
  columns:
    parent: { type: integer }
    title: { type: string(255), notnull: true, unique: true }
    slug: { type: string(255), notnull: true, unique: true }
    content: { type: string }
    link: { type: string(255) }
    ord: { type: integer }
    type: { type: integer, default: 0 }
  relations:
    content: { onDelete: CASCADE, local: parent, foreign: id }
  indexes:
    parent: { fields: [parent] }    
    slug: { fields: [slug] } 
    type: { fields: [type] }    

Admin generator:

generator:
  class: sfDoctrineGenerator
  param:
    model_class:           content
    theme:                 admin
    non_verbose_templates: true
    with_show:             false
    singular:              ~
    plural:                ~
    route_prefix:          content
    with_doctrine_route:   true
    actions_base_class:    sfActions

    config:
      actions: ~
      fields:  
        title: { is_real: false }
        typeFull: { label: Type }
      list:    
        display: [=title, typeFull]        
        sort: ord 
        max_per_page: 100 
      filter:  
        class: false
      form:    
        class: adminContentForm
      edit:    ~
      new:     ~

And finally a form:

class adminContentForm extends BasecontentForm
{
  public function configure()
  {        
    unset($this['slug'], $this['ord'], $this['created_at'], $this['updated_at']);

    $this->embedI18n(array('de', 'fr'));
    $this->widgetSchema->setLabel('de', 'Deutsch');
    $this->widgetSchema->setLabel('fr', 'French');
  }
}

I didn’t change action class.

Everything works just fine when I want to create a new entry. But a strange problem occurs when I want to update an existing entry: it saves only fields in embedded i18n forms (title, content) and fields from main form stay untouched (parent, link, type).

If I delete embedding from form, it saves parent, linky and type properly. If I add embedding back, it saves only title and content.

Have you ever encountered similar problem? I’m using Symfony 1.4.17.


EDIT:

If I add this for debugging to processForm() method in actions.class.php:

var_dump($form->getValue('link'));
$content = $form->save();        
var_dump($content->getLink());
exit();

… I see that a value in a field link was properly sent, but after saving a form the value isn’t saved. $form->getValue(‘link’) returns a proper value, but $content->getLink() returns an empty string.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T03:24:52+00:00Added an answer on June 4, 2026 at 3:24 am

    After two days I’ve finally got it! The strange behavior was caused by column “content” especially by it’s name that was the same as a name of the table. There was no problem if I didn’t use i18n behavior. But after adding i18n everything started to act unexpectedly, but with no error message, so it took me really long time to figure it out.

    So a column name mustn’t be the same as a name of a table.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have problem with my own Subversion repository. It worked yesterday. But I received
I have problem with Uploadify: I log in the project using: FormsAuthentication.SetAuthCookie(myName, false); Then,
I have problem with passing variables through views. But, first some code // i
I have problem with I18N in JSP, specifically, with forms. When I enter some
I have problem with pointers. This is working fine - int main(void){ char *w;
I have problem with Install-Shield. I create package to install my project and then
I have problem with generation of links I have an Area named Administration, it
I have problem with reflection, dynamic invoking objects and reading collection values. In Referenced
I have problem creating new instance of excel 2007 using VBA (from Access 2002).
I have problem with fancybox. I want to write a function that will run

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.