[symfony-users] Re: Misterious behaviour with admin-generator

2010-02-09 Thread Tom Ptacnik
What platform? Which version of php? Which version of Symfony?

Show more code from the
BaseT_provinciaGeneratorConfiguration.class.php file (at least the
function which is on the line 101)


On 9 ún, 17:35, ReynierPM  wrote:
> Hi:
> One module of my application is giving me this error:
>
> Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING,
> expecting ')' in
> D:\WebServer\varwww\dev\afilreg\cache\dashboard\dev\modules\autoT_provincia­\lib\BaseT_provinciaGeneratorConfiguration.class.php
> on line 101
>
> Hi check the generated file
> "BaseT_provinciaGeneratorConfiguration.class.php" and just at the
> beggining of the line 101 I can see a misterious "F" :( I check the file
> schema.yml (see below) and I can't see any problems:
>
> generator:
>    class: sfDoctrineGenerator
>    param:
>      model_class:           TPais
>      theme:                 admin
>      non_verbose_templates: true
>      with_show:             false
>      singular:              ~
>      plural:                ~
>      route_prefix:          t_pais
>      with_doctrine_route:   true
>      actions_base_class:    sfActions
>      config:
>        actions:
>          _new: { label: Adicionar }
>        fields:
>          codigo: { label: C digo }
>          nombre: { label: Nombre }
>        list:
>          title: Listar registros
>        filter:  ~
>        form:    ~
>        edit:
>          title: Editar registro "%%nombre%%"
>        new:
>          title: Adicionar registro
>
> Any ideas?
> --
> Cheers
> ReynierPM

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Doctrine - how to detect if behavior exists

2010-02-09 Thread Daniel Kucharski
Hi,

 

Is it possible to detect if for a given model class a specific behavior
exists?  (eg. Does the Timestampable behavior exists for model class User)

 

Kind regards,

 

Daniel

 

 

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: changing symfony project structure

2010-02-09 Thread Tom Ptacnik
Shorter question :-)

Did someone tryied to change project structure to:

/www(web folder - index.php, .htaccess, css, js)
/www/application(rest of the application - apps,cache,config,)

and had some problems with that?

Thank you for your responses.


On 9 ún, 07:59, Tom Ptacnik  wrote:
> Hello,
>
> I want to know what do you think about my new Somfony project
> structures which I've created.
>
> I needed to change it, because of my clients hosting. He host on the
> server, where he can't change anything in apache configuration.
> He has configured hosting that way, that every folder in his webfolder
> is a subdomain
> /www iswww.domain.com, /new is new.domain.com etc. So every subfolder
> is "like a" virtual.
>
> The problem is, that I can't deploy the application into the parent
> folder and thus use classic symfony structure and use /www for a
> classic symfony webfolder.
>
> I've created two functional project structures, which works on his
> host and I want to know your judgement :)
>
> In both ways I have web folder directly in the /www folder
> In both ways I can't create the /sf alias - so I simply copied the /sf
> folder to the /www folder
>
> 1)
> /www (web folder - index.php, .htaccess, css, js)
> /application (rest of the application - apps,cache,config, data,)
>
> In this solution I've created .htacces with "deny from all" and
> inserted it to the /application folder - for denying the access to the
> application subdomain which is automaticly created by the settings of
> the webserver.
>
> 2)
> /www    (web folder - index.php, .htaccess, css, js)
> /www/application    (rest of the application - apps,cache,config,
> data,)
>
> In this solution I've inserted the application directory into the www
> folder. Created the .htaccess with "deny from all" in it too - deny
> the access to thewww.domain.com/application
>
> I like this second solution because I have whole application in one
> directory. It look pretty compact to me.
>
> For both possibilities need only to change 3 things
> - the web folder path in the /config/ProjectConfiguration.class.php:
> $this->setWebDir($this->getRootDir().'/../');
> - the include of the ProjectConfiguration.class.php in all indexes
> (index.php, frontend_dev.php)
> - uncomment the  RewriteBase / in the standard symfony .htaccess file
>
> The image is maybe more explainable  :http://tinyurl.com/yzf3na3
> (on the picture the application folder of the 1) solution is named
> "app" )
>
> I haven't created whole functional application, I've only generated a
> frontend application and managed to show the  "Congratulations! You
> have successfully created your symfony project." page.
> So I think, it will work..
>
> Before I will start to develope the application I want to know your
> opinion.
>
> Please tell me what do you think about this solutions and if you know
> some disadvantages / advantages of some of them...

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: Help with Schema

2010-02-09 Thread Raphael Schumacher
Your declaration of the many-many relationship between Campaign and
AddressBook is not complete enough. In particular, search the
"refClass" parameters are lacking in your schema.yml.
Your schema as of now declares only these two 1--to-many
relationships, which is not wrong but only half of the story. In other
words, it tells CampaignAddressBook to know about Campaign and about
AddressBook (and vice-versa), but Campaign and AddressBook don't know
anything about their many-to-many relationship among them. That
prevents you to have the needed straighforward methods being
generated, like $myCampaign->getAddressBooks(); or $myAddress-
>getCampaigns();, and the like. In the end this is also what the form
generator need to have in place in order to choose the right widgets,
which reportedly is not the case know.
Check the Doctrine ORM documentation on www.doctrine-project.org for
that, there are plenty of examples out there (including the symfony
books).

Hope that helps, cheers RAPHAEL

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] Re: sfShop demo?

2010-02-09 Thread apm

Andreas Nyholm :

Hi.

If you are willing to work on sfShop, please let me know. sfShop is not 
dead, just asleep :)




I am interested in sfShop, because have similar task. And i ready to 
share some code for open-source.
But problem is , i am beginner in symfony, not sure that i am will be 
useful.


--
You received this message because you are subscribed to the Google Groups "symfony 
users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] Re: Ajax Forms

2010-02-09 Thread Absalón Valdés
on ajax validation symfony automatically removes layout, so you can retrive
error messages with a ajax call using jquery in same way that I explained on
my last post. (with ".error" or ".notice" selector).
in module action, you can return only messages in ajax request:
  if ($request->isXmlHttpRequest())
  {
   // return some in json or xml or any format
  }
and for get form error messages:
$form->getObject()->getErrorStack();
or maybe there is a plugin for that. i don't know.


2010/2/10 Samuel Morhaim 

> Stefan, thank you.. and for the ajax validation?
>
>
> On Wed, Feb 10, 2010 at 1:10 AM, Stefan Paschke  > wrote:
>
>> Hi Samuel
>>
>> this is pretty straightforward. Install the sfJqueryReloaded plugin for
>> the jQuery functionality. This gives you the jq_link_to_remote() and
>> jq_form_remote_tag() functions (that actually replace previous prototype
>> functions from symfony 1.0). Both functions are wrappers to jQuery.ajax, the
>> parameters allow you to specify the id of a html element that you wish to
>> replace with the return of the ajax calls. For the actions, you just create
>> regular symfony actions. Instead of returning a view in a separate
>> success.php file, you can return the view from the action, with
>>
>> return $this->renderPartial( 'module/partial', array( 'param' => $param )
>> );
>>
>> This is documented nicely somewhere, but I forgot where :-) Now to submit
>> the form and add a new entry to the list, I usually reload the entire block
>> that contains list and form, with the new entry added to the list, and an
>> empty form. To delete an entry from the from, you could just replace the
>> block that contains the form. Sometimes, it may also be appropriate to write
>> a jQuery function that removes one row from the list and sends a delete call
>> to the server which is not answered.
>>
>> regards
>>
>> Stefan
>>
>>
>> On Feb 10, 2010, at 5:48 AM, Samuel Morhaim wrote:
>>
>> > Absalon, thank you..  this shed some light...  and I got part of it
>> working, however I am still having issues.
>> >
>> > I managed to display the list and the form on the same screen, and
>> submiting it side by side, it adds a new record to the table (by refreshing
>> the entire page.. )
>> >
>> > I still have issues how to execute the remote and also, how to do ajax
>> validations.  Using Symfony 1.4.
>> >
>> > It seems since they removed it remote on 1.4, and the manual doesn't
>> talk much about it its hard to find information (at least for me).
>> >
>> > Anyone?
>> >
>> > Thank you.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "symfony users" group.
>> To post to this group, send email to symfony-us...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> symfony-users+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/symfony-users?hl=en.
>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] Re: Ajax Forms

2010-02-09 Thread Stefan Paschke
Ajax form validation works like regular form validation. The action inits and 
binds the form class, if it does not validate, you just return the bound form 
complete with error messages. It's described in the jobeet tutorial.

Stefan

On Feb 10, 2010, at 7:24 AM, Samuel Morhaim wrote:

> Stefan, thank you.. and for the ajax validation?
> 

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] Re: sfShop demo?

2010-02-09 Thread Andreas Nyholm

Hi.

I'm not the one who created sfShop, but I'm the only one who have been 
comitting changes to the code the last year. I'm currently using sfshop 
for two small shops. sfShop has basic functionality but before using 
sfShop for bigger projects, there are a some changes/additions needed.


My setup is that I have a local project base and I'm using only the 
plugins from sfShop + a few of my own plugins to create a bit different 
behavior.


I can't say if/how a checkout from trunk work today. But there should 
not be any major problems.


If you are willing to work on sfShop, please let me know. sfShop is not 
dead, just asleep :)


Regards,
Andreas

Florian wrote:

Hi,

For a quick demo with fixtures:

http://code.google.com/p/sfshop/source/browse/trunk/INSTALL


There is some activity on this project, so maybe will you soon see a
demo, but to my mind, no live site running with sfShop yet.

I saw a post a few days ago saying it didn't work with sf 1.4 ...

http://groups.google.fr/group/symfony-users/browse_thread/thread/01b400219f764079/01e5c9615aff69a6?show_docid=01e5c9615aff69a6&fwc=1

Hope it helps.


On 9 fév, 13:41, Sid Bachtiar  wrote:

Has anyone used sfShop in their project? Any live site?

--
Blue Horn Ltd - System Developmenthttp://bluehorn.co.nz




--
You received this message because you are subscribed to the Google Groups "symfony 
users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] Re: Ajax Forms

2010-02-09 Thread Samuel Morhaim
Stefan, thank you.. and for the ajax validation?

On Wed, Feb 10, 2010 at 1:10 AM, Stefan Paschke
wrote:

