[symfony-users] How to upload images in symfony 2

2011-06-03 Thread Tomasz Leśniak
Hi everyone!

How to uload file to the server using symfony 2.
I want to build a simple gallery bundle where I could upload files,
but images only (jpg | gif | png).
How to do that? how to limit upload files to image files? how to
configure upload dir, the name of uploaded file?

Regards

-- 
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: app_dev.php works on local and server, but app.php only works local

2011-06-03 Thread Tomasz Leśniak
With second parameter you decide whether enable debugging or not.
Try to set this parameter back to false, and clear cache. You can
simply delete all files from app/cache directory. Refresh your browser
to see results. Should be ok.

On 4 Cze, 03:42, Haulyn Jason  wrote:
> Thanks, it works now. What's the difference between the different parameter?
>
> Regards,
>
> Haulyn Jason
> Founder,http://domix.in
> Rm. 807, Qilu Software Tower, Qilu Software Park
> 1 Shunhua Rd., High-Tech Development Zone
> Jinan, Shandong 250101, P. R. China
> Tel: +86 158 5410 3759
> Website:http://haulynjason.net
>
> 2011/6/3 Καρακούσης Απόστολος :
>
>
>
>
>
>
>
> > try changing
>
> > $kernel = new AppKernel('prod', false);
>
> > to
>
> > $kernel = new AppKernel('prod', true);
>
> > in app.php
>
> > On Jun 3, 2011, at 1:25 PM, Haulyn Jason wrote:
>
> >> Hi,
>
> >> I deployed my symfony 2.0 application to the server, it's simple CRUD
> >> application.
>
> >> On my dev machine, no matter visit to /app_dev.php/ or /app.php,
> >> everything works well.
> >> On my production machine, I can visit to /app_dev.php/, everything
> >> works well, but when I visit /app.php or /app.php/, I got 404 page.
> >> Nothing useful information in log(both apache log and symfony log)
>
> >> In symfony log it said no router for get '/', but the result of
> >> app/console router:debug is the following:
> >> _wdt                        ANY    /_wdt/{token}
> >> _profiler_search            ANY    /_profiler/search
> >> _profiler_purge             ANY    /_profiler/purge
> >> _profiler_import            ANY    /_profiler/import
> >> _profiler_export            ANY    /_profiler/export/{token}.txt
> >> _profiler_search_results    ANY    /_profiler/{token}/search/results
> >> _profiler                   ANY    /_profiler/{token}
> >> _configurator_home          ANY    /_configurator/
> >> _configurator_step          ANY    /_configurator/step/{index}
> >> _configurator_final         ANY    /_configurator/final
> >> homepage                    ANY    /
> >> sales_dashboard             ANY    /sales/
> >> sales_shippingbills_new     ANY    /sales/shippingbills/new
> >> sales_shippingbills_insert  ANY    /sales/shippingbills/save
> >> sales_shippingbills_history ANY    /sales/shippingbills/history
> >> sales_shippingbills_operate ANY    /sales/shippingbills/operate
> >> sales_shippingbills_ship    ANY    /sales/shippingbills/ship
> >> sales_shippingbills_delete  ANY    /sales/shippingbills/delete
> >> account_login               ANY    /account/login
> >> account_security_check      ANY    /account/login_check
> >> account_logout              ANY    /account/logout
>
> >> I am sure I didn't put the homepage '/' to routing_dev, I am really
> >> put them to routing.yml
>
> >> I can not find the problem, any suggestions?
>
> >> Regards,
>
> >> Haulyn Jason
> >> Founder,http://domix.in
> >> Rm. 807, Qilu Software Tower, Qilu Software Park
> >> 1 Shunhua Rd., High-Tech Development Zone
> >> Jinan, Shandong 250101, P. R. China
> >> Tel: +86 158 5410 3759
> >> Website:http://haulynjason.net
>
> >> --
> >> 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

-- 
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] [Validation] Custom validator symfony2

2011-06-03 Thread cosmin
Is there a way to access two properties from the same entity that
isValidated like password and passconf without using
CLASS_CONSTRAINT??



my second problem is that i can`t set a new configuration so i can use
entityManager

services:
validator.unique:
class:   MyNsp\UserBundle\Validator\MyValidator
arguments: ["@doctrine.orm.entity_manager"]
tags:
- { name: validator.constraint_validator, alias:
validator.unique }

-- 
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] Symfony 1.2 Admin Generator not using Form Classes

2011-06-03 Thread Mazdak
I am using generator.yml to generate admin side. The code in the cache
is not using Form class ( extended from BaseFormPropel). What I read
in tutorials is that Form class is used and I can use setWidgets to
customize it. Why Symfony is not using Forms generated in lib/form/?

-- 
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] How to use mongoDB in Beta3?

2011-06-03 Thread Zap
Following guide at http://symfony.com/doc/current/cookbook/doctrine/mongodb.html
I get exception:

InvalidArgumentException: There is no extension able to load the
configuration for "doctrine_mongodb" (in /home/zap/public_html/v2/app/
config/config.yml).

In PR6 which I used for last mongo experiments there was doctrine-
mongodb and doctrine-mongodb-odm bundle.
In later versions these bundles are missing.

So my question is:
Should I use these old ones?
Or should I somehow create bundle from doctrine sources (http://
www.doctrine-project.org/projects/mongodb_odm/download)?
Or should I use some of new bundle at http://symfony2bundles.org? In
this case I really do not know which one is stable and compatible with
those docs and other plugins.

Maybe documentation could be updated and show, how to deal with
mongodb integration.

Thank you in advance

-- 
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: sharing global values between templates

2011-06-03 Thread Justin Hilles
why not use js?

-- 
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 route "#" does not exist

2011-06-03 Thread Justin Hilles
Javier is right but if you had to use link_to

link_to('Link Text", $sf_request->getPath(), array("anchor" => "#"));

I think that works, i like having all my links in symland

-- 
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 custom validation

2011-06-03 Thread cosmin
i am trying to build custom validation in symfony2 for passwords and
username/email unique but i can`t figure out:

how to access passconfirm property?
hot to access the database? from within the validator  class

