[symfony-users] Re: Moving a Site

2010-12-20 Thread Gabriel Petchesi
Make sure the access rights for the cache, web/uploads directories are set 
up correctly.
The .svn files can be removed if you no longer use them and don't have 
access to the repository (although they could be used
to retrieve the last good copy of the file if you had corruptions).
The last Symfony version in the 1.0 series is 1.0.22, use that. Also I think 
that the minimum PHP requirement is PHP 5.2.4 and up, it
won't work with PHP version older than that.

If all steps are done start the site using the frontend_dev.php controller 
and check for errors. Solve each error found and you should
be up and running in no time.

gabriel

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Jobeet Propel project

2010-12-20 Thread Gareth McCumskey
The tutorial actually tells you where to get the full project. Its available
via an SVN repository.

On Mon, Dec 20, 2010 at 9:20 AM, Sri  wrote:

> Hi All,
>
>   I am new to symfony 1.4, i am trying to do the Jobeet project in
> propel. If any one of you have a complete working project kindly share
> it. It will be a great reference for me to continue.
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> 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

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Restoring a Database

2010-12-20 Thread Gareth McCumskey
Database.yml does not describe tables but rather the connection parameters
to the database/s server. schema.yml is what describes the table structure
of the database specified in database.yml

On Fri, Dec 17, 2010 at 3:46 AM, arico  wrote:

> Original setup:
> symfony 1.0.17
> mysql 4.x
> php uknown
>
> I'm a newbie and a LAMP engineer.
>
> I have a site to bring back online which was taken down from another
> server, compressed and sent to me.  Some of the files were corrupted,
> mostly .svn and pdf files, but a few action classes as well.
>
> I have never seen this site live and have little familiarity with
> other than knowing it was a product catalog site with no ecommerce.
> The ORM was propel, about which I have a little familiarity.
>
> The mysql dump of the old database available to me has but one table.
> I notice that database.yml has many more tables in it.  Judging from
> that (or anything else) is there a way to tell if I have all the
> tables from the db?  Is database.yml automatically loaded with certain
> tables or is it the result of an ORM abstraction of the db?  I don't
> understand how its used.
>
> Any thoughts/help would be really appreciated!
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> 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

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Re: CHMOD at first start

2010-12-20 Thread FMaz
For now, I've used that solution in all file that try to CHMOD:

if (false !== @file_put_contents($tmpFile, $content) &&
@rename($tmpFile, $file)) {

$wantedPerms = 0644;
$actualPerms = fileperms($file);
if($actualPerms < $wantedPerms)
chmod($file, $wantedPerms);

return;
}

So the CHMOD only try to be changed if the filepermission is too
restrictive.
Down side: The CHMOD will not be restricted if the CHMOD is too
permissive.

But in a developpement environnement, that just fit my needs.
It would be nice to have a setting of something like that to avoid
people working with CIFS partitions to need to hard fix the problem.