> Hi Samuel
>
> this is pretty straightforward. Install the sfJqueryReloaded plugin for the
> jQuery functionality. This gives you the jq_link_to_remote() and
> jq_form_remote_tag() functions (that actually replace previous prototype
> functions from symfony 1.0). Both functions are wrappers to jQuery.ajax, the
> parameters allow you to specify the id of a html element that you wish to
> replace with the return of the ajax calls. For the actions, you just create
> regular symfony actions. Instead of returning a view in a separate
> success.php file, you can return the view from the action, with
>
> return $this->renderPartial( 'module/partial', array( 'param' => $param )
> );
>
> This is documented nicely somewhere, but I forgot where :-) Now to submit
> the form and add a new entry to the list, I usually reload the entire block
> that contains list and form, with the new entry added to the list, and an
> empty form. To delete an entry from the from, you could just replace the
> block that contains the form. Sometimes, it may also be appropriate to write
> a jQuery function that removes one row from the list and sends a delete call
> to the server which is not answered.
>
> regards
>
> Stefan
>
>
> On Feb 10, 2010, at 5:48 AM, Samuel Morhaim wrote:
>
> > Absalon, thank you..  this shed some light...  and I got part of it
> working, however I am still having issues.
> >
> > I managed to display the list and the form on the same screen, and
> submiting it side by side, it adds a new record to the table (by refreshing
> the entire page.. )
> >
> > I still have issues how to execute the remote and also, how to do ajax
> validations.  Using Symfony 1.4.
> >
> > It seems since they removed it remote on 1.4, and the manual doesn't talk
> much about it its hard to find information (at least for me).
> >
> > Anyone?
> >
> > Thank you.
>
> --
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] Re: Ajax Forms

2010-02-09 Thread Stefan Paschke
Hi Samuel

this is pretty straightforward. Install the sfJqueryReloaded plugin for the 
jQuery functionality. This gives you the jq_link_to_remote() and 
jq_form_remote_tag() functions (that actually replace previous prototype 
functions from symfony 1.0). Both functions are wrappers to jQuery.ajax, the 
parameters allow you to specify the id of a html element that you wish to 
replace with the return of the ajax calls. For the actions, you just create 
regular symfony actions. Instead of returning a view in a separate success.php 
file, you can return the view from the action, with

return $this->renderPartial( 'module/partial', array( 'param' => $param ) );

This is documented nicely somewhere, but I forgot where :-) Now to submit the 
form and add a new entry to the list, I usually reload the entire block that 
contains list and form, with the new entry added to the list, and an empty 
form. To delete an entry from the from, you could just replace the block that 
contains the form. Sometimes, it may also be appropriate to write a jQuery 
function that removes one row from the list and sends a delete call to the 
server which is not answered.

regards

Stefan


On Feb 10, 2010, at 5:48 AM, Samuel Morhaim wrote:

> Absalon, thank you..  this shed some light...  and I got part of it working, 
> however I am still having issues.
> 
> I managed to display the list and the form on the same screen, and submiting 
> it side by side, it adds a new record to the table (by refreshing the entire 
> page.. ) 
> 
> I still have issues how to execute the remote and also, how to do ajax 
> validations.  Using Symfony 1.4. 
> 
> It seems since they removed it remote on 1.4, and the manual doesn't talk 
> much about it its hard to find information (at least for me).
> 
> Anyone?
> 
> Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] Bad saving on PropelChoice

2010-02-09 Thread Stefan Paschke
Hi Germana

both your keys ('true', 'false') are strings. My guess is that your field type 
is boolean, so any string will test true. In order to get boolean values, you'd 
need to write true and false, without quotes.

$this->widgetSchema['status'] = new sfWidgetFormChoice(array(
'choices' => array(
'' => '-Seleccione-',
 true=> 'Resuelto',
 false   => 'No Resuelto'
  )
));

regards

Stefan

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Conditional yml validation in symfony 1.2

2010-02-09 Thread Dijil
The development of the project I am working on was started in symfony
1.0 and then it was upgraded to 1.2. I have 2 pages, a sign up page
and a business registration page which were developed in 1.0. Now I
want to give the option for business registration in the sign up page
also if the user ticks a checkbox indicating his preference to
register his business then. If the checkbox is not ticked the page
contains only user registration details and so need to validate user
registration fields only. But if the checkbox is ticked the business
registration fields will also need to be validated. For this I used 2
yml files and validatexxx method is used to choose which yml file to
use. This method worked perfectly when I had a similar requirement in
a previous project which was done in symfony 1.0.

The code I used in my previous project is
public function executeTest()
{
..
..
}
public function handleErrorTest()
{
..
..
}
public function validateTest()
{
$validationConfig = $this->getModuleName().'/validate/test.yml';
$validateFile = sfConfigCache::getInstance()->
checkConfig(sfConfig::get('app_application_path').sfConfig::
get('app_module_path').'/'.$validationConfig, true);
$validatorManager = new sfValidatorManager();
$context=$this->getContext();
$validatorManager->initialize($context);
require($validateFile);
if (!$validatorManager->execute()) return false;
}

I modified the code like this for my current project
public function executeTest()
{
..
..
}
public function handleErrorTest()
{
..
..
}
public function validateTest()
{
$config = $this->getContext()->getConfiguration();
$sfConfigCache = new sfConfigCache($config);
$validationConfig = $this->getModuleName().'/validate/
MemberAndBusiness.yml';
$validateFile = $sfConfigCache->
checkConfig(sfConfig::get('app_application_path').sfConfig::
get('app_module_path').'/'.$validationConfig, true);
$validatorManager = new sfValidatorManager();
$context=$this->getContext();
$validatorManager->initialize($context);
require($validateFile);
if (!$validatorManager->execute())
{
return false;
}
}
sfConfig::get('app_application_path') contains the full application
path.

But I am getting null now for $validateFile variable.

Can anybody please help me on how to achieve my requirement. Is there
any other way in which config files can be read in symfony 1.2

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Conditional yml validation in symfony 1.2

2010-02-09 Thread Dijil
The development of the project I am working on was started in symfony
1.0 and then it was upgraded to 1.2. I have 2 pages, a sign up page
and a business registration page which were developed in 1.0. Now I
want to give the option for business registration in the sign up page
also if the user ticks a checkbox indicating his preference to
register his business then. If the checkbox is not ticked the page
contains only user registration details and so need to validate user
registration fields only. But if the checkbox is ticked the business
registration fields will also need to be validated. For this I used 2
yml files and validatexxx method is used to choose which yml file to
use. This method worked perfectly when I had a similar requirement in
a previous project which was done in symfony 1.0.

The code I used in my previous project is
public function executeTest()
{
 ..
 ..
}
public function handleErrorTest()
{
 ..
 ..
}
public function validateTest()
{
$validationConfig = $this->getModuleName().'/validate/test.yml';
  $validateFile = sfConfigCache::getInstance()->
checkConfig(sfConfig::get('app_application_path').sfConfig::
get('app_module_path').'/'.$validationConfig, true);
$validatorManager = new sfValidatorManager();
$context=$this->getContext();
  $validatorManager->initialize($context);
  require($validateFile);
  if (!$validatorManager->execute()) return false;
}

I modified the code like this for my current project
public function executeTest()
{
 ..
 ..
}
public function handleErrorTest()
{
 ..
 ..
}
public function validateTest()
{
$config = $this->getContext()->getConfiguration();
$sfConfigCache = new sfConfigCache($config);
$validationConfig = $this->getModuleName().'/validate/
MemberAndBusiness.yml';
  $validateFile = $sfConfigCache->
checkConfig(sfConfig::get('app_application_path').sfConfig::
get('app_module_path').'/'.$validationConfig, true);
$validatorManager = new sfValidatorManager();
$context=$this->getContext();
  $validatorManager->initialize($context);
  require($validateFile);
  if (!$validatorManager->execute())
  {
return false;
  }
}
sfConfig::get('app_application_path') contains the full application
path.

But I am getting null now for $validateFile variable.

Can anybody please help me on how to achieve my requirement. Is there
any other way in which config files can be read in symfony 1.2

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Conditional yml validation in symfony 1.2

2010-02-09 Thread Dijil
The development of the project I am working on was started in symfony
1.0 and then it was upgraded to 1.2. I have 2 pages, a sign up page
and a business registration page which were developed in 1.0. Now I
want to give the option for business registration in the sign up page
also if the user ticks a checkbox indicating his preference to
register his business then. If the checkbox is not ticked the page
contains only user registration details and so need to validate user
registration fields only. But if the checkbox is ticked the business
registration fields will also need to be validated. For this I used 2
yml files and validatexxx method is used to choose which yml file to
use. This method worked perfectly when I had a similar requirement in
a previous project which was done in symfony 1.0.

The code I used in my previous project is

$validationConfig = $this->getModuleName().'/validate/test.yml';
$validateFile = sfConfigCache::getInstance()->
checkConfig(sfConfig::get('app_application_path').sfConfig::
get('app_module_path').'/'.$validationConfig, true);
$validatorManager = new sfValidatorManager();
$context=$this->getContext();
$validatorManager->initialize($context);
require($validateFile);
if (!$validatorManager->execute()) return false;

I modified the code like this for my current project

$config = $this->getContext()->getConfiguration();
$sfConfigCache = new sfConfigCache($config);
$validationConfig = $this->getModuleName().'/validate/
MemberAndBusiness.yml';
$validateFile = $sfConfigCache->
checkConfig(sfConfig::get('app_application_path').sfConfig::
get('app_module_path').'/'.$validationConfig, true);
$validatorManager = new sfValidatorManager();
$context=$this->getContext();
$validatorManager->initialize($context);
require($validateFile);
if (!$validatorManager->execute())
{
return false;
}
sfConfig::get('app_application_path') contains the full application
path.

But I am getting null now for $validateFile variable.

Can anybody please help me on how to achieve my requirement. Is there
any other way in which config files can be read in symfony 1.2

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] mergeForm, embeddForm, embedRelation

2010-02-09 Thread Daniel Lohse
So, as promised, there you go:


http://www.symfony-project.org/plugins/ahDoctrineEasyEmbeddedRelationsPlugin

Take it for a spin and tell me how it goes!

Cheers, Daniel

On 09.02.2010, at 19:52, axel at wrote:

> Hello list,
> 
> are there any examples, docs for mergeForm, embeddForm, embedRelation
> and symfony 1.4?
> 
> I try to embedd an 1:1 related object into a form using mergeForm. The
> attributes of the merged form are displayed correctly but save doesn't
> work.
> 
> "Unknown record property / related component x on y" (x is an
> attribute of the embedded object and y is the "base" object that
> embedds the form.
> 
> I found
> http://www.blogs.uni-osnabrueck.de/rotapken/2009/03/13/symfony-merge-embedded-form/
> what seems to solve my problem but it doesn't work with symfony 1.4.
> 
> thx axel
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> symfony-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/symfony-users?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] Re: Ajax Forms

