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.
Today's Messages (OFF)  | Unanswered Messages (ON)

Forum: symfony 1.1
 Topic: [SOLVED] 2 problems beggining with symfony 1.1
icon10.gif  [SOLVED] 2 problems beggining with symfony 1.1 [message #52644] Sat, 24 May 2008 21:11
neonard0  is currently offline neonard0
Messages: 11
Registered: September 2007
Location: Popayán - Cauca - Colomb...
Junior Member

Hi there i have 1.1 version working on a test server, it has both symfony versions, 1.0 installed using PEAR, and 1.1 using symbolic links.

Although I can use some commands for 1.1, I'm having some difficulties like these:

1. I installed sfGuard, and when i tried to load fixtures using "symfony1.1 propel:data-load frontend" I get.

 Unable to get sequence id. [wrapped: You must specify the sequence name when calling getId() method.] 


but I coudl create the database's tables using command propel:insert-sql

2. I create this simple schema (used in 1.0 example)
propel:
  test:
    _attributes: { phpName: Article }
    id:
    title:      varchar(255)
    content:    longvarchar
    created_at:

and when using crud command " symfony1.1 propel:generate-crud frontend article Article"
I get this error:
Fatal error: Class 'ArticleForm' not found in /usr/share/php/symfony11/1.1/lib/generator/sfAdminGenerator.class.php on line 722


Any Suggestion?

I "googled" it but nothing.


[SOLVED 5 minutes later]

I didn't want to double post so here I'm writing.
I htink I had serius bad luck, 'cause the problem was solved by updating from the svn my symfony1.1 installation. Maybe the moment I got it there was some bug or something. but now it looks like everything is ok.

[Updated on: Sat, 24 May 2008 21:33]

 Topic: Strange behavior with AJAX + @homepage
Strange behavior with AJAX + @homepage [message #52661] Sun, 25 May 2008 15:59
zipoking  is currently offline zipoking
Messages: 1
Registered: May 2008
Location: Wroclaw
Junior Member

Hi,
I've the following situation (/ == @homepage == main/index <- set in routing.yml):

main/actions/actions.class.php: (executeIndex)
...
if(!$this->getRequest()->isXmlHttpRequest()){ // symfony turns off layout by default on AJAX requests
$this->setLayout('layout_public');
}
return 'Public'; // will show 'indexPublic.php' template

apps/frontend/templates/layout_public.php:
...
<?php echo link_to_remote('Home', array(
'url' => '@homepage',
'update' => 'main_content'
...
)); ?>

And now, if I click on this link, in result in 'main_content' I've full page with layout (isXmlHttpRequest() == false ?). Full layout is show even if I change '@homepage' to 'main/index', but layout turns off only if I put here e.g. 'main/index?foo=bar'.
So, my question is: is it right behavior of symfony (I have presently 1.1-rc1 version) or it is a bug which should be fixed ;)

Regards,
Paul
(P.S.: sorry for my english ;) )
 Topic: Form validation and additional fields