On 15 déc, 12:43, FMaz  wrote:
> Hi,
>
> I'm running Symfony2 on a NAS server, mounted in CIFS. So the CHMOD
> are globaly defined by default as 777 and can't be changed.
>
> When I first ran the Symfony2 sandbox version, I've executed the
> check.php file that was telling me that all the requirement were ok
> (except the timezone, but I don't think that's the problem here).
>
> So I ran the app_dev.php script and received some chmod error. Here's
> the full XDebug trace:
> ==
> Fatal error: Uncaught exception 'ErrorException' with message
> 'Warning: chmod(): Operation not permitted in /mnt/nas/www/test/
> symfony2/src/vendor/twig/lib/Twig/Environment.php line 463' in /mnt/
> nas/www/test/symfony2/src/vendor/symfony/src/Symfony/Component/
> HttpKernel/Debug/ExceptionListener.php on line 84
>
> ErrorException: Warning: chmod(): Operation not permitted in /mnt/nas/
> www/test/symfony2/src/vendor/twig/lib/Twig/Environment.php line 463
> in /mnt/nas/www/test/symfony2/src/vendor/symfony/src/Symfony/Component/
> HttpKernel/Debug/ErrorHandler.php on line 58
>
> Call Stack:
>     0.0074     331128   1. {main}() /mnt/nas/www/test/symfony2/web/
> app_dev.php:0
>     0.0994     931144   2. Symfony\Component\HttpKernel\Kernel->handle() 
> /mnt/nas/www/test/symfony2/web/app_dev.php:14
>
>     0.9072    3256536   3. Symfony\Component\HttpKernel\HttpKernel->handle() 
> /mnt/nas/www/test/symfony2/src/vendor/symfony/src/Symfony/
>
> Component/HttpKernel/Kernel.php:181
>     0.9073    3256648   4. 
> Symfony\Component\HttpKernel\BaseHttpKernel->handle() 
> /mnt/nas/www/test/symfony2/app/cache/dev/classes-c0a12.php:
>
> 1041
>     1.3210    4231352   5. Symfony\Bundle\FrameworkBundle\Debug
> \EventDispatcher->notifyUntil() /mnt/nas/www/test/symfony2/app/cache/
> dev/classes-c0a12.php:998
>     1.3282    4235584   6. call_user_func() /mnt/nas/www/test/symfony2/
> src/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Debug/
> EventDispatcher.php:71
>     1.3282    4235612   7. Symfony\Component\HttpKernel\Debug
> \ExceptionListener->handle() /mnt/nas/www/test/symfony2/src/vendor/
> symfony/src/Symfony/Bundle/FrameworkBundle/Debug/EventDispatcher.php:0
>     1.3469    4352832   8. Symfony\Component\HttpKernel\HttpKernel->handle() 
> /mnt/nas/www/test/symfony2/src/vendor/symfony/src/Symfony/
>
> Component/HttpKernel/Debug/ExceptionListener.php:77
>     1.3470    4352876   9. 
> Symfony\Component\HttpKernel\BaseHttpKernel->handle() 
> /mnt/nas/www/test/symfony2/app/cache/dev/classes-c0a12.php:
>
> 1041
>
> RuntimeException: Exception thrown when handling an exception. in /mnt/
> nas/www/test/symfony2/src/vendor/symfony/src/Symfony/Component/
> HttpKernel/Debug/ExceptionListener.php on line 84
>
> Call Stack:
>     0.0074     331128   1. {main}() /mnt/nas/www/test/symfony2/web/
> app_dev.php:0
>     0.0994     931144   2. Symfony\Component\HttpKernel\Kernel->handle() 
> /mnt/nas/www/test/symfony2/web/app_dev.php:14
>
>     0.9072    3256536   3. Symfony\Component\HttpKernel\HttpKernel->handle() 
> /mnt/nas/www/test/symfony2/src/vendor/symfony/src/Symfony/
>
> Component/HttpKernel/Kernel.php:181
>     0.9073    3256648   4. 
> Symfony\Component\HttpKernel\BaseHttpKernel->handle() 
> /mnt/nas/www/test/symfony2/app/cache/dev/classes-c0a12.php:
>
> 1041
>     1.3210    4231352   5. Symfony\Bundle\FrameworkBundle\Debug
> \EventDispatcher->notifyUntil() /mnt/nas/www/test/symfony2/app/cache/
> dev/classes-c0a12.php:998
>     1.3282    4235584   6. call_user_func() /mnt/nas/www/test/symfony2/
> src/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Debug/
> EventDispatcher.php:71
>     1.3282    4235612   7. Symfony\Component\HttpKernel\Debug
> \ExceptionListener->handle() /mnt/nas/www/test/symfony2/src/vendor/
> symfony/src/Symfony/Bundle/FrameworkBundle/Debug/EventDispatcher.php:0
> 
>
> I'm not yet sure to understand all the context, but could it be
> possible to add a check in the check.php script for the chmod ?
>
> Otherwise, I've hard time to figure out the real problem as all my
> files are 777.
> - Either the chmod try to restrict the access ( Can we desativate this
> in sandbox mode ? )
> - Either the chmod try to ensure that an already existing access is
> set. ( Could we check the permission with fileperms() b

Re: [symfony-users] Jobeet Propel project

2010-12-20 Thread Daniel Molina Wegener
On Monday 20 December 2010,
Sri  wrote:

> Hi All,

  Hello Sri...

> 
>I am new to symfony 1.4, i am trying to do the Jobeet project in
> propel. If any one of you have a complete working project kindly share
> it. It will be a great reference for me to continue.

  On Symfony 1.4 Propel was replaced by Doctrine. Try reading manuals
about Doctrine in Symfony:

  http://www.doctrine-project.org/

Best regards,
-- 
Daniel Molina Wegener 
System Programmer & Web Developer
Phone: +56 (2) 979-0277 | Blog: http://coder.cl/


signature.asc
Description: This is a digitally signed message part.


[symfony-users] how to setDefault on i18n form field?

2010-12-20 Thread Michał Piotrowski
Hi,

I've got a field
echo $form[$lang]['title']->render()

and I want to set default value. Usually I use setDefault, but this is
i18n form so
$form->setDefault('title', "random title")
doesn't work as for other fields.

I've found a solution for symfony 1.1
$form->setDefault($lang, array('title', "random title"))
but it also doesn't work.

I checked an API
http://trac.symfony-project.org/browser/branches/1.4/lib/form/sfForm.class.php#L782
and can't find anything related to i18n there.

Any hints?

It might be an obvious thing - but I never used i18n forms before and
I can not find anything related to this topic in docs.

-- 
Best regards,
Michal

Sent from my fscking awesome Black Hole Generator

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Re: Custom 404 - Problem with CSS

2010-12-20 Thread Massimiliano Arione
On 19 Dic, 21:45, Warringer  wrote:
> I have build myself a custom 404 error page according to the very
> useful help on symfony-check.org.
>
> Now I have the problem that my custom header adds the default CSS
> spreadsheet to the rest of the CSS I have added.

That's a stylesheet, not a spreadsheet ;-)
Anyway, what is your question?

cheers
Massimiliano

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] About the right way to create an app