2010-02-09 Thread Samuel Morhaim
Absalon, thank you..  this shed some light...  and I got part of it working,
however I am still having issues.

I managed to display the list and the form on the same screen, and submiting
it side by side, it adds a new record to the table (by refreshing the entire
page.. )

I still have issues how to execute the remote and also, how to do ajax
validations.  Using Symfony 1.4.

It seems since they removed it remote on 1.4, and the manual doesn't talk
much about it its hard to find information (at least for me).

Anyone?

Thank you.


On Tue, Feb 9, 2010 at 10:01 PM, Absalón Valdés  wrote:

> hi. i apologize for my english. i,ll try to help.
> you can use jQuery or any else javascript library for submiting forms with
> ajax:
>
>-
>
> http://net.tutsplus.com/tutorials/javascript-ajax/submit-a-form-without-page-refresh-using-jquery/
>
> you see? well, after submit form you should refresh table. for deleting
> items from a table I think you should traverse table records and get a
> specific record across columns in a row and then submit the delete action
> with ID as parameter, as batch actions.
>
> 2010/2/9 Samuel Morhaim 
>
>> Anyone?
>>
>>
>> On Tue, Feb 9, 2010 at 3:12 PM, Samuel Morhaim 
>> wrote:
>>
>>> Can somebody show me or point me in the right direction for doing:
>>>
>>> 1. Same-screen form edits. (For example adding an entry to a table with a
>>> form on the same screen without re-navigating)
>>> 2. Deleting items from a table without re-navigating
>>>
>>>
>>> I know there are examples for sf 1.2 but it was removed on 1.4 and with
>>> the plugin there are no examples.
>>>
>>> Thank you.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "symfony users" group.
>> To post to this group, send email to symfony-us...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> symfony-users+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/symfony-users?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] Re: Ajax Forms

2010-02-09 Thread Absalón Valdés
hi. i apologize for my english. i,ll try to help.
you can use jQuery or any else javascript library for submiting forms with
ajax:

   -
   
http://net.tutsplus.com/tutorials/javascript-ajax/submit-a-form-without-page-refresh-using-jquery/

you see? well, after submit form you should refresh table. for deleting
items from a table I think you should traverse table records and get a
specific record across columns in a row and then submit the delete action
with ID as parameter, as batch actions.

2010/2/9 Samuel Morhaim 

> Anyone?
>
>
> On Tue, Feb 9, 2010 at 3:12 PM, Samuel Morhaim 
> wrote:
>
>> Can somebody show me or point me in the right direction for doing:
>>
>> 1. Same-screen form edits. (For example adding an entry to a table with a
>> form on the same screen without re-navigating)
>> 2. Deleting items from a table without re-navigating
>>
>>
>> I know there are examples for sf 1.2 but it was removed on 1.4 and with
>> the plugin there are no examples.
>>
>> Thank you.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: Ajax Forms

2010-02-09 Thread Samuel Morhaim
Anyone?

On Tue, Feb 9, 2010 at 3:12 PM, Samuel Morhaim wrote:

> Can somebody show me or point me in the right direction for doing:
>
> 1. Same-screen form edits. (For example adding an entry to a table with a
> form on the same screen without re-navigating)
> 2. Deleting items from a table without re-navigating
>
>
> I know there are examples for sf 1.2 but it was removed on 1.4 and with the
> plugin there are no examples.
>
> Thank you.
>

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Bad saving on PropelChoice

2010-02-09 Thread Germana Oliveira
HI!!

i have this widget:

 $this->widgetSchema['status'] = new sfWidgetFormChoice(array(
 'choices' => array(
 '' => '-Seleccione-',
 'true'=> 'Resuelto',
 'false'   => 'No Resuelto'
   )
 ));


and its validator:

$this->setValidators(array(
  'status'  => new sfValidatorChoice(array('choices' =>
array( 'true', 'false'), 'required' => true)),
));


but it seems that no matter if i select Resuelto or 'No Resuelto' it is
saving it as 'Resuelto' it means true.

What am i doing wrong???


-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] mergeForm, embeddForm, embedRelation

2010-02-09 Thread Daniel Lohse
Hey there,

funny someone is asking that today when I'm close to finishing my 
implementation.

Hang on, I'll have something (maybe even plugin-like) by tomorrow. If you want 
to get started quickly, here's the blog post where I'm basing my work on (yes, 
works in sf1.4):


http://prendreuncafe.com/blog/post/2009/11/29/Embedding-Relations-in-Forms-with-Symfony-1.3-and-Doctrine

But this was too hard-coded for me so I made it more generic so it works with 
multiple embedded relations and is more configurable.


Cheers, Daniel

On 09.02.2010, at 19:52, axel at wrote:

> Hello list,
> 
> are there any examples, docs for mergeForm, embeddForm, embedRelation
> and symfony 1.4?
> 
> I try to embedd an 1:1 related object into a form using mergeForm. The
> attributes of the merged form are displayed correctly but save doesn't
> work.
> 
> "Unknown record property / related component x on y" (x is an
> attribute of the embedded object and y is the "base" object that
> embedds the form.
> 
> I found
> http://www.blogs.uni-osnabrueck.de/rotapken/2009/03/13/symfony-merge-embedded-form/
> what seems to solve my problem but it doesn't work with symfony 1.4.
> 
> thx axel
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> symfony-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/symfony-users?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: How to change the route created by the admin generator

2010-02-09 Thread Fabrizio
When I type
$ ./symfony app:routes backend

I get:

>> app   Current routes for application "backend"

Name Method  Pattern
productGET/product/:type_id.:sf_format
product_newGET/product/:type_id/new.:sf_format
product_create POST   /product/:type_id.:sf_format
product_edit   GET/product/:type_id/:id/edit.:sf_format
product_update PUT/product/:type_id/:id.:sf_format
product_delete DELETE /product/:type_id/:id.:sf_format
product_show   GET/product/:type_id/:id.:sf_format
product_object GET/product/:type_id/:id/:action.:sf_format
product_collection POST   /product/:type_id/:action/action.:sf_format

which is precisely the behavior that I expect.

I also tried to create a method

getTypeId() in

/lib/model/doctrine/product.class.php

but does not work.

I always see the message:

The "/product/:type_id/:action/action.:sf_format" route has some
missing mandatory parameters (:type_id).


On 9 Feb, 22:49, Stéphane  wrote:
> Well, you want product/:type_id/:id/:action ?
>
> Before Printing, Think about Your Environmental Responsibility!
> Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!
>
> On Tue, Feb 9, 2010 at 9:58 PM, Fabrizio wrote:
>
> > (Upon, there is a little typo)
>
> > With my code
>
> > prefix_path:          product/:type_id
>
> > I expect (for example with type_id = 1)
>
> >www.yourserver.com/backend_dev.php/product/1
> > for list
>
> >www.yourserver.com/backend_dev.php/product/1/1/edit
> >  for edit product 1
>
> > On 9 Feb, 21:32, Fabrizio  wrote:
> > > Hi,
> > > no, the normal behavior with
>
> > > prefix_path:          /product
>
> > > is
>
> > >www.yourserver.com/backend_dev.php/product
> > > for list
>
> > >www.yourserver.com/backend_dev.php/product/1/edit
> > > for edit product 1
>
> > > With my code
>
> > > prefix_path:          product/:type_id
>
> > > I expect (for example with type_id = 1)
>
> > >www.yourserver.com/backend_dev.php/1/product
> > > for list
>
> > >www.yourserver.com/backend_dev.php/product/1/1/edit
> > > for edit product 1
>
> > > If it worked the code above, I will use the type_id to filter the list
>
> > > Fabrizio
>
> > > On 9 Feb, 21:21, Stéphane  wrote:
>
> > > > Hi,
>
> > > > Sorry for the */*, I just put the / in bold using gmail and something
> > bad
> > > > happen :-)
>
> > > > It looks like the first / doesnt matter, but you should put it I
> > believe.
>
> > > > The error message is saying that in the given url, which does match the
> > > > route "/product/:type_id/action...", the :type_id parameter isn't
> > defined.
>
> > > >www.yourserver.com/app_dev.php/product/1/edit
>
> > > > Is this the kind of url you are expecting ? Does it work with this ?
> > > > Btw, why don't you use admin-gen feature ?
>
> > > > Cheers,
>
> > > > Before Printing, Think about Your Environmental Responsibility!
> > > > Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!
>
> > > > On Tue, Feb 9, 2010 at 9:16 PM, Fabrizio  > >wrote:
>
> > > > > Hi Stephane,
> > > > > with your code
>
> > > > > prefix_path:          */*product/:type_id
>
> > > > > occurs the following error message
>
> > > > > Unable to parse file "/apps/backend/config/routing.yml": Reference
> > "*/
> > > > > *product/:type_id" does not exist (prefix_path: */*product/:type_id).
>
> > > > > With my code
>
> > > > > prefix_path:          product/:type_id
>
> > > > > the error is
>
> > > > > The "/product/:type_id/:action/action.:sf_format" route has some
> > > > > missing mandatory parameters (:type_id).
>
> > > > > What is wrong?
>
> > > > > On 9 Feb, 11:47, Stéphane  wrote:
> > > > > > Hi,
>
> > > > > > try using "prefix_path:          */*product/:type_id"
>
> > > > > > Cheers,
>
> > > > > > Before Printing, Think about Your Environmental Responsibility!
> > > > > > Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!
>
> > > > > > On Tue, Feb 9, 2010 at 11:45 AM, Fabrizio <
> > fabrizio.pucci...@gmail.com
> > > > > >wrote:
>
> > > > > > > I have a route generated with admin generator
>
> > > > > > > # apps/backend/config/routing.yml
> > > > > > > product:
> > > > > > >  class: sfDoctrineRouteCollection
> > > > > > >  options:
> > > > > > >    model:                Product
> > > > > > >    module:               product
> > > > > > >    prefix_path:          product
> > > > > > >    column:               id
> > > > > > >    with_wildcard_routes: true
>
> > > > > > > This work correctly:
>
> > > > > > > 
>
> > > > > > > I want to prefix to this standard routing, a numeric value which
> > can
> > > > > > > serve to show not the complete list, but a list filtered
> > according to
> > > > > > > that value passed
>
> > > > > > > # apps/backend/config/routing.yml
> > > > > > > product:
> > > > > > >  class: sfDoctrineRouteCollection
> > > > > > >  options:
> > > > > > >    model:                Product
> > > > > > >    module:               product
> > > > > > >    prefix_

Re: [symfony-users] Re: How to change the route created by the admin generator

2010-02-09 Thread Stéphane
Well, you want product/:type_id/:id/:action ?

Before Printing, Think about Your Environmental Responsibility!
Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!


On Tue, Feb 9, 2010 at 9:58 PM, Fabrizio wrote:

> (Upon, there is a little typo)
>
> With my code
>
> prefix_path:  product/:type_id
>
> I expect (for example with type_id = 1)
>
> www.yourserver.com/backend_dev.php/product/1
> for list
>
> www.yourserver.com/backend_dev.php/product/1/1/edit
>  for edit product 1
>
> On 9 Feb, 21:32, Fabrizio  wrote:
> > Hi,
> > no, the normal behavior with
> >
> > prefix_path:  /product
> >
> > is
> >
> > www.yourserver.com/backend_dev.php/product
> > for list
> >
> > www.yourserver.com/backend_dev.php/product/1/edit
> > for edit product 1
> >
> > With my code
> >
> > prefix_path:  product/:type_id
> >
> > I expect (for example with type_id = 1)
> >
> > www.yourserver.com/backend_dev.php/1/product
> > for list
> >
> > www.yourserver.com/backend_dev.php/product/1/1/edit
> > for edit product 1
> >
> > If it worked the code above, I will use the type_id to filter the list
> >
> > Fabrizio
> >
> > On 9 Feb, 21:21, Stéphane  wrote:
> >
> > > Hi,
> >
> > > Sorry for the */*, I just put the / in bold using gmail and something
> bad
> > > happen :-)
> >
> > > It looks like the first / doesnt matter, but you should put it I
> believe.
> >
> > > The error message is saying that in the given url, which does match the
> > > route "/product/:type_id/action...", the :type_id parameter isn't
> defined.
> >
> > >www.yourserver.com/app_dev.php/product/1/edit
> >
> > > Is this the kind of url you are expecting ? Does it work with this ?
> > > Btw, why don't you use admin-gen feature ?
> >
> > > Cheers,
> >
> > > Before Printing, Think about Your Environmental Responsibility!
> > > Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!
> >
> > > On Tue, Feb 9, 2010 at 9:16 PM, Fabrizio  >wrote:
> >
> > > > Hi Stephane,
> > > > with your code
> >
> > > > prefix_path:  */*product/:type_id
> >
> > > > occurs the following error message
> >
> > > > Unable to parse file "/apps/backend/config/routing.yml": Reference
> "*/
> > > > *product/:type_id" does not exist (prefix_path: */*product/:type_id).
> >
> > > > With my code
> >
> > > > prefix_path:  product/:type_id
> >
> > > > the error is
> >
> > > > The "/product/:type_id/:action/action.:sf_format" route has some
> > > > missing mandatory parameters (:type_id).
> >
> > > > What is wrong?
> >
> > > > On 9 Feb, 11:47, Stéphane  wrote:
> > > > > Hi,
> >
> > > > > try using "prefix_path:  */*product/:type_id"
> >
> > > > > Cheers,
> >
> > > > > Before Printing, Think about Your Environmental Responsibility!
> > > > > Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!
> >
> > > > > On Tue, Feb 9, 2010 at 11:45 AM, Fabrizio <
> fabrizio.pucci...@gmail.com
> > > > >wrote:
> >
> > > > > > I have a route generated with admin generator
> >
> > > > > > # apps/backend/config/routing.yml
> > > > > > product:
> > > > > >  class: sfDoctrineRouteCollection
> > > > > >  options:
> > > > > >model:Product
> > > > > >module:   product
> > > > > >prefix_path:  product
> > > > > >column:   id
> > > > > >with_wildcard_routes: true
> >
> > > > > > This work correctly:
> >
> > > > > > 
> >
> > > > > > I want to prefix to this standard routing, a numeric value which
> can
> > > > > > serve to show not the complete list, but a list filtered
> according to
> > > > > > that value passed
> >
> > > > > > # apps/backend/config/routing.yml
> > > > > > product:
> > > > > >  class: sfDoctrineRouteCollection
> > > > > >  options:
> > > > > >model:Product
> > > > > >module:   product
> > > > > >prefix_path:  product/:type_id
> > > > > >column:   id
> > > > > >with_wildcard_routes: true
> >
> > > > > >  > > > > > >get('type_id'));
> >
> > > > > > Despite it seems to me conceptually correct, this procedure does
> not
> > > > > > work.
> >
> > > > > > When I click on the link an error message indicates that is
> missing
> > > > > > the variable type_id, despite being passed correctly
> >
> > > > > > What is wrong?
> >
> > > > > > --
> > > > > > You received this message because you are subscribed to the
> Google
> > > > Groups
> > > > > > "symfony users" group.
> > > > > > To post to this group, send email to
> symfony-us...@googlegroups.com.
> > > > > > To unsubscribe from this group, send email to
> > > > > > symfony-users+unsubscr...@googlegroups.com
> 
> >
> > > > 
> 
> >
> >
> > > > > > .
> > > > > > For more options, visit this group at
> > > > > >http://groups.google.com/group/symfony-users?hl=en.
> >
> > > > --
> > > > You received this message because you are subscribed to the Google
> Groups
> > > > "symfony users" group.
> > > > To post to this group, send email to symfony-us...@googlegr