the documentation does not write about this:(


-- 
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: app_dev.php works on local and server, but app.php only works local

2011-06-03 Thread t.lesniak
Hi
Please try to clear cache, simply remove everything from app/cache
dir. Should help.

Regards,
Tomasz Leśniak

-- 
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: DataBase Migration

2011-06-03 Thread Bart van Wissen
On 3 jun, 08:14, Gareth McCumskey  wrote:
> If you are using symfony 1.1 or up (not Symfony 2), then there is a command
> you can give from within the project root to create a schema.yml from the
> existing database:
>
> ./symfony propel:build-sql
>
>

I think regenerating the schema.yml for an existing project is not a
good idea. It will also include tables that may not be needed in your
project model at all.
I find it hard to believe that it would be missing from the project,
because then there would be no way to run propel:build-model, for
example. My suggestion would be to take another look. It could also be
schema.xml instead of schema.yml.

-- 
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: New to PHP

2011-06-03 Thread Ton Yeung
Well I seem to have found a framework that might work.
According to the hiphop mailing lists, it looks like code igniter
might work.
I'll be using that it seems.
I am unsubscribing from this list, so if anyone has any questions
regarding hiphop, please go to their mailing list.

On Jun 1, 6:04 pm, Ton Yeung  wrote:
> My clientele are cheap and they have a culture of break it apart and
> jurry rig it if we can.
> If I don't obfuscate or protect my source, i can be guaranteed its
> going to show up in someone else's project.
>
> Some of you might say go somewhere else then, but they pay so I'm
> staying.
> Anyway, php, bsd, and mongo seem to work well, so I would like to
> switch, but the lack of source protection and the performance is a
> problem.
> A friend of mine pointed to facebook's hiphop php -> c tool, and it
> fit the bill pretty well.
> Compiled code + performance boost is a big win.
>
> I've put in a new thread regarding whether or not hiphop will work
> with symfony.
> Anyway, I think this thread can be safely closed.
>
> On Jun 1, 5:00 am, Gareth McCumskey  wrote:
>
>
>
>
>
>
>
> > Code obfuscation in the PHP world is not very good and, to be honest not
> > necessary. For what reason do you want to obfuscate code?
>
> > On Tue, May 31, 2011 at 7:24 PM, Ton Yeung  wrote:
> > > I'm coming from an ASP.NET MVC background, where I can compile and
> > > obfuscate my source.
> > > How can do this with php and symfony?
>
> > > --
> > > 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 McCumskeyhttp://garethmccumskey.blogspot.com
> > twitter: @garethmcc
> > identi.ca: @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] Problem with DoctrineMongoDBBundle

2011-06-03 Thread amit
Hi,

 I am trying to use DoctrineMongoDBBundle but not able to create
documents using CLI. This is what I did.

- Downloaded symfony beta3
- Downloaded DoctrineMongoDBBundle from GIT
- Downloaded doctrine/common from git
- Downloaded doctrine/dbal from git
- Downloaded doctrine/mongodb from git
- Downloaded doctring/mongodb-odm

- AppKernel changes
new Symfony\Bundle\DoctrineMongoDBBundle\DoctrineMongoDBBundle(),

- autoload.php changes
'Doctrine\\MongoDB'   => __DIR__.'/../vendor/doctrine-mongodb/lib',
'Doctrine\\ODM\\MongoDB'   => __DIR__.'/../vendor/doctrine-mongodb-odm/
lib',
'Demo' => __DIR__.'/../src',

- config.yml changes
doctrine_mongodb:
default_database: hello_%kernel.environment%
connections:
default:
server: mongodb://localhost:27017
options:
connect: true
document_managers:
default:
mappings:
DemoApiBundle: { type: yml  }

but when I run
php app/console doctrine:mongodb:generate:documents DemoApiBundle
I get
[ReflectionException]
  Class Demo\ApiBundle\Document\Category does not exist

I have Demo.ApiBundle.Document.Category.mongodb.yml in Resources/
config/doctrine folder
Itvg\ApiBundle\Document\Category:
  fields:
id:
  type: id
  id: true
name:
  type: string

What am I doing wrong? Isn't the CLI command I am running supposed to
create Category class instead of complaining?

Kindly help.

Regards,
Amit.

-- 
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] app_dev.php works on local and server, but app.php only works local

2011-06-03 Thread Haulyn Jason
Thanks, it works now. What's the difference between the different parameter?


Regards,

Haulyn Jason
Founder, http://domix.in
Rm. 807, Qilu Software Tower, Qilu Software Park
1 Shunhua Rd., High-Tech Development Zone
Jinan, Shandong 250101, P. R. China
Tel: +86 158 5410 3759
Website: http://haulynjason.net



2011/6/3 Καρακούσης Απόστολος :
> try changing
>
> $kernel = new AppKernel('prod', false);
>
> to
>
> $kernel = new AppKernel('prod', true);
>
> in app.php
>
> On Jun 3, 2011, at 1:25 PM, Haulyn Jason wrote:
>
>> Hi,
>>
>> I deployed my symfony 2.0 application to the server, it's simple CRUD
>> application.
>>
>> On my dev machine, no matter visit to /app_dev.php/ or /app.php,
>> everything works well.
>> On my production machine, I can visit to /app_dev.php/, everything
>> works well, but when I visit /app.php or /app.php/, I got 404 page.
>> Nothing useful information in log(both apache log and symfony log)
>>
>> In symfony log it said no router for get '/', but the result of
>> app/console router:debug is the following:
>> _wdt                        ANY    /_wdt/{token}
>> _profiler_search            ANY    /_profiler/search
>> _profiler_purge             ANY    /_profiler/purge
>> _profiler_import            ANY    /_profiler/import
>> _profiler_export            ANY    /_profiler/export/{token}.txt
>> _profiler_search_results    ANY    /_profiler/{token}/search/results
>> _profiler                   ANY    /_profiler/{token}
>> _configurator_home          ANY    /_configurator/
>> _configurator_step          ANY    /_configurator/step/{index}
>> _configurator_final         ANY    /_configurator/final
>> homepage                    ANY    /
>> sales_dashboard             ANY    /sales/
>> sales_shippingbills_new     ANY    /sales/shippingbills/new
>> sales_shippingbills_insert  ANY    /sales/shippingbills/save
>> sales_shippingbills_history ANY    /sales/shippingbills/history
>> sales_shippingbills_operate ANY    /sales/shippingbills/operate
>> sales_shippingbills_ship    ANY    /sales/shippingbills/ship
>> sales_shippingbills_delete  ANY    /sales/shippingbills/delete
>> account_login               ANY    /account/login
>> account_security_check      ANY    /account/login_check
>> account_logout              ANY    /account/logout
>>
>> I am sure I didn't put the homepage '/' to routing_dev, I am really
>> put them to routing.yml
>>
>> I can not find the problem, any suggestions?
>>
>> Regards,
>>
>> Haulyn Jason
>> Founder, http://domix.in
>> Rm. 807, Qilu Software Tower, Qilu Software Park
>> 1 Shunhua Rd., High-Tech Development Zone
>> Jinan, Shandong 250101, P. R. China
>> Tel: +86 158 5410 3759
>> Website: http://haulynjason.net
>>
>> --
>> 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
>