2010-12-20 Thread JuvaloCO
Hello everybody,

I'm developing an app and I have it packaged as a plugin, but now I
need to add some functionality on the backend about I18N. The
question: Is posible to add I18N forms on the backend if the app is a
plugin? Can I follow the Jobeet tutorial for that? Or Which is the
better way to reach this objective?

Thanks.

PD: Apologizes for my English, I'm learning... ;)

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] best way to hide form fields in front_end based on credentials?

2010-12-20 Thread Stan McFarland
Hi,

I guess the subject says it all.  :)  Looking for suggestions as to
how best to hide specific form fields (not in the backend generator,
but the frontend)  based on user credentials.   Thanks!

-stan



-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Re: ysfDimensionsPlugin and cache:clear

2010-12-20 Thread Phil Moorhouse
I've added a ticket about this along with a possible patch...

http://trac.symfony-project.org/ticket/9370

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Re: Custom 404 - Problem with CSS

2010-12-20 Thread oscar balladares
That is the cascade configuration rule.

You can avoid loading some JS or CSS like this.

Lets say you have a app/frontend/config/view.yml file like this:

default:
  stylesheets:[admin, default, global]


So, if you want not to laod a stylesheet for a module you should create a
config dir and a view.yml inside it, in the module dir.

for example, for my frontend I have a printable page (so the master layout
is not needed)

app/frontend/modules/myveryownmodule/config/view.yml

tokenSuccess:
  has_layout: false
  javascripts:[imprimir, jquery]
  stylesheets:[-admin, -default, -global, print]

Where tokenSuccess is an action for the module; if you can see, you unload
the globals css with a -.
If you want not to load everything, you should use a -*

For example:
tokenSuccess:
  has_layout: false
  javascripts:[imprimir, jquery]
  stylesheets:[-*, print]

Hope this help. Remember to read the official books. You will find the most
common answers for this kind of issues.

2010/12/20 Massimiliano Arione 

> On 19 Dic, 21:45, Warringer  wrote:
> > I have build myself a custom 404 error page according to the very
> > useful help on symfony-check.org.
> >
> > Now I have the problem that my custom header adds the default CSS
> > spreadsheet to the rest of the CSS I have added.
>
> That's a stylesheet, not a spreadsheet ;-)
> Anyway, what is your question?
>
> cheers
> Massimiliano
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> 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
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] [Symfony2] Security Component: Roles problem

2010-12-20 Thread Gustavo Adrian
Hi all,

I've implemented the Security component and it works like a charm. I'm just
having a problem with roles. In my layout I want to show a toolbar based on
the roles of the user. Suppose that I have this implementation of the
"getRoles" method on my User entity:

public function getRoles()
{
$roles = array();
 if ( $this->getIsAdmin() )
{
$roles[] = 'ROLE_IS_ADMIN';
}
 if ( $this->getWebAccess() )
{
$roles[] = 'ROLE_WEB_ACCESS';
}
 return $roles;
}