[symfony-users] Re: How to change the route created by the admin generator

2010-02-09 Thread Fabrizio
(Upon, there is a little typo)

With my code

prefix_path:  product/:type_id

I expect (for example with type_id = 1)

www.yourserver.com/backend_dev.php/product/1
for list

www.yourserver.com/backend_dev.php/product/1/1/edit
 for edit product 1

On 9 Feb, 21:32, Fabrizio  wrote:
> Hi,
> no, the normal behavior with
>
> prefix_path:          /product
>
> is
>
> www.yourserver.com/backend_dev.php/product
> for list
>
> www.yourserver.com/backend_dev.php/product/1/edit
> for edit product 1
>
> With my code
>
> prefix_path:          product/:type_id
>
> I expect (for example with type_id = 1)
>
> www.yourserver.com/backend_dev.php/1/product
> for list
>
> www.yourserver.com/backend_dev.php/product/1/1/edit
> for edit product 1
>
> If it worked the code above, I will use the type_id to filter the list
>
> Fabrizio
>
> On 9 Feb, 21:21, Stéphane  wrote:
>
> > Hi,
>
> > Sorry for the */*, I just put the / in bold using gmail and something bad
> > happen :-)
>
> > It looks like the first / doesnt matter, but you should put it I believe.
>
> > The error message is saying that in the given url, which does match the
> > route "/product/:type_id/action...", the :type_id parameter isn't defined.
>
> >www.yourserver.com/app_dev.php/product/1/edit
>
> > Is this the kind of url you are expecting ? Does it work with this ?
> > Btw, why don't you use admin-gen feature ?
>
> > Cheers,
>
> > Before Printing, Think about Your Environmental Responsibility!
> > Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!
>
> > On Tue, Feb 9, 2010 at 9:16 PM, Fabrizio wrote:
>
> > > Hi Stephane,
> > > with your code
>
> > > prefix_path:          */*product/:type_id
>
> > > occurs the following error message
>
> > > Unable to parse file "/apps/backend/config/routing.yml": Reference "*/
> > > *product/:type_id" does not exist (prefix_path: */*product/:type_id).
>
> > > With my code
>
> > > prefix_path:          product/:type_id
>
> > > the error is
>
> > > The "/product/:type_id/:action/action.:sf_format" route has some
> > > missing mandatory parameters (:type_id).
>
> > > What is wrong?
>
> > > On 9 Feb, 11:47, Stéphane  wrote:
> > > > Hi,
>
> > > > try using "prefix_path:          */*product/:type_id"
>
> > > > Cheers,
>
> > > > Before Printing, Think about Your Environmental Responsibility!
> > > > Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!
>
> > > > On Tue, Feb 9, 2010 at 11:45 AM, Fabrizio  > > >wrote:
>
> > > > > I have a route generated with admin generator
>
> > > > > # apps/backend/config/routing.yml
> > > > > product:
> > > > >  class: sfDoctrineRouteCollection
> > > > >  options:
> > > > >    model:                Product
> > > > >    module:               product
> > > > >    prefix_path:          product
> > > > >    column:               id
> > > > >    with_wildcard_routes: true
>
> > > > > This work correctly:
>
> > > > > 
>
> > > > > I want to prefix to this standard routing, a numeric value which can
> > > > > serve to show not the complete list, but a list filtered according to
> > > > > that value passed
>
> > > > > # apps/backend/config/routing.yml
> > > > > product:
> > > > >  class: sfDoctrineRouteCollection
> > > > >  options:
> > > > >    model:                Product
> > > > >    module:               product
> > > > >    prefix_path:          product/:type_id
> > > > >    column:               id
> > > > >    with_wildcard_routes: true
>
> > > > >  > > > > >get('type_id'));
>
> > > > > Despite it seems to me conceptually correct, this procedure does not
> > > > > work.
>
> > > > > When I click on the link an error message indicates that is missing
> > > > > the variable type_id, despite being passed correctly
>
> > > > > What is wrong?
>
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > > Groups
> > > > > "symfony users" group.
> > > > > To post to this group, send email to symfony-us...@googlegroups.com.
> > > > > To unsubscribe from this group, send email to
> > > > > symfony-users+unsubscr...@googlegroups.com
> > > 
>
> > > > > .
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/symfony-users?hl=en.
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "symfony users" group.
> > > To post to this group, send email to symfony-us...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > symfony-users+unsubscr...@googlegroups.com
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/symfony-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] weird ness

2010-02-09 Thread Sid Bachtiar
"symfony cc"?

On Wed, Feb 10, 2010 at 4:09 AM, erikms  wrote:
> Hi all,
> I am developing an application in symphony 1.2
> the schema has a table named Orders, that has a 1->many relation to
> the table Products.
> This always worked.
> I can see the definition in the lib/model/base/Orders.class.php
> But all of a sudden my pages fail with the error
> "Unknown method Orders->getProduct()"
>
> First this happened in the dev environment., I did a lot of things,
> then suddenly it worked again... in dev
> Now I have it on the production server, and nothing seems to work
>
>
> permissions? did that
> check code? like 10 times, but maybe not in the right place (HELP?)
> trashed all on the server, complete reupload? no difference
> any ideas? anyone? please? completely stumped here
> -Erik
>
> --
> You received this message because you are subscribed to the Google Groups 
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> symfony-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/symfony-users?hl=en.
>
>