-- 
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: getting a fatal error using swiftmailer

2011-06-03 Thread Roger Webb
I went through this *exact* issue and found an answer on the list.

You *MUST* retrieve the "mailer" before creating a new Swift_Message

$mailer = $this->get('mailer');

$message = \Swift_Message::newInstance()->...

Roger

On Jun 3, 9:27 am, Kevin  wrote:
> I was also having this issue, updating to sf2 master cleared it up for
> me.
>
> On Jun 2, 10:35 am, keymaster  wrote:
>
>
>
>
>
>
>
> > Getting the identical error, also on Sf2 Beta3.
>
> > *Fatal error*: Call to a member function clearAll() on a non-object in 
> > *C:\Program
> > Files
> > (x86)\Zend\Apache2\htdocs\Symfony\vendor\swiftmailer\lib\classes\Swift\Mime\SimpleMimeEntity.php
> > * on line *822
>
> > Here is the code:
> > *
> > $message = \Swift_Message::newInstance()->setSubject( 'Contact Email' )
> >                     ->setFrom( 's...@example.com' )
> >                     ->setTo( 'recipi...@example.com' )
> >                     ->setBody( 'Hi There' );
> > $this->get( 'mailer' )->send( $message );

-- 
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: sharing global values between templates

2011-06-03 Thread Rytis Daugirdas
JavaScript? It has nothing to do with my question.

On Jun 3, 8:38 pm, Justin Hilles  wrote:
> why not use js?

-- 
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] Months in date field not always in same format

2011-06-03 Thread umpirsky
i use form date field like:

// ...
->add('valid_untill', 'date', array(
'label' => 'Valid untill',
'years' => range(date('Y'), date('Y') + 5)
));
// ...

render it like:

{{ form_row(form.valid_untill, { 'date_pattern': '{{ month }}
{{ year }}' }) }}

I get months like numbers: 01, 02, 03, ..., 11, 12. But client just
sent me screenshot where months are displayed like Jan, Feb..., Dec.

I tried to change locale, timezone...but I always get numbers.

Any idea?

-- 
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 route "#" does not exist

2011-06-03 Thread Javier Garcia
 I think you don't need link_to() to create an static link. Use href="#"> directly.


Javi

On 06/03/2011 06:40 AM, Imran wrote:

Hi Folks,

I am new to symfony1.4 and few issues are coming with link_to()
helper.

when i use write as link_to('text', '#), it throws error The route "#"
does not exist.

It was working in earlier versions of symfony.

How to render the anchor tag with # url?


Thanks




--
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


[symfony-users] symfony2: sharing global values between templates

2011-06-03 Thread Rytis Daugirdas
Hello,

Is there a way to easily set a value in one template and make it
available in another (both templates are included by the same layout)?
For example, in a page template I want to set a string value
representing the selected menu item  and use this value in a mini-
template that contains the menu markup. In symfony 1.x,
slot('selectedMenuItem', 'home') would work just fine and the value
would be available in all partials. I don't think symfony2 blocks can
be used for the same purpose. There are also twig variables, but
they're local.

-- 
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: getting a fatal error using swiftmailer

2011-06-03 Thread Kevin
I was also having this issue, updating to sf2 master cleared it up for
me.

On Jun 2, 10:35 am, keymaster  wrote:
> Getting the identical error, also on Sf2 Beta3.
>
> *Fatal error*: Call to a member function clearAll() on a non-object in 
> *C:\Program
> Files
> (x86)\Zend\Apache2\htdocs\Symfony\vendor\swiftmailer\lib\classes\Swift\Mime\SimpleMimeEntity.php
> * on line *822
>
> Here is the code:
> *
> $message = \Swift_Message::newInstance()->setSubject( 'Contact Email' )
>                     ->setFrom( 's...@example.com' )
>                     ->setTo( 'recipi...@example.com' )
>                     ->setBody( 'Hi There' );
> $this->get( 'mailer' )->send( $message );

-- 
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] app_dev.php works on local and server, but app.php only works local

2011-06-03 Thread Καρακούσης Απόστολος
try changing 

$kernel = new AppKernel('prod', false);

to 

$kernel = new AppKernel('prod', true);

in app.php

On Jun 3, 2011, at 1:25 PM, Haulyn Jason wrote:

> Hi,
> 
> I deployed my symfony 2.0 application to the server, it's simple CRUD
> application.
> 
> On my dev machine, no matter visit to /app_dev.php/ or /app.php,
> everything works well.
> On my production machine, I can visit to /app_dev.php/, everything
> works well, but when I visit /app.php or /app.php/, I got 404 page.
> Nothing useful information in log(both apache log and symfony log)
> 
> In symfony log it said no router for get '/', but the result of
> app/console router:debug is the following:
> _wdtANY/_wdt/{token}
> _profiler_searchANY/_profiler/search
> _profiler_purge ANY/_profiler/purge
> _profiler_importANY/_profiler/import
> _profiler_exportANY/_profiler/export/{token}.txt
> _profiler_search_resultsANY/_profiler/{token}/search/results
> _profiler   ANY/_profiler/{token}
> _configurator_home  ANY/_configurator/
> _configurator_step  ANY/_configurator/step/{index}
> _configurator_final ANY/_configurator/final
> homepageANY/
> sales_dashboard ANY/sales/
> sales_shippingbills_new ANY/sales/shippingbills/new
> sales_shippingbills_insert  ANY/sales/shippingbills/save
> sales_shippingbills_history ANY/sales/shippingbills/history
> sales_shippingbills_operate ANY/sales/shippingbills/operate
> sales_shippingbills_shipANY/sales/shippingbills/ship
> sales_shippingbills_delete  ANY/sales/shippingbills/delete
> account_login   ANY/account/login
> account_security_check  ANY/account/login_check
> account_logout  ANY/account/logout
> 
> I am sure I didn't put the homepage '/' to routing_dev, I am really
> put them to routing.yml
> 
> I can not find the problem, any suggestions?
> 
> Regards,
> 
> Haulyn Jason
> Founder, http://domix.in
> Rm. 807, Qilu Software Tower, Qilu Software Park
> 1 Shunhua Rd., High-Tech Development Zone
> Jinan, Shandong 250101, P. R. China
> Tel: +86 158 5410 3759
> Website: http://haulynjason.net
> 
> -- 
> 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] Re: Using Sonata AdminBundle for a front end management panel

2011-06-03 Thread Thomas Rabaix
The is a ACL branch which for now allows to select which actions can be done
upon roles. The next step will be to select which fields users can view or
edit.



On Fri, Jun 3, 2011 at 2:46 PM, dbu  wrote:

> hi thomas,
>
> > something I have in mind, the only restriction for now is how the Admin
> > class are used by the routing and it is not hard to change. But for now I
> am
> > focused on the security layer with ACL.
>
> i played with the adminbundle today (some general follows in a
> separate thread). i found nothing on permission schemas in your
> tutorial. does adminbundle allow to control who is allowed to edit /
> create / delete what? if so, would be awesome if you can explain how
> to do things like:
>
> * restrict admin per entity, based on a user role
> * fine grained permission control, like user in this role can only
> edit content that he created, but not content from other people
>
> part of this could be handled with acls and the rest in custom
> controllers for the entities. but would be a lot of typing redundant
> stuff probably, and the user would see links for things he is not
> allowed to do - not user friendly...
>
> cheers,david
>
> --
> 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
>



-- 
Thomas Rabaix
http://rabaix.net

-- 
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] Using Sonata AdminBundle for a front end management panel

2011-06-03 Thread Thomas Rabaix
2 app folders with 1 different configuration for routing and templating.

You can share the Admin class, but this is not a good idea, it would be
better to have 2 dedicated Admin class, behaviors can change a lot between
super admin and simple user.

On Fri, Jun 3, 2011 at 2:12 PM, keymaster  wrote:

>
> Just confirming to see if I understand correctly:
>
> Two app folders  - frontApp, backApp.
>
> Single code base.
>
> Single db.
>
> Each userland bundle has  AdminFront and AdminBack classes as well
> as AdminFrontController and AdminBackController classes.
>
> The AdminBundle config is different in each app, telling it whether to use
> the front or back Admin classes and xxxAdminControllers.
>
> The front app overrides the templates in app/Resources/views.
>
>
> Is that what you meant?
>
>
>
> Possible Issues:
>
> S2’s CLI tools – will the two app architecture mess them up?
>
> Sessions – is there any way to share sessions between the apps?
>
>
> Thanks for your help.
>
> --
> 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
>



-- 
Thomas Rabaix
http://rabaix.net

-- 
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 configuration types - which one to choose?

2011-06-03 Thread Dmitry Bykadorov
Thanks, Christophe!

You're right, PHP configuration I've never using.

But for my projects I need some code conventions ) E.g. only YAML or
only Annotations.

Now I'm trying to use XML in my bundles.

p.s. Can anyone give me a link to full default configuration in XML? )


On Jun 3, 5:04 pm, Christophe COEVOET  wrote:
> Le 03/06/2011 14:56, Dmitry Bykadorov a crit :> Hello all!
>
> > What we have for configuration?
>
> > - YAML (default in Symfony standard distribution)
> > - XML (in my opinion most powerfull option - with validation via DTD&
> > XSD but more complex to human)
>
> The configuration of bundles are validated whatever format you use (for
> bundles using this tool of course) in a more powerful way than XSD as it
> validates the merged configuration instead of each file separately (a
> required configuration is not required in all files but in the merged
> configuration).> - PHP (ugly but native ))
>
> PHP is a bad choice IMO. This really does not fit well for
> configuration. Thus there is no overhead about using XML or YAML as the
> configuration is only parsed once.> - Annotations (looks very cool in file 
> but... maybe hard to debug, no
> > validation... unfamiliar and new in any case )...
>
> the main configuration cannot be done in annotations.> So in my first 
> Symfony2 projects i use YAML (at least in app/ -
> > because its default), XML and Annotations. Looks like spaghetti 
>
> > So, the question:
>
> > What configuration standard defacto main in Symfony2? I can't select
> > one by myself... But I want to configure my bundles in mostly common
> > way...
>
> There is absolutely no issue about mixing formats depending of the place
> you use it.
> YAML is recommended for the main configuration as it is less verbose
> than XML (and far more readable than a config written in PHP). For your
> mapping, choose the way you want. performances are equivalent as the
> mapping is cached.
>
> --
> Christophe | Stof

-- 
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] Integrate Sf2 with jquery

2011-06-03 Thread David Buchmann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

this sounds spanish to me :-)

but maybe you want to have a look at https://github.com/sonata-project -
they provide a jquery bundle, and the adminbundle is using it... maybe
you can figure things out from the admin bundle source code...

cheers,david

Am 03.06.2011 14:49, schrieb smontes:
> I rode the following messages 
> http://groups.google.com/group/jquery4php/browse_thread/thread/d7291256b04885e
> , but I do not know if this works for symfony 2 , to beginning the
> autoload what I have is in php. I do not know how do it work with
> jquery.
> 

- -- 
Liip AG // Agile Web Development // T +41 26 422 25 11
CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3o3NMACgkQqBnXnqWBgIsxBQCdFHns76uS5e7NvVVPND6xqGzI
qL8Anin+zBdOBRf7qV1JD/0152ZMHmUm
=aRm3
-END PGP SIGNATURE-