I've used this to try the "has_role" function with Twig on my layout, but it
doesn't return any role, even if the user has both properties setted. I use
the "has_role" function like this::

{% if has_role( 'ROLE_IS_ADMIN' ) %} 'admin' {% elseif has_role(
'ROLE_WEB_ACCESS' ) %} 'web_access' {% else %} '' {% endif %}

In this case, it always end with '' .


the "getRoles" method is supposed to return an array of strings with the
roles associated with the User? if that's so, what could be wrong with this
implementation?



BTW, I've updated my vendors today.


Thanks.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Re: [Symfony2] Security Component: Roles problem

2010-12-20 Thread Gustavo Adrian
Ok, digging a little bit it seems that in the class SecurityContext, on the
method "vote", at the moment I call "has_role" from Twig, the token is not
set, so "vote" returns false because the token is null.

Does anyone know if the problem is that I can't call "has_role" from the
layout or if it's a bug?



Thanks.

On Mon, Dec 20, 2010 at 5:47 PM, Gustavo Adrian  wrote:

> Hi all,
>
> I've implemented the Security component and it works like a charm. I'm just
> having a problem with roles. In my layout I want to show a toolbar based on
> the roles of the user. Suppose that I have this implementation of the
> "getRoles" method on my User entity:
>
> public function getRoles()
> {
> $roles = array();
>  if ( $this->getIsAdmin() )
>  {
> $roles[] = 'ROLE_IS_ADMIN';
> }
>  if ( $this->getWebAccess() )
> {
>  $roles[] = 'ROLE_WEB_ACCESS';
> }
>  return $roles;
> }
>
>
> I've used this to try the "has_role" function with Twig on my layout, but
> it doesn't return any role, even if the user has both properties setted. I
> use the "has_role" function like this::
>
> {% if has_role( 'ROLE_IS_ADMIN' ) %} 'admin' {% elseif has_role(
> 'ROLE_WEB_ACCESS' ) %} 'web_access' {% else %} '' {% endif %}
>
> In this case, it always end with '' .
>
>
> the "getRoles" method is supposed to return an array of strings with the
> roles associated with the User? if that's so, what could be wrong with this
> implementation?
>
>
>
> BTW, I've updated my vendors today.
>
>
> Thanks.
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Re: How do I explicitly specify Doctrine connection name when connecting to multiple DBs using Symfony 1.4.8 / Doctrine 1.2?

2010-12-20 Thread dmitrypol
Thank you.  I solved it by creating in my actions.class.php.
  public function preExecute()
  {
  $doctrine_manager = Doctrine_Manager::getInstance();
  $doctrine_manager->setCurrentConnection('connection_name_here');
  }
For the life of me I was not able to make doctrine_manager-
>bindComponent to work.  Looks like there were some bugs in it, not
sure when they were fixed http://oldforum.symfony-project.org/index.php/m/95336/
and http://trac.symfony-project.org/ticket/7689


On Dec 17, 10:31 am, Dennis  wrote:
> Search for 'getConnection()' Symfony, blah blah.
>
> I know there's a way to use a particular connection when querying.
>
> On Dec 16, 11:51 pm, Georg  wrote:
>
> > This works for me. I can use tables from all databases in one action.
> > Are you sure that the class is bound to the correct database?
>
> > Am 16.12.2010 21:43, schrieb dmitrypol:
>
> > > I am using Symfony 1.4.8 / Doctrine 1.2 to connect to multiple DBs.
> > > In my_project_name/config/databases.yml I created connections db1st,
> > > db2nd, db3rd.  I built my schema from existing DBs (doctrine:build-
> > > schema) and generated code (doctrine:build --model --forms --
> > > filters).
>
> > > I created a module based on the table/class that is present in
> > > db2nd.
> > > php symfony doctrine:generate-module --non-verbose-templates frontend
> > > my_module_name MyClassName
> > > In my BaseClassName.class.php files I see
> > > Doctrine_Manager::getInstance()->bindComponent('ClassName', 'db2nd');
>
> > > When I browse tohttp://.../frontend_dev.php/my_module_name
> > > I get
> > > SQLSTATE[42S02]: Base table or view not found: 1146 Table
> > > 'db3.my_table_name' doesn't exist. Failing Query: "SELECT t.column1,
> > > t.column2 FROM my_table_name t"
> > > When I click Queries in webdebug toolbar I see
> > > 0.00s, "db3rd" connection
>
> > > It always uses the last connection by default and the table does not
> > > exist in that DB.  How do I tell it to use specific connection?  I got
> > > it to work by creating separate applications for each DB (one
> > > connection per app) but it s crazy to do that.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Re: how to check if a form contains the expected value