-- 
Blue Horn Ltd - System Development
http://bluehorn.co.nz

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: how to set up and configure memcache?

2010-02-09 Thread Joshua
Thank you Norbert.

1) install memcache
2) $cache = new sfMemcacheCache();

Apparently that is all I needed. Not sure why or how everyone is
writing their own 3 page blog posts about doing that. Way to over
complicate things.


On Feb 8, 3:17 pm, Norbert  wrote:
> just rtfm ;-)
>
> http://www.doctrine-project.org/documentation/manual/1_2/en/caching
> &http://www.symfony-project.org/book/1_2/18-Performance
>
> Am 08.02.10 17:29, schrieb Joshua:
>
> > Blogs blogs blogs. How am I supposed to know where to find these
> > things short of a google search?
>
> > On Feb 8, 1:52 am, Frank Stelzer  wrote:
>
> >> Hi,
> >> Here is explained, how you could configure memcache for  the view  
> >> cache or how you can handle memcache using within a singleton using it  
> >> for 
> >> everything:http://dev.esl.eu/blog/2009/06/05/memcached-as-singleton-in-symfony/
>
> >> Frank
>
> >> Am 08.02.2010 um 05:05 schrieb Joshua:
>
> >>> My end goal here is to have propel queries be memcached so common
> >>> queries do not need to be constantly run.
>
> >>> On Feb 7, 11:04 pm, Joshua  wrote:
>
>  I have searched and read and searched but I can't find any clear
>  documentation to set this up for symfony 1.2+. Apparently there are
>  configurations that need to be added to yml files and other things.
>  Where can I go to read about how to do this?
>
> >>> --
> >>> You received this message because you are subscribed to the Google  
> >>> Groups "symfony users" group.
> >>> To post to this group, send email to symfony-us...@googlegroups.com.
> >>> To unsubscribe from this group, send email to 
> >>> symfony-users+unsubscr...@googlegroups.com
> >>> .
> >>> For more options, visit this group 
> >>> athttp://groups.google.com/group/symfony-users?hl=en
> >>> .

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: How to change the route created by the admin generator

2010-02-09 Thread Fabrizio
Hi,
no, the normal behavior with

prefix_path:  /product

is

www.yourserver.com/backend_dev.php/product
for list

www.yourserver.com/backend_dev.php/product/1/edit
for edit product 1

With my code

prefix_path:  product/:type_id

I expect (for example with type_id = 1)

www.yourserver.com/backend_dev.php/1/product
for list

www.yourserver.com/backend_dev.php/product/1/1/edit
for edit product 1

If it worked the code above, I will use the type_id to filter the list

Fabrizio

On 9 Feb, 21:21, Stéphane  wrote:
> Hi,
>
> Sorry for the */*, I just put the / in bold using gmail and something bad
> happen :-)
>
> It looks like the first / doesnt matter, but you should put it I believe.
>
> The error message is saying that in the given url, which does match the
> route "/product/:type_id/action...", the :type_id parameter isn't defined.
>
> www.yourserver.com/app_dev.php/product/1/edit
>
> Is this the kind of url you are expecting ? Does it work with this ?
> Btw, why don't you use admin-gen feature ?
>
> Cheers,
>
> Before Printing, Think about Your Environmental Responsibility!
> Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!
>
> On Tue, Feb 9, 2010 at 9:16 PM, Fabrizio wrote:
>
> > Hi Stephane,
> > with your code
>
> > prefix_path:          */*product/:type_id
>
> > occurs the following error message
>
> > Unable to parse file "/apps/backend/config/routing.yml": Reference "*/
> > *product/:type_id" does not exist (prefix_path: */*product/:type_id).
>
> > With my code
>
> > prefix_path:          product/:type_id
>
> > the error is
>
> > The "/product/:type_id/:action/action.:sf_format" route has some
> > missing mandatory parameters (:type_id).
>
> > What is wrong?
>
> > On 9 Feb, 11:47, Stéphane  wrote:
> > > Hi,
>
> > > try using "prefix_path:          */*product/:type_id"
>
> > > Cheers,
>
> > > Before Printing, Think about Your Environmental Responsibility!
> > > Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!
>
> > > On Tue, Feb 9, 2010 at 11:45 AM, Fabrizio  > >wrote:
>
> > > > I have a route generated with admin generator
>
> > > > # apps/backend/config/routing.yml
> > > > product:
> > > >  class: sfDoctrineRouteCollection
> > > >  options:
> > > >    model:                Product
> > > >    module:               product
> > > >    prefix_path:          product
> > > >    column:               id
> > > >    with_wildcard_routes: true
>
> > > > This work correctly:
>
> > > > 
>
> > > > I want to prefix to this standard routing, a numeric value which can
> > > > serve to show not the complete list, but a list filtered according to
> > > > that value passed
>
> > > > # apps/backend/config/routing.yml
> > > > product:
> > > >  class: sfDoctrineRouteCollection
> > > >  options:
> > > >    model:                Product
> > > >    module:               product
> > > >    prefix_path:          product/:type_id
> > > >    column:               id
> > > >    with_wildcard_routes: true
>
> > > >  > > > >get('type_id'));
>
> > > > Despite it seems to me conceptually correct, this procedure does not
> > > > work.
>
> > > > When I click on the link an error message indicates that is missing
> > > > the variable type_id, despite being passed correctly
>
> > > > What is wrong?
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "symfony users" group.
> > > > To post to this group, send email to symfony-us...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > > > symfony-users+unsubscr...@googlegroups.com
> > 
>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/symfony-users?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "symfony users" group.
> > To post to this group, send email to symfony-us...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] Re: How to change the route created by the admin generator

2010-02-09 Thread Stéphane
Hi,

Sorry for the */*, I just put the / in bold using gmail and something bad
happen :-)

It looks like the first / doesnt matter, but you should put it I believe.

The error message is saying that in the given url, which does match the
route "/product/:type_id/action...", the :type_id parameter isn't defined.

www.yourserver.com/app_dev.php/product/1/edit

Is this the kind of url you are expecting ? Does it work with this ?
Btw, why don't you use admin-gen feature ?

Cheers,


Before Printing, Think about Your Environmental Responsibility!
Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!


On Tue, Feb 9, 2010 at 9:16 PM, Fabrizio wrote:

> Hi Stephane,
> with your code
>
> prefix_path:  */*product/:type_id
>
> occurs the following error message
>
> Unable to parse file "/apps/backend/config/routing.yml": Reference "*/
> *product/:type_id" does not exist (prefix_path: */*product/:type_id).
>
> With my code
>
> prefix_path:  product/:type_id
>
> the error is
>
> The "/product/:type_id/:action/action.:sf_format" route has some
> missing mandatory parameters (:type_id).
>
> What is wrong?
>
> On 9 Feb, 11:47, Stéphane  wrote:
> > Hi,
> >
> > try using "prefix_path:  */*product/:type_id"
> >
> > Cheers,
> >
> > Before Printing, Think about Your Environmental Responsibility!
> > Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!
> >
> > On Tue, Feb 9, 2010 at 11:45 AM, Fabrizio  >wrote:
> >
> > > I have a route generated with admin generator
> >
> > > # apps/backend/config/routing.yml
> > > product:
> > >  class: sfDoctrineRouteCollection
> > >  options:
> > >model:Product
> > >module:   product
> > >prefix_path:  product
> > >column:   id
> > >with_wildcard_routes: true
> >
> > > This work correctly:
> >
> > > 
> >
> > > I want to prefix to this standard routing, a numeric value which can
> > > serve to show not the complete list, but a list filtered according to
> > > that value passed
> >
> > > # apps/backend/config/routing.yml
> > > product:
> > >  class: sfDoctrineRouteCollection
> > >  options:
> > >model:Product
> > >module:   product
> > >prefix_path:  product/:type_id
> > >column:   id
> > >with_wildcard_routes: true
> >
> > >  > > >get('type_id'));
> >
> > > Despite it seems to me conceptually correct, this procedure does not
> > > work.
> >
> > > When I click on the link an error message indicates that is missing
> > > the variable type_id, despite being passed correctly
> >
> > > What is wrong?
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "symfony users" group.
> > > To post to this group, send email to symfony-us...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > symfony-users+unsubscr...@googlegroups.com
> 
> >
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/symfony-users?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: How to change the route created by the admin generator

2010-02-09 Thread Fabrizio
Hi Stephane,
with your code

prefix_path:  */*product/:type_id

occurs the following error message

Unable to parse file "/apps/backend/config/routing.yml": Reference "*/
*product/:type_id" does not exist (prefix_path: */*product/:type_id).

With my code

prefix_path:  product/:type_id

the error is

The "/product/:type_id/:action/action.:sf_format" route has some
missing mandatory parameters (:type_id).

What is wrong?

On 9 Feb, 11:47, Stéphane  wrote:
> Hi,
>
> try using "prefix_path:          */*product/:type_id"
>
> Cheers,
>
> Before Printing, Think about Your Environmental Responsibility!
> Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!
>
> On Tue, Feb 9, 2010 at 11:45 AM, Fabrizio wrote:
>
> > I have a route generated with admin generator
>
> > # apps/backend/config/routing.yml
> > product:
> >  class: sfDoctrineRouteCollection
> >  options:
> >    model:                Product
> >    module:               product
> >    prefix_path:          product
> >    column:               id
> >    with_wildcard_routes: true
>
> > This work correctly:
>
> > 
>
> > I want to prefix to this standard routing, a numeric value which can
> > serve to show not the complete list, but a list filtered according to
> > that value passed
>
> > # apps/backend/config/routing.yml
> > product:
> >  class: sfDoctrineRouteCollection
> >  options:
> >    model:                Product
> >    module:               product
> >    prefix_path:          product/:type_id
> >    column:               id
> >    with_wildcard_routes: true
>
> >  > >get('type_id'));
>
> > Despite it seems to me conceptually correct, this procedure does not
> > work.
>
> > When I click on the link an error message indicates that is missing
> > the variable type_id, despite being passed correctly
>
> > What is wrong?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "symfony users" group.
> > To post to this group, send email to symfony-us...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Ajax Forms

2010-02-09 Thread Samuel Morhaim
Can somebody show me or point me in the right direction for doing:

1. Same-screen form edits. (For example adding an entry to a table with a
form on the same screen without re-navigating)
2. Deleting items from a table without re-navigating


I know there are examples for sf 1.2 but it was removed on 1.4 and with the
plugin there are no examples.

Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] mergeForm, embeddForm, embedRelation

2010-02-09 Thread axel at
Hello list,

are there any examples, docs for mergeForm, embeddForm, embedRelation
and symfony 1.4?

