This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » legacy support » symfony 1.2 » Generator error: The item has not been saved due to some errors
Generator error: The item has not been saved due to some errors [message #81119] Fri, 03 July 2009 12:30 Go to next message
ingvar  is currently offline ingvar
Messages: 21
Registered: July 2008
Location: Ukraine
Junior Member
How can we see and understand what the problem field?

It was a good, if example this field is displayed even in the debug bar Razz
Re: Generator error: The item has not been saved due to some errors [message #81177 is a reply to message #81119 ] Sun, 05 July 2009 19:08 Go to previous messageGo to next message
Seikilos  is currently offline Seikilos
Messages: 609
Registered: May 2008
Location: Germany
Faithful Member
Check the log files of the symfony app in the logs directory for that


Debugging is all I doֻ (if these dots are not in line then your screen is broken)
Re: Generator error: The item has not been saved due to some errors [message #81188 is a reply to message #81177 ] Mon, 06 July 2009 11:52 Go to previous messageGo to next message
ingvar  is currently offline ingvar
Messages: 21
Registered: July 2008
Location: Ukraine
Junior Member
I check file backend_dev.log. But nothing about my error (required) field Sad
Re: Generator error: The item has not been saved due to some errors [message #81191 is a reply to message #81119 ] Mon, 06 July 2009 13:26 Go to previous messageGo to next message
Seikilos  is currently offline Seikilos
Messages: 609
Registered: May 2008
Location: Germany
Faithful Member
You know, telling nothing about everything does not help you at all. We surely do not have a crystal ball so there is no clairvoyance to be expected here.

Explain your problem in a structured and detailed way, I am willingly to help but you have at least to describe your problem


Debugging is all I doֻ (if these dots are not in line then your screen is broken)
Re: Generator error: The item has not been saved due to some errors [message #81192 is a reply to message #81191 ] Mon, 06 July 2009 13:41 Go to previous messageGo to next message
ingvar  is currently offline ingvar
Messages: 21
Registered: July 2008
Location: Ukraine
Junior Member
Example

schema:
news:
    id:                   ~
    is_published:         { type: boolean, required: true, default: 0 }
    published_at:         { type: timestamp, required: true, index: true }
    image:                { type: varchar, size: 255, required: true }
    title:                { type: varchar, size: 255, required: true }
    description:          { type: varchar, size: 255, required: true }
    created_at:           ~


# php symfony propel:build-model
# php symfony propel:build-forms
# php symfony propel:build-filters
# php symfony propel:generate-admin cpanel News

/app/backend/modules/news/config/generator.yml
generator:
      form:
        class:             NewsForm
        display:
          NONE:            [ is_published, published_at, title ]


If create new Object and click "Save" I retrive error:
Generator error: The item has not been saved due to some errors.

Error, because some fields are not used (image, description, created_at ). I understand the problem.

Here the question of usability - to understand about what field I forgot to get a list of these fields.

[Updated on: Mon, 06 July 2009 13:41]

Re: Generator error: The item has not been saved due to some errors [message #81197 is a reply to message #81119 ] Mon, 06 July 2009 14:20 Go to previous messageGo to next message
Seikilos  is currently offline Seikilos
Messages: 609
Registered: May 2008
Location: Germany
Faithful Member
Well as far as I got you did the following: classified some fields as required BUT did not displayed them for editing in your backend. When it comes to saving the required but invisible and therefore empty fields throw the error your mentioned.

Two possible solutions: Display all required fieds or override the save method in the backend and fill in the missing fields by hand


Debugging is all I doֻ (if these dots are not in line then your screen is broken)
Re: Generator error: The item has not been saved due to some errors [message #81199 is a reply to message #81197 ] Mon, 06 July 2009 14:25 Go to previous messageGo to next message
ingvar  is currently offline ingvar
Messages: 21
Registered: July 2008
Location: Ukraine
Junior Member
I understand that.

I know there is a chance to see what the invisible field errors.

It is a question of convenience, to see what the field is missing.
Re: Generator error: The item has not been saved due to some errors [message #103280 is a reply to message #81119 ] Fri, 30 July 2010 11:30 Go to previous message
soulmare  is currently offline soulmare
Messages: 3
Registered: July 2010
Location: Ukraine
Junior Member
In development environment (/frontend_dev.php/ or /backend_dev.php/) you can watch different logs using a panel at a top of the screen. Look at "view=>form" or somenthing like this


Модули Joomla и VirtueMart, модули WordPress, модули ShopCMS - готовые и на заказ
Previous Topic:Problème d'insertion SQL avec relation sur doctrine
Next Topic:Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 19456 bytes) in /hom
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software