2010-12-20 Thread oscar balladares
Thanks !

2010/12/10 Don_Busi 

> Hi,
>
> I found a solution. The following works fine.
>
> $browser->
> with('response')->begin()->
>checkElement('input[id="sf_guard_user_last_name"]
> [value="expectedValue"]', true)->
> end();
>
> This page is a good reference about CSS-Selectors:
> http://www.w3.org/TR/CSS2/selector.html
>
> Cheers,
> Don
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> 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
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] The error is not showed in the backend

2010-12-20 Thread oscar balladares
When dev doesnt match prod, you should always clear the chache.

php symfony cc

If you already did it, please let us know ;)

2010/12/6 Javier Garcia 

>  Hi,
>
> I have these models:
>
>  user:
>name:  { type: varchar(255) }
>age:   { type: integer }
>
>  article:
>title:{ type: varchar(255) }
>content:  { type: varchar(255) }
>user_id:  { type: varchar(255) }
>
> I have this generator.yml
>
>  list:
>display: [title, age]
>peer_method: getArticles
>
> The method getArticles is this:
>
>public static function getArticles()
>{
>$con = Propel::getConnection();
>$sql = "select * from article LEFT JOIN user ON article.user_id =
> user.id";
>$stmt = $con->prepare($sql);
>
>
>$result = $stmt->execute();
>$articles = self::populateObjects($stmt);
>
>return $articles;
>
>}
>
> When I go to the module "article" in the backed, I expected it shows an
> error saying the method Article::getAge() doesn't exist, but it doesn't show
> anything...The browser just says "Loading...".
>
> Any idea?
>
> I'm the dev enviroment and i have just created a new project.
>
> I'm using propel.
>
> --
> Javi
>
> Ubuntu 10.04, sf 1.4
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> 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
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Error after executing "insert-sql". No problem when I use "build-all-load".

2010-12-20 Thread oscar balladares
That might occurs due the fact that database tables are already definded in
the database.

When you do the build --all command, it will drop all tables, and then re
create them, that is why it will work.

;)

2010/12/8 Javier Garcia 

> Hi,
>
> when I try to do a "propel:insert-sql" (after doing a propel:build-
> sql) i get the error message below.
>
> What I don't understand: when i do a "build-all-load" (that task
> includes the task "propel:insert-sql") I don't get any error...
>
>
> Execution of target "insert-sql" failed for the following reason: /opt/
> lampp/htdocs/cg1/lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/
> vendor/propel-generator/build-propel.xml:272:1:  [wrapped:
> SQLSTATE[HY000] [2002] Can't connect to local MySQL server through
> socket '/var/run/mysqld/mysqld.sock' (2)]
>[phing] /opt/lampp/htdocs/cg1/lib/vendor/symfony/lib/plugins/
> sfPropelPlugin/lib/vendor/propel-generator/build-propel.xml:272:1:
> [wrapped: SQLSTATE[HY000] [2002] Can't connect to local MySQL server
> through socket '/var/run/mysqld/mysqld.sock' (2)]
>
>  Some problems occurred when executing the
> task:
>
>  build-propel.xml:272:1:  [wrapped: SQLSTATE[HY000] [2002] Can't
> connect to local MySQL server through socket '/var/run/mysqld/
> mysqld.sock' (2)]
>
>  If the exception message is not clear enough, read the output of the
> task
> for
>  more information
>
>
> Any idea?
>
> sf 1.4/propel
>
> Javi
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> 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
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] best way to hide form fields in front_end based on credentials?

2010-12-20 Thread Gábor Fási
Inject the user in the form's constructor via the $options parameter,
use that in the configure() function.

On Mon, Dec 20, 2010 at 16:27, Stan McFarland  wrote:
> Hi,
>
> I guess the subject says it all.  :)  Looking for suggestions as to
> how best to hide specific form fields (not in the backend generator,
> but the frontend)  based on user credentials.   Thanks!
>
> -stan
>
>
>
> --
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
>
> 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
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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