I try to embedd an 1:1 related object into a form using mergeForm. The
attributes of the merged form are displayed correctly but save doesn't
work.

"Unknown record property / related component x on y" (x is an
attribute of the embedded object and y is the "base" object that
embedds the form.

I found
http://www.blogs.uni-osnabrueck.de/rotapken/2009/03/13/symfony-merge-embedded-form/
what seems to solve my problem but it doesn't work with symfony 1.4.

thx axel

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: Web shop based on symfony

2010-02-09 Thread Florian
Hi, please have a look here : 
http://groups.google.com/group/sfshop/browse_frm/thread/2c260d452f02c549

On 7 fév, 19:18, apm  wrote:
> Alexandru-Emil Lupu :> Try sfshop...
>
> > sent via htc magic
>
> Its for 1.2.
> After a day playing with sfShop, i cant switch it to 1.4. And found some
>     problems. But tnx, its better than nothing.
>
> Now i have 2 new Q:
> 1. Exists something else like webshop in symfony?
> 2. Is it a good pattern do all works in plugins. sfshop have not any
> modules in apps, only plugins. Thats good?

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Looking to hire experienced Symfony developer

2010-02-09 Thread owen burek
Hi all

Not sure where to post this, or where to look specifically for Symfony
developers, so I though this might get the best response. I have a
large CMS project using Symfony, which has been in development the
last 8 months. Unfortuantly my previous symfony coder has had to
leave, and there are a few features and bugs which need addressing. I
am looking to hire an experienced Symfony developer, on a freelance
but potentially long term basis. Preferably located in the UK or W.
Europe.

If interested, please get in touch. If this would be better placed
elsewhere, please let me know.

Thank you

Owen

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Misterious behaviour with admin-generator

2010-02-09 Thread ReynierPM

Hi:
One module of my application is giving me this error:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, 
expecting ')' in 
D:\WebServer\varwww\dev\afilreg\cache\dashboard\dev\modules\autoT_provincia\lib\BaseT_provinciaGeneratorConfiguration.class.php 
on line 101


Hi check the generated file 
"BaseT_provinciaGeneratorConfiguration.class.php" and just at the 
beggining of the line 101 I can see a misterious "F" :( I check the file 
schema.yml (see below) and I can't see any problems:


generator:
  class: sfDoctrineGenerator
  param:
model_class:   TPais
theme: admin
non_verbose_templates: true
with_show: false
singular:  ~
plural:~
route_prefix:  t_pais
with_doctrine_route:   true
actions_base_class:sfActions
config:
  actions:
_new: { label: Adicionar }
  fields:
codigo: { label: Código }
nombre: { label: Nombre }
  list:
title: Listar registros
  filter:  ~
  form:~
  edit:
title: Editar registro "%%nombre%%"
  new:
title: Adicionar registro

¿Any ideas?
--
Cheers
ReynierPM

--
You received this message because you are subscribed to the Google Groups "symfony 
users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Edit form with a plain text input + save action : incorrect routing under Apache

2010-02-09 Thread NOOVEO - Christophe Brun
I'm working on the backend side of a web application. The backend has
been generated via doctrine:generate-admin. I have a simple objet with a
plain url attribute declared as : 
url: { type: string(128) }
in schema.yml. 

On the edit page, if the user type any text not begining by 'http:/' and
clicks the SAVE button, the data is saved and the user is redirected to
: 
http://mysite/backend.php/mymodule/1/edit
That's OK. 

But if he types and saves a text begining by 'http:/', no data is saved
and he is redirected to : 
http://mysite/backend.php/mymodule/1
This incorrect route launches a 'Method Not Implemented, POST to
/backend.php/mymodule/1 not supported.' error. 

This behaviour shows under Linux (Debian) + Apache. On my local PC
(windows XP + Apache), I don't have such errors. 
I don't have a single idea about a way to fix that... 


-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: sfSimpleForumPlugin: for Symfony 1.3 & 1.4 (and Doctrine)

2010-02-09 Thread Paul.Degnan
I discovered someone is already working on this!

Look at http://www.symfony-project.org/plugins/sfDoctrineSimpleForumPlugin
-- it doesn't come up when you search plugins. As I said, I'm new to
Symfony, but I guess pre-release plugins aren't shown in search
results? The author's announcement of the project is at
http://refineweb.co.uk/2009/09/15/a-new-symfony-plugin-sfdoctrinesimpleforumplugin/.
I plan to lend any efforts of my own towards this project, it's
already got a good start.

On Feb 4, 11:15 am, "Paul.Degnan"  wrote:
> I've been wondering the same thing you have, and I haven't found any
> evidence of an effort to convert this to Doctrine.
>
> I've been planning to do this for a project I'm working on, and
> naturally I was planning to feed it back into the community once I'd
> done so. I'm about ready to start work on it. This development occurs
> as a "free" time (6-8 hours a week) project for me, so I may be a
> little slow in completing the job.
>
> I'm relatively new to Symfony and how to go about checking code into
> the public repository, so I'd be thrilled if you want to take on that
> effort. I was intending to do the development first, then worry about
> that aspect later, but it couldn't hurt to get that started sooner.
>
> One more thing. I was planning on adding two small features around
> email notification: an email sent to an administrator upon a new post,
> and a user option to be notified upon new posts on a thread. (These
> were part of the PHPBB system I'm migrating away from, and I'd miss
> them if I lost them.) That gets a little tricky since it introduces a
> dependency upon some sort of mailer. I was planning to use Zend, since
> I'm already set up with that as part of my use of
> sfDoctrineApplyPlugin.
>
> Post to this thread or get in touch directly if you want to discuss
> this further!
>
> On Jan 26, 5:06 pm, pbh  wrote:
>
>
>
> > I was looking to use the sfSimpleForumPlugin, but this project has
> > been abandoned by the author and there is no version for Doctrine.
>
> > My first question is:
>
> > 1) Has anyone done this?  (converted the sfSimpleForumPlugin to
> > Doctrine)
>
> > 2) If there is not a copy of this plugin (sfSimpleForumPlugin) for
> > Doctrine out there, then I would like to convert it to Doctrine with
> > the help of all the volunteers that would like to use/have this plugin
> > to use on the latest symfony version with Doctrine.
>
> > Let me know so we can start a public repository and start working on
> > this for the benefit of the Symfony community.
>
> > Thank you all

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] Contextual partial cache removal

2010-02-09 Thread Simon Hostelet

Hello,

I've encountered, I think, the same kind of problem.

Here is how I managed to remove the contextual partial cache :
Frontend side, I got MyModule, with action 'show' in which I display a 
_partial. This is the one that is contextual, depending on show action 
parameters.

frontend/modules/MyModule/config/cache.yml :
_partial:
   contextual:   true
   enabled:  true

frontend/modules/MyModule/templates/showSuccess.php :
...
 
$some_data, 'sf_cache_key' => $myObject->getSlugName()))?>

...

I guess it will work with something else than getSlugName on object.

Ok, now Backend side, each time I do a modification on any myObject, in 
the actions, i call a protected function clearCache :

backend/modules/MyModule/actions/actions.class.php :
protected function clearCache($options = array())
{
$cacheManager = $this->getContext()->getViewCacheManager();

$cacheManager->remove('MyModule/edit?id=' . $options['object_id']; // 
for example...


// now what's interesting :
sfContext::switchTo('frontend');
$cacheManager = sfContext::getInstance()->getViewCacheManager();
$cacheManager->remove('@sf_cache_partial?module=MyModule&action=_partial&sf_cache_key=' 
. $options['object_slug_name'], '', '', 'MyModule/show/slug_name/' . 
$options['object_slug_name']);

sfContext::switchTo('backend');
}


And this way I update my partial on another app, and only the one I'm 
interested in.


Maybe the way I do it can be perfected... But it seems to work ok on my 
side.


Hope it can help.

Regards,
Simon

kirsis a écrit :

When removing a partial from the cache, using an internal cache id
(like mentioned on
http://www.symfony-project.org/book/1_2/12-Caching#chapter_12_sub_clearing_selective_parts_of_the_cache),
the operation fails if the partial is contextual.

I checked out the symfony cache dir, it seems symfony caches
contextual partials as actions (outside the partial cache directory
and in module/action folder). However, clearing the action cache
doesn't seem to work either.

Is this a bug? And in either way, is there any way to clear the
symfony cache for a contextual partial using the internal ID (i.e.
without manually deleting the files)?

Thanks,
- J

  


--
You received this message because you are subscribed to the Google Groups "symfony 
users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: Admin generator - order by i18n field

2010-02-09 Thread Dimitar
I am having the same issue here... I will be glad if anyone can write
a good tutorial about i18n embedded forms. Handling the i18n fields in
generator.yml.

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: I18n on admin generator filters

2010-02-09 Thread Dimitar
How did you add the i18n fields to the filter?

When I add for example:

filters: [ title ]

it shows me an error that there is no such field. But I have it in my
i18n table. How did you make the i18n filter?

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



Re[2]: [symfony-users] Admin generator without CSS

2010-02-09 Thread Земсков Юрий
http://www.symfony-project.org/getting-started/1_4/en/05-Web-Server-Configuration#chapter_05_sub_web_server_configuration

Read about 'alias /sf'

Âû ïèñàëè 9 ??? 2010 ?., 18:54:28:

> On 2/9/2010 10:49 AM, NOOVEO - Christophe Brun wrote:
>> You should run the
>> "plugin:publish-assets"
>> task from your CLI to fix that
>>

> I'm having the same problem. I've run the task plugin:publish-assets and
> sfDoctrineGuard folder was copied to /web directory but not sf_admin 
> files. Any way to do this manually?

> -- 
> Cheers
> ReynierPM



-- 
Ñ óâàæåíèåì,
 ???   mailto:y...@zemskov.name

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Model with no DB requirements.

2010-02-09 Thread Pat Fong
Occasionally I come accross an object that I need in my application
which doesnt require being saved to the DB.
 
I usually define this object through the schema as I would any other
object and that works fine. I guess the problem I have is that it
creates unessecary tables in the DB, not a big deal but not as clean as
I would like.
 
Is there any way to avoid this or a better approach that someone could
suggest ?
 
Cheers,
Pat

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] Admin generator without CSS

2010-02-09 Thread ReynierPM

On 2/9/2010 10:49 AM, NOOVEO - Christophe Brun wrote:

You should run the
"plugin:publish-assets"
task from your CLI to fix that



I'm having the same problem. I've run the task plugin:publish-assets and 
sfDoctrineGuard folder was copied to /web directory but not sf_admin 
files. Any way to do this manually?


--
Cheers
ReynierPM

--
You received this message because you are subscribed to the Google Groups "symfony 
users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



RE: [symfony-users] Admin generator without CSS

2010-02-09 Thread NOOVEO - Christophe Brun
You should run the 
"plugin:publish-assets"
task from your CLI to fix that



De : symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] De 
la part de Samuel Morhaim
Envoyé : mardi 9 février 2010 16:21
À : symfony-users@googlegroups.com
Objet : [symfony-users] Admin generator without CSS