-- 
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] [Sonata AdminBundle] documentation

2011-06-03 Thread David Buchmann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

hi thomas,

some feedback and hints on the AdminBundle. (i post this to the list, as
people might stumble over the same details as i did...)

i followed http://rabaix.net/AdminBundle/html/index.html

first: THANKS! this is an awesome tool!


tutorial chapter 4:
http://rabaix.net/AdminBundle/html/tutorial/creating_your_first_admin_class/defining_crud_controller.html

there is a note that declaring a controller is optional. this is true,
but you should explain the service configuration with a bit more detail:


Sonata\NewsBundle\Entity\Post
SonataNewsBundle:PostAdmin
resp.
arguments: [null, Sonata\NewsBundle\Entity\Post, SonataNewsBundle:PostAdmin]

=> the third parameter is the name of the controller. if you did not
define one, leave this empty/null


tutorial chapter 5:
http://rabaix.net/AdminBundle/html/tutorial/creating_your_first_admin_class/defining_admin_class.html

at the end of 5.1, i had to delete my cache to let symfony see the new
routes generated by the admin. (until i did, i got an exception for
missing route admin_acme_demo_entity_list)


the error message that occurs if a field name in the admin class does
not map to an entity field name could hint that you might mistyped your
field name. currently it just tells it has no type for that field, which
is confusing for beginners like me

An exception has been thrown during the rendering of a template ("Please
define a type for field `title` in `Acme\DemoBundle\Admin\EntityAdmin`")
in SonataAdminBundle:CRUD:base_list.html.twig at line 25.


many to many relations:

when i add the related entity, the list of available selections is not
updated, i have to reload the page to see the new entry. is this a bug?
found no issue in the github bugtracker...


when editing the relation, i have another issue - which is actually more
of a doctrine:generate:entities issue:

i used a yml file to create my entities:
manyToMany:
subscribed:
targetEntity: Course

doctrine:generate:entities creates a class with getSubscribed and
addSubscribed (which is weird, you can not remove a subscription this
way. plus the annotation doc on getSubscribed is lying, claiming the
return value to be a doctrine collection but returning a plain array)

i had to set the field to protected or public to make the adminbundle
work. maybe adminbundle should use the addSubscribed method for
manyToMany relations? do you know what the idea with the generate
entities command is here? is this going to be fixed by either you or
doctrine to work out of the box?

cheers,david
- -- 
Liip AG // Agile Web Development // T +41 26 422 25 11
CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3o3GQACgkQqBnXnqWBgIvxCACdHOh0mClKKFzIElRN8dXuUmOt
v/wAnRpouRBq+Pj+OmWYxDE5thBuGe1o
=f1Rx
-END PGP SIGNATURE-

-- 
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] Symfony2 configuration types - which one to choose?

2011-06-03 Thread Christophe COEVOET

Le 03/06/2011 14:56, Dmitry Bykadorov a écrit :

Hello all!

What we have for configuration?

- YAML (default in Symfony standard distribution)
- XML (in my opinion most powerfull option - with validation via DTD&
XSD but more complex to human)
The configuration of bundles are validated whatever format you use (for 
bundles using this tool of course) in a more powerful way than XSD as it 
validates the merged configuration instead of each file separately (a 
required configuration is not required in all files but in the merged 
configuration).

- PHP (ugly but native ))
PHP is a bad choice IMO. This really does not fit well for 
configuration. Thus there is no overhead about using XML or YAML as the 
configuration is only parsed once.

- Annotations (looks very cool in file but... maybe hard to debug, no
validation... unfamiliar and new in any case )...

the main configuration cannot be done in annotations.

So in my first Symfony2 projects i use YAML (at least in app/ -
because its default), XML and Annotations. Looks like spaghetti 

So, the question:

What configuration standard defacto main in Symfony2? I can't select
one by myself... But I want to configure my bundles in mostly common
way...
There is absolutely no issue about mixing formats depending of the place 
you use it.
YAML is recommended for the main configuration as it is less verbose 
than XML (and far more readable than a config written in PHP). For your 
mapping, choose the way you want. performances are equivalent as the 
mapping is cached.


--
Christophe | Stof

--
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] Aw: Re: Can't get MongoDB working

2011-06-03 Thread Conrad
Thanks Mathias, I will try it next week (hopefully :)

-- 
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 configuration types - which one to choose?

2011-06-03 Thread Dmitry Bykadorov
Hello all!

What we have for configuration?

- YAML (default in Symfony standard distribution)
- XML (in my opinion most powerfull option - with validation via DTD &
XSD but more complex to human)
- PHP (ugly but native ))
- Annotations (looks very cool in file but... maybe hard to debug, no
validation... unfamiliar and new in any case )...

So in my first Symfony2 projects i use YAML (at least in app/ -
because its default), XML and Annotations. Looks like spaghetti 

So, the question:

What configuration standard defacto main in Symfony2? I can't select
one by myself... But I want to configure my bundles in mostly common
way...



-- 
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] Integrate Sf2 with jquery

2011-06-03 Thread smontes
I rode the following messages 
http://groups.google.com/group/jquery4php/browse_thread/thread/d7291256b04885e
, but I do not know if this works for symfony 2 , to beginning the
autoload what I have is in php. I do not know how do it work with
jquery.

-- 
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: Using Sonata AdminBundle for a front end management panel

2011-06-03 Thread dbu
hi thomas,

> something I have in mind, the only restriction for now is how the Admin
> class are used by the routing and it is not hard to change. But for now I am
> focused on the security layer with ACL.

i played with the adminbundle today (some general follows in a
separate thread). i found nothing on permission schemas in your
tutorial. does adminbundle allow to control who is allowed to edit /
create / delete what? if so, would be awesome if you can explain how
to do things like:

* restrict admin per entity, based on a user role
* fine grained permission control, like user in this role can only
edit content that he created, but not content from other people

part of this could be handled with acls and the rest in custom
controllers for the entities. but would be a lot of typing redundant
stuff probably, and the user would see links for things he is not
allowed to do - not user friendly...