Form validation and additional fields [message #52713] Mon, 26 May 2008 14:02
lisson01  is currently offline lisson01
Messages: 85
Registered: January 2008
Member
I have a form in which the user is able to enter his own profile. Not the entire user object must be available for editing so i have created my own form class. accountForm.class.php which extends the UserForm (standard objectform).

In the accountForm i've added widgets for the old-password, new password and a retype of the new password. The new/retype validation is handled in javascript.

After posting and all validations are oke, the form is saved using updateObject() and save() which saves the user object to the database. However, is still need to get the salt from the user, generate a SHA1 hash from the new password and add that as well. I can do that in a seperate part where i reGet the userobject again and store it but i want to do it in the accountForm->save statement. Is this possible?
<?php
$user 
UserPeer::retrieveByPK($this->getUser()->getAttribute('userid'));
$form = new accountForm($user);
?>


The user object is already available somewhere in the form. Can i access it and set the password before the form->save() command?
 Topic: Javascript/Ajax effects
Javascript/Ajax effects [message #52792] Tue, 27 May 2008 14:23
danr  is currently offline danr
Messages: 175
Registered: February 2008
Senior Member
I have heard that the Ajax helpers that were included in the core in Symfony 1.0 are now being moved in to a plugin for 1.1. This is fine but could someone tell me which plugin I should be using in order to gain access to these helpers?

Is the plugin ready to use with Symfony 1.1 RC1?

Thanks for your time.
 Topic: unit-testing in sf1.1
unit-testing in sf1.1 [message #53473] Wed, 04 June 2008 17:33
nykacho  is currently offline nykacho
Messages: 87
Registered: July 2007
Member
Hello,

I just copied some unit tests of a 1.0 project to a fresh new 1.1 project.

A lot of things seems to be changing from the older way :

- autoloading
- path variables like $sf_symfony_lib are now obsolete ( have to use the ProjectConfiguration class instead )
- lime syntax and usage ?

Anyway, I still cannot find any proper documentation about 1.1 unit testing and how to use the new features of sf1.1.

Thanks for any hints or guideline !

 Topic: Malformed inline YAML string
Malformed inline YAML string [message #53843] Wed, 11 June 2008 12:14
Balon  is currently offline Balon
Messages: 13
Registered: November 2007
Junior Member
Part of my generator.yml file

content:      { type: textarea_tag, params: rows=25 cols=150 rich=true tinymce_options='theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,forecolor,backcolor"' }


I'm getting an error because of that. In 1.0 were all ok.. But in 1.1 I've problem with this..

Unable to parse file "/var/www/ls-rp.pl/framework/apps/admin/modules/auctions/config/generator.yml": Malformed inline YAML string ({ type: textarea_tag, params: rows=25 cols=150 rich=true tinymce_options='theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,forecolor,backcolor"' }).


Can somebody help me?
Regards
ps. sorry for my english
 Topic: Error in config_core_compile.yml.php!: Cannot redeclare class sflogger
Error in config_core_compile.yml.php!: Cannot redeclare class sflogger [message #54329] Wed, 18 June 2008 12:29
b166er  is currently offline b166er
Messages: 31
Registered: March 2007
Location: Germany
Member
it's strange, but i have now the same error in my task-file as this forum-post: http://www.symfony-project.org/forum/index.php?t=msg&got o=13700

i have the last svn-checkout: r9637 from /branch/1.1/

first i try to describe my really problem.

i have a OwnClass in /lib/, but this class doesn't Auto-loaded in My-task Sad
here is the message:
web htdocs # symfony my:test first-argument
PHP Fatal error:  Class 'OwnClass' not found in /var/www/localhost/htdocs/lib/task/MyTask.class.php on line 251
Fatal error: Class 'OwnClass' not found in /var/www/localhost/htdocs/lib/task/MyBaseTask.class.php on line 251

i also add autoload.yml to /config/ with these options:
autoload:

  lib:
    name:           lib
    path:           /lib/
    recursive:      on
but the autoload still doesnt work.

then i put follow code in my /config/ProjectConfiguration.php:
public function setup(){
  $autoloader = sfSimpleAutoload::getInstance();
  $autoloader->addDirectory(sfConfig::get('sf_lib_dir').'/');
  sfSimpleAutoload::getInstance()->reload();
}

after adding this code, i got this error:
web htdocs # symfony my:test first-argument
PHP Fatal error:  Cannot redeclare class sfLogger in /var/www/localhost/htdocs/cache/frontend/prod/config/config_core_compile.yml.php on line 1202
Fatal error: Cannot redeclare class sfLogger in /var/www/localhost/htdocs/cache/frontend/prod/config/config_core_compile.yml.php on line 1202

default env is "prod" and debug is off.
here is my /apps/frontend/config/settings.yml:
prod:
  .settings:
    error_reporting:        <?php echo (E_PARSE | E_COMPILE_ERROR | E_ERROR | E_CORE_ERROR | E_USER_ERROR)."\n" ?> # Determines which events are logged.
    logging_enabled:        on        # Enable logging
    no_script_name:         on      # Enable the front controller name in generated URLs
    cache:                  on       # Enable the template cache
    etag:                   on       # Enable etag handling

dev:
  .settings:
    error_reporting:        <?php echo (E_ALL | E_STRICT)."\n" ?> # Determines which events are logged.
    logging_enabled:        on        # Enable logging
    no_script_name:         on      # Enable the front controller name in generated URLs
    cache:                  off       # Enable the template cache
    etag:                   off       # Enable etag handling
    web_debug:              on        # Enable the web debug toolbar
    xdebug:                 on        # Enable xdebug stack trace in the logs
...


but after add in console --debug="true" as option to my task, all works perfectly without any error-messages.


anybody with idea?

thanks

[Updated on: Wed, 18 June 2008 13:10]

 Topic: autoloading in tasks
autoloading in tasks [message #54451] Thu, 19 June 2008 18:51
botulotoxin  is currently offline botulotoxin
Messages: 13
Registered: June 2008
Location: Brno, Czech Republic
Junior Member
Hello,

is there any way to get libraries autoloaded in tasks?

I'm quite new to symfony and I'm toying with things. Now I'm trying to combine together tutorials on tasks and swift mailer and I'd like to send an e-mail from a task.

I'm getting
Fatal error: Class 'Swift' not found in /data/web/devel_spaces/btx/testproject/lib/task/sendTestMailTask.class.php on line 30


When I try to include library file manually - like this
include sfConfig::get('sf_lib_dir')."/vendor/swiftMailer/Swift.php";

I'm getting
Fatal error: Class 'Swift_Connection_NativeMail' not found in /data/web/devel_spaces/btx/testproject/lib/task/sendTestMailTask.class.php on line 30

which is quite understandable Smile and when I include also Swift_Connection_NativeMail class, message is sent.

When I try to send an e-mail from an action, autoloading works well.

I'm sorry for possibly noob question but I'm not really able to find an answer.

Thanks

[Updated on: Thu, 19 June 2008 19:17]

 Topic: Add attributes to <option> in <select>
Add attributes to <option> in <select> [message #54497] Fri, 20 June 2008 12:05
lisson01  is currently offline lisson01
Messages: 85
Registered: January 2008
Member
How can i add a different class to each of the available options in a select box when i echo the form using echo $form; (symfony 1.1 RC2)?

Can i output the independen <option> tags in a loop in the view itself by some sort of $form['field']->getOptions()->render() function?

Depending on the ID In the option i need to echo a certain image in the dropdown. Thus the class needs to differ per option.
 Topic: propel:build-forms does not update to reflect my schema.xml
propel:build-forms does not update to reflect my schema.xml [message #54763] Wed, 25 June 2008 07:01
jacobl  is currently offline jacobl
Messages: 1
Registered: June 2008
Junior Member
Hi,

This is my first post here, so please excuse me if my form etiquette is not what it should be.

I am writing a project in Symfony 1.1 and am using the default Propel plugin. I started with a very simple schema.xml and ran
symfony propel:build-all


This command generated my model and form objects as expected. After I made a simple change to my schema (added a new varchar column), I ran the build-all command once more. My model objects were updated with the new functions but my form objects didn't change at all. I also tried
symfony propel:build-forms
with no luck. I have cleared my cache and changed the name of the form directory but I cannot get updated form objects.

Should these commands be updating my form objects? If so, what am I doing wrong?
 Topic: sfForm echo display form only (no input fields).
sfForm echo display form only (no input fields). [message #55175] Mon, 30 June 2008 13:39
lisson01  is currently offline lisson01
Messages: 85
Registered: January 2008
Member
Is there an easy way to make a second display variant for all echo $form or $form['field']->render(Row)() function, so that i can have both a view and edit variant of a form? The user must be able to just view, or edit the data but i don't want to make templates for each.
 Topic: sfCoreAutoload::register() and propel
sfCoreAutoload::register() and propel [message #55430] Thu, 03 July 2008 16:50
Bpizzi  is currently offline Bpizzi
Messages: 3
Registered: June 2008
Location: Lyon, FR
Junior Member
As propel is now a plugin, I was wondering if sfCoreAutoload is able to register it too.

Simply put, I just want to access data in a single file without using the whole symfony thing.

Like a test.php with a sfCoreAutoload::register(); statement that should be able to retrieve data via criterias...

Anybody? thanks Smile
 Topic: Unable to deploy from live server to local xampp
icon5.gif  Unable to deploy from live server to local xampp [message #55483] Fri, 04 July 2008 12:53
rthannee  is currently offline rthannee
Messages: 1
Registered: July 2008
Location: hyderabad
Junior Member
Hi,

I want to deploy symfony project to modify, I couldnt establish the environment.

Please help me.

Thanks,
Rajesh T
 Topic: plugin:install troubles
plugin:install troubles [message #55622] Mon, 07 July 2008 16:14
akinas  is currently offline akinas
Messages: 69
Registered: April 2006
Member
After installing symfony 1.1 I am trying to install sfWebBrowserPlugin and sfFeed2Plugin

This is what I get under Vista, PHP 5.2.2, PEAR 1.7.2

c:\project>symfony plugin:install sfWebBrowserPlugin
>> plugin    installing plugin "sfWebBrowserPlugin"

  No release available for plugin "sfWebBrowserPlugin" in state "alpha" that sat
isfies the application requirements.

c:\project>symfony plugin:install sfFeed2Plugin
>> plugin    installing plugin "sfFeed2Plugin"
>> sfPearFrontendPlugin Could not download from
>> sfPearFrontendPlugin "http://pear.symfony-project.com/get/sfFeed2Plugin/sfFee
d2Plugin-0.9.4.tgz"
>> sfPearFrontendPlugin (File
>> sfPearFrontendPlugin http://pear.symfony-project.com:80/get/sfFeed2Plugin/sfF
eed2Plugin-0.9.4.tgz
>> sfPearFrontendPlugin not valid (received: HTTP/1.1 404 Not Found
>> sfPearFrontendPlugin ))
>> sfPearFrontendPlugin Invalid or missing remote package file

  Plugin "sfFeed2Plugin" installation failed: Package
"http://pear.symfony-project.com/get/sfFeed2Plugin/sfFeed2Plugin-0.9.4.tgz" is not valid



sfWebBrowserPlugin would not install with any "preferred_state" setting (beta, stable, alpha) showing the same message.

Any ideas?

 Topic: Does anybody use UML tool with symfony 1.1 and/or uml2symfony?
Does anybody use UML tool with symfony 1.1 and/or uml2symfony? [message #55753] Tue, 08 July 2008 16:48
volod  is currently offline volod
Messages: 85
Registered: June 2008
Member
Hello,

Does anybody use any UML tool with symfony?

I tried http://uml2symfony.wiki.sourceforge.net/ with AgroUML (but symfony doesn't see uml2symfony as plugin).

Also xmi2symfony with Enterprise Architect (I wonder why, but xmi2symfony didn't work with AgroUML or Enterprise Architect types. just ignored them).

Any idea?

Thanks
Vladimir


Vladimir Bilyov Websites development and support, Design, SEO
 Topic: Problem with suffix in LightTPD
Problem with suffix in LightTPD [message #55807] Wed, 09 July 2008 12:00
kacperix  is currently offline kacperix
Messages: 8
Registered: November 2006
Location: Poland
Junior Member

Hi all.

When I create a module with action and to routing.yml file add e.g.

routingtitle:
  url:   /link.html
  param: { module: modulename, action: actionname }


and then try request http://my-symfony-url/link.html
I see 404 error.
But when I add index.php or appname_dev.php to request link then all is fine.

I tried uncomment in factories.yml file line with suffix but this not helped.
In LightTPD mod_rewrite module is enable.

Did anyone of you are familiar with this problem?
 Topic: Embed Form
Embed Form [message #55847] Wed, 09 July 2008 21:18
pentium133  is currently offline pentium133
Messages: 8
Registered: June 2008
Junior Member
How can I correct embed a form?
Now, I do so:
class sfGuardUserForm extends BasesfGuardUserForm
{
  public function configure()
  {
    parent::configure();
    unset(......);
    $this->embedForm('profile', new sfGuardUserProfileForm($this->getObject()->getProfile()));


And for saving profile I need override doSave function:
 protected function doSave($con = null)
  {
    parent::doSave($con);
    $profile = $this->getValue('profile');
    $this->object->getProfile()->setEmail($profile['email']);
    $this->object->getProfile()->save();
  }

Is it correct way?
 Topic: Upgrade app symfony 1.0.10 to symfony 1.1
Upgrade app symfony 1.0.10 to symfony 1.1 [message #55858] Thu, 10 July 2008 01:22
patrickespake  is currently offline patrickespake
Messages: 49
Registered: January 2008
Location: Brasil
Member

I have some applications made in symfony 1.0.10, i want to upgrade applications to symfony 1.1, is easy to do?


Patrick Espake
patrickespake@gmail.com
http://patrickespake.wordpress.com
 Topic: Ajax Updater
Ajax Updater [message #55874] Thu, 10 July 2008 09:16
haZe  is currently offline haZe
Messages: 78
Registered: September 2006
Member
FIXED by myself!

[Updated on: Thu, 10 July 2008 11:06]

 Topic: symfony 1.1 merge forms and labels problem
icon5.gif  symfony 1.1 merge forms and labels problem [message #55875] Thu, 10 July 2008 09:42
maxiu69  is currently offline maxiu69
Messages: 3
Registered: July 2008
Junior Member
I have two classes of forms. ProductForm and PriceForm. In PriceForm I have changed all field labels (inside the PriceForm class). Then I merged these forms. After the merge all labels from PriceForm are lost - default labels instead of them.

How to merge to forms without the lost of labels?

B.R.
maksymilian
 Topic: widget "somevalue" does not exist
widget "somevalue" does not exist [message #55913] Thu, 10 July 2008 17:03
tatanajllo  is currently offline tatanajllo
Messages: 13
Registered: July 2008
Junior Member
Hi well I've been looking for this over the past couple of days, at the beginning I thought I could ignore it, but now I applied js and it's become mayhem Shocked

My main form gets the number of embedded forms that I want displayed, so once the user hits save, it should display the desired number of embedded forms. Here is the code I'm using on the form (Main Form):

$numbCells is the value passed when main form is initially saved

class UnitForm extends BaseUnitForm
{

protected $childForms;

public function setup()
{
$childForms = array();
parent::setup();
}

public function getChildForms()
{
return $this->childForms;
}

public function configure()
{
..... some code


for($i=0; $i < $numbCells; $i++)
{
$newForm = new CellForm();

/* Embedding cell Form */
$newForm->setDefault('unit_key',$this->getObject()->getUnitKey());

$this->childForms[]=$newForm;

$this->embedForm('cells', $newForm);

}

}

}

Now this works but on the dev environment once I hit the save button I get: (x number is the first cell key number)

[InvalidArgumentException]
Widget "cells(x number)" does not exist.
stack trace

But when I refresh the page and open again everything is cool, embedded forms work good.

On the user environment I have to save, refresh form, save, refresh form (not fun).

I saw an answer by Fabien and I think I pretty much got it covered on the above code, since I am creating a new form for each cell, but still doesn't work.

Should I manipulate the cellForm configure, I didn't see it as necessary as I'm doing this through my embedding code.

Any help will be greatly appreciated.
 Topic: new Propel behavior method on Peer class
icon5.gif  new Propel behavior method on Peer class [message #55914] Thu, 10 July 2008 17:09
karl  is currently offline karl
Messages: 48
Registered: March 2006
Location: Lille, France
Member
Hello,

I need to add a new method to a peer class via a propel Behavior.
It is easy to add one to an Object class but on priori, it is impossible for Peer classes Mad . Have a look at this cookbook page for more information about it ("Add new methods" paragraph).

Here is my problem :
I made a plugin (some kind of PropelParanoidBehavior) that overrides the doSelectRS Peer method to select only the Objects related to the Dimension I'm in. (ysfDimensionPlugin... but that's not important here)
I'd like to add a "doSelectAll" method to the peer class that let me select all the related objects and not only the ones related to the dimension.

Has anyone found a trick to bypass this problem ?

Thx for your help Smile
 Topic: Form + UserId (background)
Form + UserId (background) [message #55915] Thu, 10 July 2008 17:14
freakx0  is currently offline freakx0
Messages: 77
Registered: November 2006
Location: Germany
Member
I've build a form through propel.

In my database-table is a field for the user-id. i want to save the id of the user which submitted the data.

But how can i do that with the new form-builder?

 Topic: Problems with loading data from fixtures
Problems with loading data from fixtures [message #55918] Thu, 10 July 2008 17:44
drola  is currently offline drola
Messages: 1
Registered: July 2008
Location: Slovenia, Zagorje
Junior Member
I have some issues with loading data from fixtures using doctrine (through sfDoctrinePlugin). I'm not sure if I have made some mistake or there's a bug.

My schema file looks like that:
detect_relations: on
options:
  collate: utf8_unicode_ci
  charset: utf8

Person:
  actAs:
    Sluggable:
      unique: true
      fields: [first_name, last_name]
      canUpdate:true
  columns:
    id:
      primary: true
      autoincrement: true
      type: integer
    first_name: string(255)
    last_name: string(255)
    email: string(255)

Article:
  actAs:
    Sluggable:
      unique: true
      fields: [title]
      canUpdate: true
  columns:
    id:
      primary: true
      autoincrement: true
      type: integer
    title: string

ArticleContent:
  actAs:
    Timestampable:
      created:
        disabled: true
      updated:
        name: updated_at
  columns:
    id:
      primary: true
      autoincrement: true
      type: integer
    person_id: integer
    article_id: integer
    content: string
  relations:
    Article:
      foreignAlias: article_contents
    Person:
      foreignAlias: article_contents



and data.yml look like that:
Person:
  mdrolc:
    first_name: Matjaž
    last_name: Drolc
    email: mdrolc@gmail.com
    article_contents:  [ fizika101, hw01 ]
  jkranjski:
    first_name: Janez
    last_name: Kranjski
    email: janez.kranjski@hotmail.com
    article_contents: [ fizika102 ]

Article:
  hw:
    title: Pozdravljen svet!
    article_contents: [ hw01 ]
  fizika1:
    title: Fizika v 1. letniku gimnazij
    article_contents: [ fizika101, fizika102 ]


ArticleContent:
  fizika101:
    content: Fizika je ql!
  fizika102:
    content: Ne pa ni!
  hw01:
    content: Pozdravljeni vsi!


When I run "./symfony doctrine:build-all-reload frontend", data is inserted, but article_id fields in ArticleContent table are filled with NULLs instead of article ids. On the other hand, links between persons and article contents are created without problems. If I exlude them from fixture file, there's no problem with links between articles and article's contents. Why can't be fields for both relations filled?
 Topic: Ajax Validation with new sfForms
Ajax Validation with new sfForms [message #55926] Thu, 10 July 2008 19:59
joostdj  is currently offline joostdj
Messages: 44
Registered: November 2007
Member
I normally use the sfYzAjaxValidationPlugin to arrange AJAX validation of my forms, according to the .yml validation-files.

Is there any alternative for Symfony 1.1 yet?? In 'The symfony Forms Book' it isn't mentioned.

Thanx!
 Topic: Pb Admin generator on many to many with Doctrine Nested Set and I18n
Pb Admin generator on many to many with Doctrine Nested Set and I18n [message #55976] Fri, 11 July 2008 13:20
global01  is currently offline global01
Messages: 3
Registered: July 2008
Junior Member
Hi Guys,

I'd like to have an admin_double_list for my I18n nested Set Category and i don't manage to do it!
Any Ideas?

By the way i'm using http://trac.symfony-project.org/wiki/HowToHandlei18nDbFields WithAdminGeneratorMethod2

Schema:
Category:
  actAs:
    NestedSet:
      hasManyRoots: true
      rootColumnName: root_id
    SoftDelete:
    Timestampable:
    I18n:
      fields: [title]
      actAs:
        Sluggable:
          fields: [title]
  columns:
    domain_id:
      type: integer(1)
      unsigned: true
    title: string(255)
    expired_at: timestamp
  indexes:
    domain_id:
      fields: [domain_id]

generator.yml
generator:
  class:              sfDoctrineAdminGenerator
  param:
    model_class:      Category
    theme:            default

    list:
      title:            "Category List"
      list:      
      display:
        "NONE": [id, title_i18n_en]
        "Title":
          - title_i18n_en
          - title_i18n_fr
      fields:        
        title_i18n_en:
          name: English
          params: disabled=false
        title_i18n_fr:
          name: French
          params: disabled=false

    edit:
      title:            "Category properties"
      edit:      
      display:
        "NONE": [Category] //???????
        "Title":
          - title_i18n_en
          - title_i18n_fr
        "Description":
          - introduction_i18n_en
          - introduction_i18n_fr
      fields:
        Category: doctrine_admin_double_list  // ?????????   
        title_i18n_en:
          name: English
          params: disabled=false
        title_i18n_fr:
          name: French
          params: disabled=false
        introduction_i18n_en:
          name: English
          type: textarea_tag
          params: disabled=false size=100x4
        introduction_i18n_fr:
          name: French
          type: textarea_tag
          params: disabled=false size=100x4

fixtures:
Category:
  Category_0:
    domain_id: 1
    Translation:
      en:
        title: Project
      fr:
        title: Projet
 
    children:
      Category_1:
        domain_id: 1
        Translation:
          en:
            title: xxxxxxx
          fr:
            title: xxxxxxxxxx
      Category_2:
        domain_id: 1
        Translation:
          en:
            title: xxxxxxxxx
          fr:
            title: xxxxxxxxxxx
       
        children:
          Category_3:
            domain_id: 1
            Translation:
              en:
                title: xxxxxxxx
              fr:
                title: xxxxxxxxxxx
 Topic: Creating a select tag in a partial?
Creating a select tag in a partial? [message #55992] Fri, 11 July 2008 19:06
ice_j7  is currently offline ice_j7
Messages: 116
Registered: February 2008
Location: Arequipa - Perú
Senior Member
How can i create a select tag in a partial?,

I'm digging into the form's framework core code, and the unique manner to do this is:

<?php
$s 
= new sfWidgetFormSelect(array('choices' => array('1' => '1''2' => '2''3' => '3''4' => '4')));
              echo 
$s->render('max_per_page'$sf_params->get('max'))
?>


but it looks terribly ugly to instantiate and object in a template. Personally I missed the form helpers rapid syntax in a template for anything that is not inside a form, so i think i could do a helper select_tag() (like Symfony 1.0) but using sfWidgetFormSelect in its definition, so we use all the right things.
Please comment about this here, i would like your feedback about this idea or maybe i just not search well enough and there is a better way to do it.

Regards


Search in the code, find wisdom.
 Topic: Fieldset Form Widget
Fieldset Form Widget [message #55995] Fri, 11 July 2008 21:57
nloyola  is currently offline nloyola
Messages: 1
Registered: July 2008
Junior Member
Just curious if anybody has thought about or has implemented a <fieldset> widget with the new form framework? If so are there any examples?

Thanks much
 Topic: How I can pass object from action to AbcForm::configure() method.
How I can pass object from action to AbcForm::configure() method. [message #56014] Sat, 12 July 2008 11:22
Whisller  is currently offline Whisller
Messages: 3
Registered: June 2008
Location: Warsaw, Poland
Junior Member

Hi,
I have a logical problem with new form classes.
In action ( execute method ) I get an object. This object I must use in AbcForm class in configure method.
So first what I did was create __construct method in my AbcForm class, with one parameter.
<?php
public function __construct($myObject) {
  
parent::__construct();
  
  
$this->myObject $myObject;

  echo 
' AbcForm::__construct ';
}
?>


And my configure method
<?php
public function configure() {
  echo 
' AbcForm::configure() ';
  
  
# var_dump($this->myObject);
}
?>


But after created new instance of AbcForm class in action ( $this->form = new AbcForm($myObject) )
I saw on page
AbcForm::configure() AbcForm::__construct

So I cannot get access $this->myObject object in configure :/

Any solutions?

Best regards,
Whisller.

[Updated on: Sat, 12 July 2008 11:23]

 Topic: upgrade to symfony 1.1. with pear "failed", but symfony "works"
upgrade to symfony 1.1. with pear "failed", but symfony "works" [message #56018] Sat, 12 July 2008 13:05
abash  is currently offline abash
Messages: 15
Registered: May 2006
Location: Moscow, Russia
Junior Member

I have no idea:

site ~ # symfony -V
symfony version 1.1.0 (/usr/lib/php5/share/pear/symfony)


site ~ # pear info symfony/symfony
No information found for `symfony/symfony'


site ~ # pear install symfony/symfony
Skipping package "symfony/symfony", already installed as version
No valid packages found
install failed


site ~ # pear -v upgrade symfony/symfony
downloading symfony-1.1.0.tgz ...
Starting to download symfony-1.1.0.tgz (2,130,238 bytes)
......................................done: 2,130,238 bytes
ERROR: pear.symfony-project.com/symfony not installed


site ~ # pear uninstall symfony/symfony

Fatal error: Call to a member function resetDirtree() on a non-object in /usr/share/php/PEAR/Installer.php on line 835


I really don't understand what is wrong. But i still does not report some bugs which i head after upgrade because I not sure - is it a bug or my environment problem.

Does any one have something like this?

[Updated on: Sat, 12 July 2008 13:06]


And for the time it was good...
 Topic: No release available for plugin "" in state "" that satisfies the application re
No release available for plugin "" in state "" that satisfies the application re [message #56020] Sat, 12 July 2008 14:27
abash  is currently offline abash
Messages: 15
Registered: May 2006
Location: Moscow, Russia
Junior Member

I recently moved to symfony 1.1.

site~ /var/www/project $ symfony plugin-install sfSimpleCMSPlugin
>> plugin    installing plugin "sfSimpleCMSPlugin"


  No release available for plugin "sfSimpleCMSPlugin" in state "beta" that satisfies the application requirements.

Does it mean that i should wait the plugin authors to migrate the plugin to 1.1. ?
Or, is there any config option to allow 1_0 compatibility?
like

compat_10:              on


And for the time it was good...
 Topic: AddCredential and CSRF protection
icon5.gif  AddCredential and CSRF protection [message #56027] Sat, 12 July 2008 17:40
pentium133  is currently offline pentium133
Messages: 8
Registered: June 2008
Junior Member
After submit my form, I call function sfUser->AddCredential (in filter) and symfony core call session_regenerate_id function.

And after appear CSRF validatuon error Sad

[Updated on: Sat, 12 July 2008 17:41]

 Topic: hasFiles() in 1.1
icon5.gif  hasFiles() in 1.1 [message #56067] Mon, 14 July 2008 05:07
norbu09  is currently offline norbu09
Messages: 1
Registered: July 2008
Junior Member
hi,

i try to find a way around the problem that hasFiles() does not exist in 1.1 anymore. my problem is that i generate my forms on the fly so i have no defined filed names. is there a way to get hasFiles() in 1.1 without calling the compat_10 thing and without writing code that uses deprecated API calls?

thanks
lenz
 Topic: symfony working with multiple schemas and views on PostgreSQL - symfony 1.1
symfony working with multiple schemas and views on PostgreSQL - symfony 1.1 [message #56150] Mon, 14 July 2008 20:13
patrickespake  is currently offline patrickespake
Messages: 49
Registered: January 2008
Location: Brasil
Member

symfony 1.1

http://trac.symfony-project.org/wiki/HowToPatchSymfony1.1ToT hePostgreSQLWorkingMultipleSchemas


Patrick Espake
patrickespake@gmail.com
http://patrickespake.wordpress.com
 Topic: How to create a required marker in forms?
How to create a required marker in forms? [message #56154] Mon, 14 July 2008 20:53
Seikilos  is currently offline Seikilos
Messages: 609
Registered: May 2008
Location: Germany
Faithful Member
When outputting forms with echo $forms; there is no marker for required fields, something like

* Name: <input>

Is there way to add that kind of output? Or is the only way by overriding the output of the form by myself?


Debugging is all I doֻ (if these dots are not in line then your screen is broken)
 Topic: How to specify helper in generator.yml
How to specify helper in generator.yml [message #56158] Mon, 14 July 2008 21:06
moussa1979  is currently offline moussa1979
Messages: 2
Registered: August 2006
Junior Member
Hi,

How can i specify helper (ie DateForm Helper) in generator.yml file.

Thanks.
 Topic: How to build a plug-in symfony 1.1?
How to build a plug-in symfony 1.1? [message #56178] Tue, 15 July 2008 00:00
patrickespake  is currently offline patrickespake
Messages: 49
Registered: January 2008
Location: Brasil
Member

I'm updating my plugins made to version 1.0 of symfony to the version 1.1.

Much has changed in the construction of plugins, I could not find a good documentation that explains how to build a plugin for the symfony 1.1 and talk about the sfTask.

Can anyone help?

How do i build a plugin? There is a How to?


Patrick Espake
patrickespake@gmail.com
http://patrickespake.wordpress.com
 Topic: New field not appearing on form
New field not appearing on form [message #56222] Tue, 15 July 2008 12:54
dagger  is currently offline dagger
Messages: 8
Registered: July 2008
Junior Member
Hi,

I am a beginner on symfony (so bear with me)... i have created a project with 2 tables/models
user:
 id:
 email: varchar(100)
 password: varchar(100)

article:
 id:
 user_id:
 title: varchar(100)
 body: longvarchar


now - i initially forgot the user_id field and i build-models and also the forms... every thing worked fine... but now when i added the user_id field in schema.yml (also updated the database) and build-model along with forms- the form of article does not show the user_id ... the BaseArticleForm contains the

$this->setWidgets(array(
      'id'              => new sfWidgetFormInputHidden(),      
      'title'           => new sfWidgetFormInput(),
      'body'            => new sfWidgetFormInput(),
      'user_id'         => new sfWidgetFormPropelSelect(array('model' => 'User', 'add_empty' => true)),
    ));


user_id field but the form does not show the field ... is this how is it suppose to behave??? or is there something wrong...


would highly appreciate the help - thanks

[Updated on: Tue, 15 July 2008 19:55]


replication is stupid... reusability is perfect!
 Topic: Spyc not working
Spyc not working [message #56253] Tue, 15 July 2008 19:02
patrickespake  is currently offline patrickespake
Messages: 49
Registered: January 2008
Location: Brasil
Member

I need to use a class Spyc.class.php. As I do this in symfony 1.1?

Spyc not working more in symfony 1.1.

What do i do?

  private function merge($pFirstFile, $pSecondFile)
  {
    if(is_file($pFirstFile) && is_file($pSecondFile))
    {
      // Load yaml files for arrays
      $_spyc = new Spyc();
      $_firstYaml  = $_spyc->load($pFirstFile);
      $_secondYaml = $_spyc->load($pSecondFile);

      // Merge arrays
      $_endYaml = $this->_mergeArrays($_firstYaml, $_secondYaml);

      // Generate YAML
      return Spyc::YAMLDump($_endYaml, true);
    }
  }


Patrick Espake
patrickespake@gmail.com
http://patrickespake.wordpress.com
 Topic: My first application error
My first application error [message #56264] Tue, 15 July 2008 23:51
filtro  is currently offline filtro
Messages: 1
Registered: July 2008
Junior Member
I'm trying to learn symfony. I've tried the tutorial My first application, but I have some big issues.
First when I try to insert a comment symfony return me this error:
Post id
Fatal error: Call to undefined method Post::__toString() in /Library/WebServer/Documents/sf_sandbox/lib/symfony/plugins/ sfPropelPlugin/lib/propel/widget/sfWidgetFormPropelSelect.cl ass.php on line 88

I did't edit files I used only the terminal comand, so that sounds strange.

I tried to continue, but I met a new problem.
Tutorial ask me to edit executeShow method into sf_sandbox/apps/frontend/modules/post/actions/actions.class. php file
but this method there isn't, so I tryed to add it.

but tutorial continues asking to edit sf_sandbox/apps/frontend/modules/post/templates/showSuccess. php template
but it there isn't.

I don't understand if there is some errors, or I'm doing some mistakes. Is there some expert user that tried to complete the tutorial using symfony 1.1 version?
Thanks
Fil
Pages (9): [1  2  3  4  5  6  7  8  9  >  »]

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