Hi,

I am just testing a bit the admin generator on sf 1.4 and it shows completly 
without any CSS.. so I looked at the source code and it is pointing to CSS on 
the sfDoctrinePlugin , of course it can't find it...

Any ideas how to fix it?  I thought doctrine was included ?


-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Admin generator without CSS

2010-02-09 Thread Samuel Morhaim
Hi,

I am just testing a bit the admin generator on sf 1.4 and it shows completly
without any CSS.. so I looked at the source code and it is pointing to CSS
on the sfDoctrinePlugin , of course it can't find it...

Any ideas how to fix it?  I thought doctrine was included ?

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] weird ness

2010-02-09 Thread erikms
Hi all,
I am developing an application in symphony 1.2
the schema has a table named Orders, that has a 1->many relation to
the table Products.
This always worked.
I can see the definition in the lib/model/base/Orders.class.php
But all of a sudden my pages fail with the error
"Unknown method Orders->getProduct()"

First this happened in the dev environment., I did a lot of things,
then suddenly it worked again... in dev
Now I have it on the production server, and nothing seems to work


permissions? did that
check code? like 10 times, but maybe not in the right place (HELP?)
trashed all on the server, complete reupload? no difference
any ideas? anyone? please? completely stumped here
-Erik

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] Re: Help with Schema

2010-02-09 Thread Samuel Morhaim
I think the many to many on CampaignAddressBook is not working properly.  I
don't get any errors, but the generated CRUD shows me an input text for
Campaign, instead of a dropdown which i was expecting, based on the Campaign
Records..



On Tue, Feb 9, 2010 at 3:23 AM, Raphael Schumacher <
m...@raphaelschumacher.ch> wrote:

> Can you maybe tell us at which step are you stuck? E.g. what errors
> you get?
> So we can focus on the problem...
>
> --
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: Edit/Show - protect against non permission access

2010-02-09 Thread Tony Piper


On Feb 9, 12:07 pm, wueb  wrote:
> Thank you very much Gábor and Tony.
>
> Only 2 things Tony.
>
> First - that findOwned method is called when? When i make $this->leads
> = $this->getRoute()->getObject(); ?

I'm fairly sure it's as the route is processed, not when the getObject
is fetched.

>
> Second - i always read make 
> sfContext::getInstance()->getUser()->getGuardUser()->getId()); is not very 
> recommended because the context
>
> can change(?). You know other way to do it?

Using sfContext::getInstance is fairly bad because you can't unit test
a method or run it from a task, but if you want to be sure that all
object fetches via the Routing system are protected then there
probably aren't any other ways of doing it other than doing an
explicit check in all your actions. Horses for courses, I guess.

cheers,

Tony.

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: sfShop demo?

2010-02-09 Thread Florian
Hi,

For a quick demo with fixtures:

http://code.google.com/p/sfshop/source/browse/trunk/INSTALL


There is some activity on this project, so maybe will you soon see a
demo, but to my mind, no live site running with sfShop yet.

I saw a post a few days ago saying it didn't work with sf 1.4 ...

http://groups.google.fr/group/symfony-users/browse_thread/thread/01b400219f764079/01e5c9615aff69a6?show_docid=01e5c9615aff69a6&fwc=1

Hope it helps.


On 9 fév, 13:41, Sid Bachtiar  wrote:
> Has anyone used sfShop in their project? Any live site?
>
> --
> Blue Horn Ltd - System Developmenthttp://bluehorn.co.nz

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: How to get raw data in a partial???

2010-02-09 Thread Florian
To get the REAL $sf_user in templates, just do a $sf_data-
>getRaw('sf_user');



On 8 fév, 23:55, Richtermeister  wrote:
> Just to your specific point, $sf_user is accessible from every
> template or partial anyways.. no need to pass it along.
>
> Daniel
>
> On Feb 8, 1:09 pm, Darren884  wrote:
>
> > I solved it guys but the above would not work so I had to do a
> > different way. I found out about hasCredential and used that. The
> > above methods don't work too nicely on object methods.
>
> > On Feb 8, 12:11 pm, Norbert  wrote:
>
> > > Am 08.02.10 20:41, schrieb Darren884:> In my template I am trying to 
> > > do > > > navigator', array('User' =>  $sf_user)); ?>
>
> > > > But when I run $User->getAttributes() in my partial it is cleaning the
> > > > code which makes it so it does not work. How can I get around this??
>
> > > > Thanks,
> > > > Darren
>
> > > try this in your template:
>
> > > look at :http://www.symfony-project.org/book/1_2/07-Inside-the-View-Layer
>
> > > echo  $sf_data->getRaw('test');
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] sfShop demo?

2010-02-09 Thread Sid Bachtiar
Has anyone used sfShop in their project? Any live site?

-- 
Blue Horn Ltd - System Development
http://bluehorn.co.nz

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] sfValidatorAnd ignores 'required' settings of its components

2010-02-09 Thread Sid Bachtiar
Put the required option on the sfValidatorAnd, e.g.:

'title' => new sfValidatorAnd(
array(
  new sfValidatorCallback(array('callback' => array($this, 'stripTags'))),
  new sfValidatorString(array('max_length' => 50))
)
, array('required' => false)
)

On Wed, Feb 10, 2010 at 1:33 AM, Hong Kil Dong  wrote:
> I face with such a problem - sfValidatorAnd completely ignores
> 'required' settings of its components.
>
> As an examle, for such a field:
>
> 'title' => new sfWidgetFormInput()
> ...
> 'title' => new sfValidatorAnd(
> array(
> new sfValidatorCallback(array('required' => false, 'callback' =>
> array($this, 'stripTags'))),
> new sfValidatorString(array('required' => false, 'max_length' => 50))
> ))
>
> it generates "Required." validation error. How can I get rid of this
> error ?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> symfony-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/symfony-users?hl=en.
>
>



-- 
Blue Horn Ltd - System Development
http://bluehorn.co.nz

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: sfValidatorAnd ignores 'required' settings of its components

2010-02-09 Thread Hong Kil Dong
sf 1.2.8

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] sfValidatorAnd ignores 'required' settings of its components

2010-02-09 Thread Hong Kil Dong
I face with such a problem - sfValidatorAnd completely ignores
'required' settings of its components.

As an examle, for such a field:

'title' => new sfWidgetFormInput()
...
'title' => new sfValidatorAnd(
array(
new sfValidatorCallback(array('required' => false, 'callback' =>
array($this, 'stripTags'))),
new sfValidatorString(array('required' => false, 'max_length' => 50))
))

it generates "Required." validation error. How can I get rid of this
error ?

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: Edit/Show - protect against non permission access

2010-02-09 Thread wueb
Yeah, i use the $this->getUser() (action) and the $sf_user (template)
already.

But now i need use it on the LeadsTable.class.php and none of that
works.

Cheers

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



Re: Re[2]: [symfony-users] AJAX Helpers

2010-02-09 Thread DEEPAK BHATIA
Thanks it is working.

It is simply using the old libraries of javascript for AJAX and Javascript
Helpers for Ajax.

2010/2/9 Земсков Юрий 

>  Is this the same old obtrusive Javascript version.
>
>
> Вы писали 9 февраля 2010 г., 10:44:06:
>
>
>>
>
> Is this the same old obtrusive Javascript version or has it been refactored
> as an unobtrusive version?
>
>
>
> 2010/2/9 Земсков Юрий 
>
>
> http://www.symfony-project.org/plugins/sfProtoculousPlugin
>
>
> ;)
>
>
> Вы писали 9 февраля 2010 г., 10:20:27:
>
>
>>
>
> Hi,
>
>
>
> It seems link_to_remote and form_remote_tag has been deprectaed in Symfony
> 1.4. How do we achieve this functionality in Symfony 1.4.
>
>
>
> The Jobeet tutorial for 1.4 discusses briefly about AJAX.
>
>
>
> Thanks in advance.
>
>
>
> Regards
>
>
>
> Deepak Bhatia
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
>
> To post to this group, send email to symfony-us...@googlegroups.com.
>
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> .
>
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
>
>
>
>
> --
>
> С уважением,
>
>  Земсков Юрий  
> mailto:y...@zemskov.name
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
>
> To post to this group, send email to symfony-us...@googlegroups.com.
>
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> .
>
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
>
>
>
>
> --
>
> Gareth McCumskey
>
> http://garethmccumskey.blogspot.com
>
> twitter: @garethmcc
>
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
>
> To post to this group, send email to symfony-us...@googlegroups.com.
>
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> .
>
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
>
>
>
>
> --
>
> С уважением,
>
>  Земсков Юрий  
> mailto:y...@zemskov.name
>
> --
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] Re: Edit/Show - protect against non permission access

2010-02-09 Thread Gábor Fási
No, it gets called while in the routing process - after the request
uri has been matched to a route, a database call is made to retrieve
the matching object.
Use $this->getUser() in your action, $sf_user in your template.

On Tue, Feb 9, 2010 at 13:07, wueb  wrote:
> Thank you very much Gábor and Tony.
>
> Only 2 things Tony.
>
> First - that findOwned method is called when? When i make $this->leads
> = $this->getRoute()->getObject(); ?
>
> Second - i always read make sfContext::getInstance()->getUser()-
>>getGuardUser()->getId()); is not very recommended because the context
> can change(?). You know other way to do it?
>
> Cheers.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> symfony-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/symfony-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: Edit/Show - protect against non permission access

2010-02-09 Thread wueb
Thank you very much Gábor and Tony.

Only 2 things Tony.

First - that findOwned method is called when? When i make $this->leads
= $this->getRoute()->getObject(); ?

Second - i always read make sfContext::getInstance()->getUser()-
>getGuardUser()->getId()); is not very recommended because the context
can change(?). You know other way to do it?

Cheers.

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: Edit/Show - protect against non permission access

2010-02-09 Thread wueb
Thank you very much Gábor and Tony.

Only 1 thing Tony, that findOwned method is called when? When i make
$this->leads = $this->getRoute()->getObject(); ?

Cheers.

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: Proper way to access object..

2010-02-09 Thread wissl
echo $this->getUser()->getGuardUser()->getOrganization()->first_name;