cheers,david

-- 
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] Using Sonata AdminBundle for a front end management panel

2011-06-03 Thread keymaster

Just confirming to see if I understand correctly: 

Two app folders  - frontApp, backApp.

Single code base.

Single db.

Each userland bundle has  AdminFront and AdminBack classes as well 
as AdminFrontController and AdminBackController classes.

The AdminBundle config is different in each app, telling it whether to use 
the front or back Admin classes and xxxAdminControllers. 

The front app overrides the templates in app/Resources/views.


Is that what you meant?

 

Possible Issues:

S2’s CLI tools – will the two app architecture mess them up?

Sessions – is there any way to share sessions between the apps?


Thanks for your help.

-- 
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: Is there demand for a Symfony2 Eclipse Plugin?

2011-06-03 Thread Robert Gründler

On 03.06.11 11:31, Johannes Schmitt wrote:
There is another thing that would be cool that have IDE support for, 
and that are annotations. Eclipse PDT has already autocompletion for 
the "@var" annotation, but maybe that is extensible to include all 
annotations such as @Route, @Template, @Secure, etc.


yes, that's definitely something i was thinking about, and this should 
not be a big problem. There's already a plugin which does

this for aspect oriented programming:

http://code.google.com/p/apdt/

There could even be validation of annotations implemented, as in the 
apdt plugin.
Connected to a native twig editor, things like autocompleting route 
names in templates etc could be added too.


Another thing that might be helpful, but I'm not sure if it's 
possible, is to have auto-completion for objects returned from the 
dependency injection container through ($container->get(...)) calls.


This is possible. Actually i've already a prototype running which parses 
the services from the xml/yml files and then provides
type inference hinting to PDT based on the services name from 
$container->get('...');


Unfortunately there's some bad news on the twig-front: the twig support 
doesn't seem possible by extending built-in tools like WTP:


https://bugs.eclipse.org/bugs/show_bug.cgi?id=225994

So it looks like the twig editor needs to be implemented from scratch - 
like in this eclipse plugin which is opensource:


http://smile-ez-plugin.sourceforge.net/

As i already mentioned i'm not very happy with this approach because 
re-writing all the existing html/js/css features
for a HTML Editor takes a lot of time and definitely does not follow the 
DRY principles ;)


Maybe anyone on the list has another idea how to handle the twig-support?

Anyway, if you decide to make such a plugin I'd like to use, and 
contribute to it.


sounds great!


regards

-robert




Kind regards,
Johannes


2011/6/2 Robert Gründler >


as far as Twig Support is concerned, i've found the following
existing plugins, which
could probably be used as a base or part of a Symfony2 Plugin:

* http://eclipse.kacprzak.org/ <-- django eclipse plugin ( unable
to install via update site )

* http://code.google.com/p/smartypdt/ <-- smarty eclipse plugin (
syntax probably not compatible with twig?)

The problem concerning twig support is that i would prefer to
extend an existing
HTML editor - preferably the one from the standard Web Tools
Project (WTP) - instead
of implementing a HTML/Twig editor from scratch.

However, the WTP plugin does not seem to provide extensions to add
additional language constructs
without completely overriding their Lexer - like the PHP Plugin does.

I've posted to the WTP plugin's mailing list - hopefully i'll get
some info about the possibilities of
extending the HTML Editor, so native Twig support could be
implemented too.

Concerning extensions to the PHP Sourcecodeeditor, i'm quite
confident that this can
be done more easily. The PDT Plugin provides a lot of useful
extension points:

http://wiki.eclipse.org/Extending_PDT_2.2


cheers

-robert



-- 
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


--
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] Can not send email via Symfony2

2011-06-03 Thread Haulyn Jason
OK, I know the problem,  mailer_transport="sendmail", I wrote this
line to production config, but not in dev config, I set it to smtp to
dev config.

Sorry for the stupid issue.


Regards,

Haulyn Jason
Founder, http://domix.in
Rm. 807, Qilu Software Tower, Qilu Software Park
1 Shunhua Rd., High-Tech Development Zone
Jinan, Shandong 250101, P. R. China
Tel: +86 158 5410 3759
Website: http://haulynjason.net



On Fri, Jun 3, 2011 at 5:28 PM, Haulyn Jason  wrote:
> I am confused, after I send the email, I only redirect to dashboard
> page. BUT: nothing was pushed to my sendmail queue.
>
>
>
> Regards,
>
> Haulyn Jason
> Founder, http://domix.in
> Rm. 807, Qilu Software Tower, Qilu Software Park
> 1 Shunhua Rd., High-Tech Development Zone
> Jinan, Shandong 250101, P. R. China
> Tel: +86 158 5410 3759
> Website: http://haulynjason.net
>
>
>
> On Fri, Jun 3, 2011 at 5:20 PM, Michael Holm  wrote:
>> Hi,
>>
>> Just a hint, are you sure that you not just redirect after sending the
>> mail, and the mail are held back in you local mail queue?
>>
>> I just know what i have done that a couple of times.. :)
>>
>> Best regards,
>> Michael Holm
>>
>>
>>
>> On Fri, Jun 3, 2011 at 8:00 AM, Haulyn Jason  wrote:
>>> Hi,
>>> I want to send email via sendmail installed local.Then the code in
>>> Symfony 2 project is:
>>>
>>> configuration:
>>>    mailer_transport="sendmail"
>>>    mailer_host="localhost"
>>>    mailer_user=""
>>>    mailer_password=""
>>>
>>>
>>> PHP Code:
>>>        $message = \Swift_Message::newInstance()
>>>                   ->setSubject($shippingBills->getEmailHeader())
>>>                   ->setFrom('saharab...@domix.in')
>>>                   ->setTo('saharab...@domix.in')
>>>
>>> ->setBody($this->renderView('YunshangSalesBundle:Default:shippingEmail.txt.twig'));
>>>        $this->get('mailer')->send($message);
>>>
>>> When I execute these scripts, the webpage has no errors, but no email
>>> has been sent, I can not receive anything, and no email recorder via
>>> SymfonyProfiler.
>>>
>>> Any help?
>>>
>>>
>>> Regards,
>>>
>>> Haulyn Jason
>>> Founder, http://domix.in
>>> Rm. 807, Qilu Software Tower, Qilu Software Park
>>> 1 Shunhua Rd., High-Tech Development Zone
>>> Jinan, Shandong 250101, P. R. China
>>> Tel: +86 158 5410 3759
>>> Website: http://haulynjason.net
>>>
>>> --
>>> 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
>>
>

-- 
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] app_dev.php works on local and server, but app.php only works local

2011-06-03 Thread Haulyn Jason
Hi,

I deployed my symfony 2.0 application to the server, it's simple CRUD
application.

On my dev machine, no matter visit to /app_dev.php/ or /app.php,
everything works well.
On my production machine, I can visit to /app_dev.php/, everything
works well, but when I visit /app.php or /app.php/, I got 404 page.
Nothing useful information in log(both apache log and symfony log)

In symfony log it said no router for get '/', but the result of
app/console router:debug is the following:
_wdtANY/_wdt/{token}
_profiler_searchANY/_profiler/search
_profiler_purge ANY/_profiler/purge
_profiler_importANY/_profiler/import
_profiler_exportANY/_profiler/export/{token}.txt
_profiler_search_resultsANY/_profiler/{token}/search/results
_profiler   ANY/_profiler/{token}
_configurator_home  ANY/_configurator/
_configurator_step  ANY/_configurator/step/{index}
_configurator_final ANY/_configurator/final
homepageANY/
sales_dashboard ANY/sales/
sales_shippingbills_new ANY/sales/shippingbills/new
sales_shippingbills_insert  ANY/sales/shippingbills/save
sales_shippingbills_history ANY/sales/shippingbills/history
sales_shippingbills_operate ANY/sales/shippingbills/operate
sales_shippingbills_shipANY/sales/shippingbills/ship
sales_shippingbills_delete  ANY/sales/shippingbills/delete
account_login   ANY/account/login
account_security_check  ANY/account/login_check
account_logout  ANY/account/logout

I am sure I didn't put the homepage '/' to routing_dev, I am really
put them to routing.yml

I can not find the problem, any suggestions?

Regards,

Haulyn Jason
Founder, http://domix.in
Rm. 807, Qilu Software Tower, Qilu Software Park
1 Shunhua Rd., High-Tech Development Zone
Jinan, Shandong 250101, P. R. China
Tel: +86 158 5410 3759
Website: http://haulynjason.net

-- 
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] Using Sonata AdminBundle for a front end management panel

2011-06-03 Thread Thomas Rabaix
On Fri, Jun 3, 2011 at 11:31 AM, keymaster  wrote:

> > You can initialize the Frontend and Backend from within a single
> index.php by matching url.
>
> Thanks for the response, Thomas.
>
> While in principle I understand what you are recommending, I have no clue
> on what changes to make to get that setup.
>
> Just create a new application, and in your index.php file, just do :
https://gist.github.com/803cf89325b11340aa8b


> Would you know of any example code somewhere on how this might be done?
>
> As an aside - given that S2 is all about decoupling - are you planning at
> all in the future to decouple the AdminBundle from it's reliance on one of
> front/backend, and enable the existing functionality to serve both within
> the same app? Your functionality is equally applicable to front end
> searching/filtering/sorting/paging of listings, as it is to the backend.
> Why restrict it to only one?
>
> It is not a restriction by design, but only by code evolution ... It is
something I have in mind, the only restriction for now is how the Admin
class are used by the routing and it is not hard to change. But for now I am
focused on the security layer with ACL.


>  --
> 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
>



-- 
Thomas Rabaix
http://rabaix.net

-- 
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] Using Sonata AdminBundle for a front end management panel

2011-06-03 Thread keymaster
> You can initialize the Frontend and Backend from within a single index.php 
by matching url. 

Thanks for the response, Thomas.

While in principle I understand what you are recommending, I have no clue on 
what changes to make to get that setup.

Would you know of any example code somewhere on how this might be done?

As an aside - given that S2 is all about decoupling - are you planning at 
all in the future to decouple the AdminBundle from it's reliance on one of 
front/backend, and enable the existing functionality to serve both within 
the same app? Your functionality is equally applicable to front end 
searching/filtering/sorting/paging of listings, as it is to the backend.  
Why restrict it to only one?

-- 
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: Is there demand for a Symfony2 Eclipse Plugin?

2011-06-03 Thread Johannes Schmitt
There is another thing that would be cool that have IDE support for, and
that are annotations. Eclipse PDT has already autocompletion for the "@var"
annotation, but maybe that is extensible to include all annotations such as
@Route, @Template, @Secure, etc.

Another thing that might be helpful, but I'm not sure if it's possible, is
to have auto-completion for objects returned from the dependency injection
container through ($container->get(...)) calls.

Anyway, if you decide to make such a plugin I'd like to use, and contribute
to it.

Kind regards,
Johannes


2011/6/2 Robert Gründler 

> as far as Twig Support is concerned, i've found the following existing
> plugins, which
> could probably be used as a base or part of a Symfony2 Plugin:
>
> * http://eclipse.kacprzak.org/ <-- django eclipse plugin ( unable to
> install via update site )
>
> * http://code.google.com/p/smartypdt/ <-- smarty eclipse plugin ( syntax
> probably not compatible with twig?)
>
> The problem concerning twig support is that i would prefer to extend an
> existing
> HTML editor - preferably the one from the standard Web Tools Project (WTP)
> - instead
> of implementing a HTML/Twig editor from scratch.
>
> However, the WTP plugin does not seem to provide extensions to add
> additional language constructs
> without completely overriding their Lexer - like the PHP Plugin does.
>
> I've posted to the WTP plugin's mailing list - hopefully i'll get some info
> about the possibilities of
> extending the HTML Editor, so native Twig support could be implemented too.
>
> Concerning extensions to the PHP Sourcecodeeditor, i'm quite confident that
> this can
> be done more easily. The PDT Plugin provides a lot of useful extension
> points:
>
> http://wiki.eclipse.org/Extending_PDT_2.2
>
>
> cheers
>
> -robert
>
>
>
> --
> 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] symfony1 + Symfony2