getUser() returns the current session object, getGuardUser() the
doctrine object of sfGuardUser

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: Edit/Show - protect against non permission access

2010-02-09 Thread Tony Piper
Or, you could create new 'finder' methods in your model table class
that find only records owned by the current user.

This example assumes you're using Doctrine, but there should be an
equivalent in Propel.

You specify these methods in your routine.yml;

leads:
  class:   sfDoctrineRouteCollection
  options:
model: Lead
model_methods:
  list: findAllOwned # only shows those owned by this user
  object: findOwned # only allows access to objects owned by this
user

in this example you would modify your lib/model/doctrine/
LeadTable.class.php to include:

  function findAllOwned ($parameters)
  {
$q = $this->createQuery('p') ->where('p.user_id = ?',
sfContext::getInstance()->getUser()->getGuardUser()->getId());
return $q->execute();
  }

  function findOwned($parameters)
  {
$q = $this->createQuery('p')
  ->where('p.id = ?',$parameters['id'])
  ->andWhere('p.user_id = ?', sfContext::getInstance()->getUser()-
>getGuardUser()->getId());
return $q->execute();
  }

If the findOwned query returns no records then the routing system will
automatically forward to 404, so you don't need to explicitly test for
the correct owner in your action. This method takes a little more
setting up, but is, arguably, a more robust approach.

Hope this helps.

cheers,

Tony.

On Feb 9, 9:57 am, Gábor Fási  wrote:
> At the beginning of your action do a forward404Unless(current user is
> the owner).
>
>
>
> On Mon, Feb 8, 2010 at 17:29, wueb  wrote:
> > Hello buddies, need help!
>
> > On my Edit/Show actions i use the route to get the object to Edit/
> > Show.
>
> > Edit:
> > $this->form = new LeadsForm($this->getRoute()->getObject());
>
> > Show:
> > $this->leads = $this->getRoute()->getObject();
>
> > All normal here and works fine, but i need something more secure.
>
> > For example:
> > I'm the owner from the fields on the table with ID=1 and ID=2; Someone
> > that is no owner from that fields try to "hack" my values, for that he
> > goes to URL and type:http://localhost/frontend_dev.php/leads/1
>
> > He will be able to Edit/Show my values. How can i prevent this thing
> > happen?
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "symfony users" group.
> > To post to this group, send email to symfony-us...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > symfony-users+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/symfony-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] How to change the route created by the admin generator

2010-02-09 Thread Stéphane
Hi,

try using "prefix_path:  */*product/:type_id"

Cheers,



Before Printing, Think about Your Environmental Responsibility!
Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!


On Tue, Feb 9, 2010 at 11:45 AM, Fabrizio wrote:

> I have a route generated with admin generator
>
> # apps/backend/config/routing.yml
> product:
>  class: sfDoctrineRouteCollection
>  options:
>model:Product
>module:   product
>prefix_path:  product
>column:   id
>with_wildcard_routes: true
>
> This work correctly:
>
> 
>
> I want to prefix to this standard routing, a numeric value which can
> serve to show not the complete list, but a list filtered according to
> that value passed
>
> # apps/backend/config/routing.yml
> product:
>  class: sfDoctrineRouteCollection
>  options:
>model:Product
>module:   product
>prefix_path:  product/:type_id
>column:   id
>with_wildcard_routes: true
>
>  >get('type_id'));
>
> Despite it seems to me conceptually correct, this procedure does not
> work.
>
> When I click on the link an error message indicates that is missing
> the variable type_id, despite being passed correctly
>
> What is wrong?
>
> --
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] How to change the route created by the admin generator

2010-02-09 Thread Fabrizio
I have a route generated with admin generator

# apps/backend/config/routing.yml
product:
  class: sfDoctrineRouteCollection
  options:
model:Product
module:   product
prefix_path:  product
column:   id
with_wildcard_routes: true

This work correctly:



I want to prefix to this standard routing, a numeric value which can
serve to show not the complete list, but a list filtered according to
that value passed

# apps/backend/config/routing.yml
product:
  class: sfDoctrineRouteCollection
  options:
model:Product
module:   product
prefix_path:  product/:type_id
column:   id
with_wildcard_routes: true

get('type_id'));

Despite it seems to me conceptually correct, this procedure does not
work.

When I click on the link an error message indicates that is missing
the variable type_id, despite being passed correctly

What is wrong?

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] implementing PHP soapclient in action

2010-02-09 Thread dagger
Hi All,

I don't know if this group is the right place to discuss this - but
since i'm using symfony and i need help with php soap extension i am
posting for your views.

Goal: connecting with a SOAP based webservice and performing multiple
operations

First i searched for a symfony plugin to do the above, i came across 1
- ckWebServicePlugin - but when i studied its read me - i found that
its mainly focused on creating a Web service server (Soap server) and
not a client - there is a client also ckTestSoapClient - but that is
only for testing purposes - i guess.

So i continued my search and stumbled on PHP SOAP extension -
soapclient.

there is but very little information available on the net with regards
to how to use soapclient when the webservice i want to connect to does
not publish its WSDL file ...

so i only have an endpoint url, I have the wsdl file the webservice is
based on. but i don't know how to specify the path to wsdl file while
creating the soapclient.

the code example is given below

$client = new SoapClient(NULL,
array(
"location" => "http://endpoint.url.com";,
"uri"  => "urn:the_name_space",
"style"=> SOAP_RPC,
"use"  => SOAP_ENCODED
   ));

after initialization i try to access one of the operations provided by
the webservice

 print($client->__call(
/* SOAP Method Name */
"exampleOperation", // this is as it is mentioned in
the wsdl file
/* Parameters */
array(
new SoapParam(
/* Parameter Value */
"test application",
/* Parameter Name */
"applicationTitle"
), new SoapParam(
/* Parameter Value */
"test vendor",
/* Parameter Name */
"vendor"
)),
/* Options */
array(
/* SOAP Method Namespace */
"uri" => "urn:the_name_space",
/* SOAPAction HTTP Header for SOAP Method */
"soapaction" =>
"urn:the_name_space#exampleOperation"
)));

but i keep getting the error - Not Found

This is my first time working with SOAP so any help will be highly
appreciated.

thanks

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] Edit/Show - protect against non permission access

2010-02-09 Thread Gábor Fási
At the beginning of your action do a forward404Unless(current user is
the owner).

On Mon, Feb 8, 2010 at 17:29, wueb  wrote:
> Hello buddies, need help!
>
> On my Edit/Show actions i use the route to get the object to Edit/
> Show.
>
> Edit:
> $this->form = new LeadsForm($this->getRoute()->getObject());
>
> Show:
> $this->leads = $this->getRoute()->getObject();
>
>
> All normal here and works fine, but i need something more secure.
>
> For example:
> I'm the owner from the fields on the table with ID=1 and ID=2; Someone
> that is no owner from that fields try to "hack" my values, for that he
> goes to URL and type: http://localhost/frontend_dev.php/leads/1
>
> He will be able to Edit/Show my values. How can i prevent this thing
> happen?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> symfony-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/symfony-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: Edit/Show - protect against non permission access

2010-02-09 Thread wueb
No one? I'm the first having this problem? :(

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] one module - many models (tables)

2010-02-09 Thread Gareth McCumskey
In the action that processes the submission you just create two new
objects, one for ForumThreads and the other for ForumPosts and save
each individually. My example below is in Propel:

$forum_thread = new ForumThreads();
$forum_thread->setSubject($request->getParameter('subject'));
$forum_thread->save();

$forum_post = new ForumPost();
$forum_post->setMessage($request->getParameter('message'));
$forum_post->setForumsThreadsId($forum_thread->getId());
$forum_post->save();

Please remember to replace my $request->getParameter with the
applicable variable for your bound form however.

On Mon, Feb 8, 2010 at 1:25 PM, Martin Henits
 wrote:
> Hi,
>
> I'm new to symfony and am trying to learn it.
> I am trying to develop a new module (something like a forum). in a
> very simple form, this module works with 2 database tables:
> "forum_threads" and "forum_posts".
>
> First, I think that I should not develop 2 different modules, because
> forum sounds like one module in my mind. (am I right?)
>
> the "create new thread" form has 2 fields: "subject" and "message".
> when someone clicks on the save button, the "subject" field should be
> saved in the "forum_thread" table and the "message" field should be
> saved in the "forum_posts" table. Any clue for doing this?
>
> Any suggestion is highly appreciated.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> symfony-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/symfony-users?hl=en.
>
>



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] Where to put the model code?

2010-02-09 Thread Daniel Lohse
Don't use a partial — use a component. That's an action and a  
corresponding partial. In the action you can access the model.


Cheers, Daniel

Sent from my iPhone

On Feb 9, 2010, at 2:42 AM, Augusto Flavio  wrote:


Hi.



I create a partial file that will be added in all page request by
users. I put this partial file, i.e. partial.php in the global layout
template? layout.php. Ok. My doubt is where to put the model code of
the partial file.


some idea?



Augusto Morais

--
You received this message because you are subscribed to the Google  
Groups "symfony users" group.

To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com 
.
For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en 
.




--
You received this message because you are subscribed to the Google Groups "symfony 
users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: Help with Schema

2010-02-09 Thread Raphael Schumacher
Can you maybe tell us at which step are you stuck? E.g. what errors
you get?
So we can focus on the problem...

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



Re[2]: [symfony-users] AJAX Helpers

2010-02-09 Thread Земсков Юрий




Is this the same old obtrusive _javascript_ version.

Вы писали 9 февраля 2010 г., 10:44:06:




>


Is this the same old obtrusive _javascript_ version or has it been refactored as an unobtrusive version?


2010/2/9 Земсков Юрий 

http://www.symfony-project.org/plugins/sfProtoculousPlugin

;)

Вы писали 9 февраля 2010 г., 10:20:27:




>


Hi,
 
It seems link_to_remote and form_remote_tag has been deprectaed in Symfony 1.4. How do we achieve this functionality in Symfony 1.4.
 
The Jobeet tutorial for 1.4 discusses briefly about AJAX.
 
Thanks in advance.
 
Regards
 
Deepak Bhatia
-- 
You received this message because you are subscribed to the Google Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com.
To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.







-- 
С уважением,
 Земсков Юрий                          mailto:y...@zemskov.name
-- 
You received this message because you are subscribed to the Google Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com.
To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

-- 
You received this message because you are subscribed to the Google Groups "symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.







-- 
С уважением,
 Земсков Юрий                          mailto:y...@zemskov.name





-- 
You received this message because you are subscribed to the Google Groups "symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.