2011-06-03 Thread Thomas Rabaix
Symfony1 can be used on top of symfony2, but this required some works and a
good understanding on how frameworks works.

On Fri, Jun 3, 2011 at 9:48 AM, Denis.Gorbachev  wrote:

> Hello, everybody!
>
> I've got an internal management system based on symfony1. However, the
> client wants to add some major enhancements (so big that they would
> require 4 months or so to develop). Is there any way to use both
> symfony1 and Symfony2 in the same project?
>
> --
> 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
>



-- 
Thomas Rabaix
http://rabaix.net

-- 
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] Can not send email via Symfony2

2011-06-03 Thread Haulyn Jason
I am confused, after I send the email, I only redirect to dashboard
page. BUT: nothing was pushed to my sendmail queue.



Regards,

Haulyn Jason
Founder, http://domix.in
Rm. 807, Qilu Software Tower, Qilu Software Park
1 Shunhua Rd., High-Tech Development Zone
Jinan, Shandong 250101, P. R. China
Tel: +86 158 5410 3759
Website: http://haulynjason.net



On Fri, Jun 3, 2011 at 5:20 PM, Michael Holm  wrote:
> Hi,
>
> Just a hint, are you sure that you not just redirect after sending the
> mail, and the mail are held back in you local mail queue?
>
> I just know what i have done that a couple of times.. :)
>
> Best regards,
> Michael Holm
>
>
>
> On Fri, Jun 3, 2011 at 8:00 AM, Haulyn Jason  wrote:
>> Hi,
>> I want to send email via sendmail installed local.Then the code in
>> Symfony 2 project is:
>>
>> configuration:
>>    mailer_transport="sendmail"
>>    mailer_host="localhost"
>>    mailer_user=""
>>    mailer_password=""
>>
>>
>> PHP Code:
>>        $message = \Swift_Message::newInstance()
>>                   ->setSubject($shippingBills->getEmailHeader())
>>                   ->setFrom('saharab...@domix.in')
>>                   ->setTo('saharab...@domix.in')
>>
>> ->setBody($this->renderView('YunshangSalesBundle:Default:shippingEmail.txt.twig'));
>>        $this->get('mailer')->send($message);
>>
>> When I execute these scripts, the webpage has no errors, but no email
>> has been sent, I can not receive anything, and no email recorder via
>> SymfonyProfiler.
>>
>> Any help?
>>
>>
>> Regards,
>>
>> Haulyn Jason
>> Founder, http://domix.in
>> Rm. 807, Qilu Software Tower, Qilu Software Park
>> 1 Shunhua Rd., High-Tech Development Zone
>> Jinan, Shandong 250101, P. R. China
>> Tel: +86 158 5410 3759
>> Website: http://haulynjason.net
>>
>> --
>> 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
>

-- 
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] Can not send email via Symfony2

2011-06-03 Thread Michael Holm
Hi,

Just a hint, are you sure that you not just redirect after sending the
mail, and the mail are held back in you local mail queue?

I just know what i have done that a couple of times.. :)

Best regards,
Michael Holm



On Fri, Jun 3, 2011 at 8:00 AM, Haulyn Jason  wrote:
> Hi,
> I want to send email via sendmail installed local.Then the code in
> Symfony 2 project is:
>
> configuration:
>    mailer_transport="sendmail"
>    mailer_host="localhost"
>    mailer_user=""
>    mailer_password=""
>
>
> PHP Code:
>        $message = \Swift_Message::newInstance()
>                   ->setSubject($shippingBills->getEmailHeader())
>                   ->setFrom('saharab...@domix.in')
>                   ->setTo('saharab...@domix.in')
>
> ->setBody($this->renderView('YunshangSalesBundle:Default:shippingEmail.txt.twig'));
>        $this->get('mailer')->send($message);
>
> When I execute these scripts, the webpage has no errors, but no email
> has been sent, I can not receive anything, and no email recorder via
> SymfonyProfiler.
>
> Any help?
>
>
> Regards,
>
> Haulyn Jason
> Founder, http://domix.in
> Rm. 807, Qilu Software Tower, Qilu Software Park
> 1 Shunhua Rd., High-Tech Development Zone
> Jinan, Shandong 250101, P. R. China
> Tel: +86 158 5410 3759
> Website: http://haulynjason.net
>
> --
> 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] Automatic selection which layout to use on AJAX calls?

2011-06-03 Thread FractalizeR
Hello.

I would like my AJAX site to be usable with Javascript disabled also. That 
means most pages can be loaded by AJAX calls and by normal page request 
calls in browser. Is there a way to automatically handle AJAX calls in 
symfony2 so that on AJAX calls templates are not decorated by the layout?

So far I have found only one way to do that - to use 
[url=http://www.twig-project.org/doc/templates.html#conditional-inheritance]Twig's
 
conditional inheritance[/url]. It will allow you to write something like 

{% extends isAjax ? "layout-ajax.html.twig" : "layout.html.twig" %}


But you have to pass isAjax variable to template. That's one line of code, 
of course, but does symfony2 have something built-in?

-- 
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] Using Sonata AdminBundle for a front end management panel

2011-06-03 Thread Thomas Rabaix
Duplicating base code is not ideal. It would be better on the long run to
have 2 differents applications, you are not forced to have a dedicaded
subdomain. You can initialize the Frontend and Backend from within a single
index.php by matching url.



On Thu, Jun 2, 2011 at 1:45 PM, keymaster  wrote:

> maybe... different namespaces...?
>
> Sonata/AdminBundleFrontEnd
> Sonata/AdminBundleBackEnd
>
> Code is same in each.
>
> In our config/config.yml, we map a different AdminClass and Entity for each
> of the two AdminBundles to use.
> We override the templates for AdminBundleFrontEnd as needed.
>
> Feasable?
>
>  --
> 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
>



-- 
Thomas Rabaix
http://rabaix.net

-- 
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] symfony1 + Symfony2

2011-06-03 Thread Denis.Gorbachev
Hello, everybody!

I've got an internal management system based on symfony1. However, the
client wants to add some major enhancements (so big that they would
require 4 months or so to develop). Is there any way to use both
symfony1 and Symfony2 in the same project?

-- 
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