[symfony-users] Re: Swift Mail 4.0.4

2009-09-25 Thread DEEPAK BHATIA
Thanks, I could resolve that. Yes we have to include swift_init.php.

On Sat, Sep 26, 2009 at 12:20 AM, Casey  wrote:

>
> In the latest version of swift there is a file called init_swift.php
> or something that will not be autoloaded so you have to use require.
> That could be part of the problem.
>
> On Sep 25, 6:27 am, DEEPAK BHATIA  wrote:
> > Sorry, I have both old version of swift mail and new version of swift
> mail
> > installed. I think this is causing some confusion.
> >
> > On Fri, Sep 25, 2009 at 6:36 PM, DEEPAK BHATIA  >wrote:
> >
> >
> >
> > > Hi,
> >
> > > I have installed the swift mail in the directory
> >
> > > /opt/lampp/htdocs/crb/lib/vendor
> >
> > > I have done php symfony cc many time but I am getting the error
> >
> > > *Fatal error*: Call to undefined method Swift_Message::newinstance() in
> *
> > > /opt/lampp/htdocs/crb/apps/tool/modules/new/actions/actions.class.php*
> on
> > > line *55*
> > > **
> > > *Regards*
> > > **
> > > *Deepak*
> >
>

--~--~-~--~~~---~--~~
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] SSL session and authentication status

2009-09-25 Thread Steve Sanyal

Hi,

I notice when I go from a non SSL URL to an SSL URL I lose my session
variables.  I've come to understand that this is because PHP uses
cookies for sessions, and this results in a new session being created
when switching to SSL.

So, I lose my session variables when I switch.  However, I notice that
when I signin and then am forwarded to a non SSL page - I still have
my signin credentials.  Is there some mechanism by which by my
authentication status is maintained?

Thanks,
Steve
--~--~-~--~~~---~--~~
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] running code on each request for a given app

2009-09-25 Thread Chris Renfrow

I want to track the referrer of a user until they go and create a cart
so that I can store the referrer in their cart and track my
conversions based on referrers and keywords. My entire site is in
symfony and I have a few custom plugins that I run for CMS pages and
an online store. I am looking for a way to execute some code an ANY
request for a given app. I would prefer to run this as soon as the
framework is done initializing and before the actions class is
executed. I could go into each plugin and create a preExecute but that
is just sloppy, symfony has to give you a way to this this better. Any
advice would be great, I spent the last hour searching so I figured I
would just ask at this point.

What I plan on doing is storing any foreign referrer in a session and
then when we create a new cart just dump the session in the database.

Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-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: strange error in sync usage

2009-09-25 Thread Dennis

Well, figured it out. Very wierd. All the tutorials that I've seen,
say to issue the command:

'symfony sync production' for the dry run,
  and
'symfony sync production go' for the real synchronizing process.

For me that gives the error I submitted this posting about.

For kicks today, I tried:
'symfony sync production --go'

AND IT WORKED, or is seeming to, as the directories that are local
have been created, (it's still churning along.

On Sep 23, 7:13 pm, Dennis  wrote:
> I started a new project, incrementally changing as I build up the
> final project. I tar.zipped the destination, moved that *.gz file out
> of the project directory. I copied the file 'properties.ini' from the
> original project, after checking it. I created the project and a
> module under localhost, got it working.
>
> But when I tried to sync it to the website, 'no workee'. It dry runs
> fine, asking me for the passwordd, showing the files that need to be
> uploaded. But when I type 'symfony sync production go', it fails. The
> error is:
>
>   The execution of task "project:deploy" failed.
>   - Too many arguments ("sync production go" given).
>
> It's really weird. This exact setup with the *.ini file worked 3 days
> ago. What is too many arguments? I copied the wording directly from a
> tutorial.
>
> BTW, I also tried 'php symfony sync production go' NO GOOD
>            also tried ' php synfony project:deploy --go' NO GOOD
>
> Contents of the properties.ini file (masked :-)
> 
> [symfony]
>   name=dev1
> [production]
>   host=site.tld
>   port=##
>   user=username
>   dir=/home/username/dev1/
--~--~-~--~~~---~--~~
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: sfDoctrineGuardPlugin installation with symfony 1.3

2009-09-25 Thread Jonathan Wage
Yes. You can get it from svn though. Once 1.3 is released we'll package it
up so you can install via PEAR.

http://svn.symfony-project.org/plugins/sfDoctrineGuardPlugin/trunk

- Jon

On Fri, Sep 25, 2009 at 5:25 PM, alessandro cinelli <
alessandro.cine...@gmail.com> wrote:

> sfPluginRestException: No release available for plugin
> "sfDoctrineGuardPlugin" in symfony13/lib/plugin/sfPearRestPlugin.class.php
> on line 123
>
> is that normal because symfony 1.3  is still under development?
>
>
>
> thanks
>
> cirpo
>
>
> >
>


-- 
Jonathan H. Wage (+1 415 992 5468)
Open Source Software Developer & Evangelist
sensiolabs.com | jwage.com | doctrine-project.org | symfony-project.org

You can contact Jonathan about Doctrine, Symfony and Open-Source or for
training, consulting, application development, or business related questions
at jonathan.w...@sensio.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] sfDoctrineGuardPlugin installation with symfony 1.3

2009-09-25 Thread alessandro cinelli
sfPluginRestException: No release available for plugin
"sfDoctrineGuardPlugin" in symfony13/lib/plugin/sfPearRestPlugin.class.php
on line 123

is that normal because symfony 1.3  is still under development?



thanks

cirpo

--~--~-~--~~~---~--~~
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: Swift Mail 4.0.4

2009-09-25 Thread Casey

In the latest version of swift there is a file called init_swift.php
or something that will not be autoloaded so you have to use require.
That could be part of the problem.

On Sep 25, 6:27 am, DEEPAK BHATIA  wrote:
> Sorry, I have both old version of swift mail and new version of swift mail
> installed. I think this is causing some confusion.
>
> On Fri, Sep 25, 2009 at 6:36 PM, DEEPAK BHATIA wrote:
>
>
>
> > Hi,
>
> > I have installed the swift mail in the directory
>
> > /opt/lampp/htdocs/crb/lib/vendor
>
> > I have done php symfony cc many time but I am getting the error
>
> > *Fatal error*: Call to undefined method Swift_Message::newinstance() in *
> > /opt/lampp/htdocs/crb/apps/tool/modules/new/actions/actions.class.php* on
> > line *55*
> > **
> > *Regards*
> > **
> > *Deepak*
--~--~-~--~~~---~--~~
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] Choise Widget Criteria

2009-09-25 Thread Radu Dragomir

Hello all,

Can someone explain how to user criteria options on
sfWidgetFormPropelChoice?

Regards,
Radu
--~--~-~--~~~---~--~~
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: sfGuardUser relations appear empty after $form->save()

2009-09-25 Thread Jake Barnes

Where is the bind() statement? Most of my code looks like this:

$this->form->bind($submittedValuesArray, $request->getFiles
('sf_guard_user_profile'));
if ($this->form->isValid())

When in doubt, put $submittedValuesArray in print_r() and see what you
really have.


On Sep 24, 6:34 am, johnnygri  wrote:
> Hi there, I'm replacing the processForm() method in the sfGuardUser
> Doctrine admin generator module. We have:
>
> if($form->isValid())
> {
>             $sf_guard_user = $form->save();
>
>             // I've added this next line, you'll see why
>             $sf_guard_user->reloadGroupsAndPermissions();
>
>             // and some veeery basic debugging:
>             print_r($sf_guard_user->groups->toArray());
>             exit;
>
> }
>
> When I add a new user and select one or more groups, it is
> successfully saved with the relations, viewing the DB or simply
> listing in admin generator proves this. I cannot figure out for the
> life of me however why the above outputs: Array() - it shouldn't be
> empty at this point should it, especially after I've 'forced' a reload
> of groups and permissions relations? I need access to this new user's
> selected groups so I can decide whether to raise a specific event or
> not.
>
> Thanks for any help in advance,
> John
--~--~-~--~~~---~--~~
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: Call For Information Re-organization [opinions needed]

2009-09-25 Thread Jake Barnes

> If you have a look at the API, of course you learn that you can pass an
> array of options to the widget constructors. But, if you look just after
> the method definition, ... surprise, all options are described. And this
> is true for all widgets and validators, all of them.

Thanks, Fabien. It is good to know that things are getting better. I
started using Symfony with version 1.1, when the the new forms
framework was severely under-documented. The 1.2 branch is better
documented, and it seems the documentation keeps getting better all
the time.




On Sep 25, 2:38 am, Fabien Potencier  wrote:
> zeev,
>
> I can understand that we need to re-organize the documentation, so that
> it is easier to find things, but your example is the worst possible ever.
>
> If you have a look at the API, of course you learn that you can pass an
> array of options to the widget constructors. But, if you look just after
> the method definition, ... surprise, all options are described. And this
> is true for all widgets and validators, all of them.
>
> Just one example for good measure:
>
> http://www.symfony-project.org/api/1_2/sfWidgetFormChoice#method_conf...
>
> Don't want to dive into the API? All widgets and validators are also
> described in the form book (appendices A for widgets and B for
> validators). If I take the same example as above, here is what we
> explain in the book:
>
> http://www.symfony-project.org/forms/1_2/en/A-Widgets#chapter_a_choic...
>
> All options are described in great details, with images to show you how
> they affect the rendering.
>
> Want to keep the reference offline? Just download the PDF:
>
> http://www.symfony-project.org/get/pdf/forms-1.2-en.pdf
>
> Want to read it in Italian, or Japanese. Still possible:
>
> http://www.symfony-project.org/forms/1_2/it/A-Widgets
>
> Can you explain a bit more what is missing here?
>
> I'm all for documentation enhancements and I'm well aware that we can do
> better. But please, be constructive.
>
> If something is missing, and some things are definitely missing, open a
> ticket, explain the issue, submit a patch if possible, and you will
> become part of making symfony better.
>
> If you want to make symfony better, stop complaining and do something
> about it. I'm always looking for people willing to help.
>
> Fabien
>
> --
> Fabien Potencier
> Sensio CEO - symfony lead developer
> sensiolabs.com | symfony-project.org | fabien.potencier.org
> Tél: +33 1 40 99 80 80
>
>
>
> zeek wrote:
>
> > Yes, that is a good example. All of the form widgets suffer from the
> > same problem - if you look at the documentation in the API, it teaches
> > you that the second parameter can be an array of options. But what
> > options are allowed in that array? I've looked around and never found
> > documentation on that - instead, one has to look around for the
> > occasional example, or maybe wade through the source code in hopes of
> > an answer.
>
> > On Sep 24, 3:21 am, eMerzh  wrote:
> >> I Totally agree.. for me the lack of a clear and complete api is the 
> >> biggest
> >> pbm of Sf...
>
> >> i have another example :
> >> herehttp://www.symfony-project.org/api/1_2/sfTestFunctionalBase#method_ch...
> >> you can find the documentation about checkResponseElement , and his 
> >> "option"
> >> parameter...
> >> But what could i set in this options? I'm forced to look at the code or
> >> so...
>
> >> If there is a technical platform for it wiki or something, i would be glad
> >> to help the symfony team to write, translate or add examples in the
> >> documentation
>
> >> On Thu, Sep 24, 2009 at 04:16, zeek  wrote:
>
> >>> On Sep 23, 8:10 am, fakingfantastic  wrote:
>  I recently had a discussion with Fabien about this topic, and he
>  suggested it would be best if I stage the debate here.
>  Has anyone ever felt like the information they needed to get on
>  Symfony was hard to find? Do you find that the information you need is
>  very-well documented on the site, but it takes a while to search for?
>  These are very big issues for me that over the last 6 months of me
>  learning the framework, have made it quite difficult.
> >>> The information is not optimized for fast lookup. It is optimized for
> >>> a beginner who has the time to spend a few weeks working through
> >>> tutorials. For someone with the time to read all the way through the
> >>> tutorials, the amount of information is terrific. But there is nothing
> >>> likewww.php.net. Often, I need to double check the parameters for a
> >>> PHP function such as date(). So I open a new browser window and I
> >>> type:
> >>>www.php.net/date
> >>> I would love something like that for Symfony.
> >>> And examples are needed. That is something thatwww.php.nethas. The
> >>> Symfony API is here, but there are no examples:
> >>>http://www.symfony-project.org/api/1_2/
> >>> How does find one's way into a deep object hierarchy? If you just
> >>> click on an object in the API, you get data, but 

[symfony-users] Re: PHP Fatal error: Uncaught exception 'sfStopException'

2009-09-25 Thread Jake Barnes


Why are you using forward? Why not redirect or why not simply call a
given method? Why not just set the template to whatever you want? Why
forward?


On Sep 24, 4:34 am, ollietb  wrote:
> Hi there
> I've noticed that my PHP logs are full of thousands of PHP Fatal
> error: Uncaught exception 'sfStopException' errors whenever an action
> is forwarded or redirected. It's making it hard for me to debug
> errors. The offending code is in the sfAction class. Here is one
> example.
>
>   public function forward($module, $action)
>   {
>
>     $this->getController()->forward($module, $action);
>
>     throw new sfStopException();
>   }
>
> The sfStopException is thrown but not caught. I'm thinking of using
> set_exception_handler() in the projectConfiguration class to override
> the default exception handler if an exception is not caught within a
> try/catch block. The exception handler would simply be a a function
> which die()s the current execution. Do any of you sfExperts have an
> opinion on this? Would it be better to override the forward method in
> my own Actions class?
> I'm running Symfony 1.1 on OS: Red Hat Enterprise Linux Server release
> 5.3 (Tikanga) 54 and PHP Version: 5.2.10 (eAccelerator is not
> installed)
> Thanks,
> -ollie
--~--~-~--~~~---~--~~
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: PHP Fatal error: Uncaught exception 'sfStopException'

2009-09-25 Thread Jake Barnes


I just did "grep -R catch *" on the core symfony files. These are the
catch clauses in the Symfony core:

http://lawrence.sds5.com/symfony_catch_clauses.txt

Not sure where to start to look, but I would assume that Symfony
normally catches the exceptions that it throws, and that your
situation is arising due to something specific that you've done. I
could be wrong, though


On Sep 24, 4:34 am, ollietb  wrote:
> Hi there
> I've noticed that my PHP logs are full of thousands of PHP Fatal
> error: Uncaught exception 'sfStopException' errors whenever an action
> is forwarded or redirected. It's making it hard for me to debug
> errors. The offending code is in the sfAction class. Here is one
> example.
>
>   public function forward($module, $action)
>   {
>
>     $this->getController()->forward($module, $action);
>
>     throw new sfStopException();
>   }
>
> The sfStopException is thrown but not caught. I'm thinking of using
> set_exception_handler() in the projectConfiguration class to override
> the default exception handler if an exception is not caught within a
> try/catch block. The exception handler would simply be a a function
> which die()s the current execution. Do any of you sfExperts have an
> opinion on this? Would it be better to override the forward method in
> my own Actions class?
> I'm running Symfony 1.1 on OS: Red Hat Enterprise Linux Server release
> 5.3 (Tikanga) 54 and PHP Version: 5.2.10 (eAccelerator is not
> installed)
> Thanks,
> -ollie
--~--~-~--~~~---~--~~
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: PHP Fatal error: Uncaught exception 'sfStopException'

2009-09-25 Thread zeek


I've never called forward(), but the documentation says "This method
stops the action. So, no code is executed after a call to this
method." I assume it is throwing the exception to stop the action. I
would think this propagates up and is caught at a higher level, though
apparently that is not happening for you. Possibly Symfony wants you
to consciously catch and handle this, when you call forward()?


On Sep 24, 4:34 am, ollietb  wrote:
> Hi there
> I've noticed that my PHP logs are full of thousands of PHP Fatal
> error: Uncaught exception 'sfStopException' errors whenever an action
> is forwarded or redirected. It's making it hard for me to debug
> errors. The offending code is in the sfAction class. Here is one
> example.
>
>   public function forward($module, $action)
>   {
>
>     $this->getController()->forward($module, $action);
>
>     throw new sfStopException();
>   }
>
> The sfStopException is thrown but not caught. I'm thinking of using
> set_exception_handler() in the projectConfiguration class to override
> the default exception handler if an exception is not caught within a
> try/catch block. The exception handler would simply be a a function
> which die()s the current execution. Do any of you sfExperts have an
> opinion on this? Would it be better to override the forward method in
> my own Actions class?
> I'm running Symfony 1.1 on OS: Red Hat Enterprise Linux Server release
> 5.3 (Tikanga) 54 and PHP Version: 5.2.10 (eAccelerator is not
> installed)
> Thanks,
> -ollie
--~--~-~--~~~---~--~~
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] plugin with form build-form

2009-09-25 Thread smellycat37

Hello,

I want to create a plugin with forms classes
When I execute the task ./symfony doctrine:build-form, symfony creates
forms class files with names as '#MyModelClass#Form.class.php' in
/lib/
  form/
doctrine/
  myPlugin/
& base forms class files with names as
'Base#MyModelClass#Form.class.php' in
/lib/
  form/
doctrine/
  myPlugin/
 base/

The problem is that ./symfony doctrine:build-form generates also forms
class files with names as 'Plugin#MyModelClass#Form.class.php' in
/lib/
  form/
doctrine/
And I wouldn't... That's weird, no?
do you know why these classes are created? do you know how to do for
not generate them?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-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 sfTesterUser::isAttribute()?

2009-09-25 Thread J_Wesker

I have been trying to do some functional tests on my user after login
in. I read here (http://www.symfony-project.org/cookbook/1_2/en/test-
application#chapter_98d28ad443a8f32769300bb40973ec7d_sub_user_tester)
that the sfTesterUser::isAttribute() can test the value of an
attribute, and in the example shown the sfguard_user_id as the
parameter...

$browser->
  get('/')->

  with('user')->begin()->
isCulture('fr')->
isAuthenticated(true)->
hasCredential('admin')->
isAttribute('sfguard_user_id', '3')->
isFlash('notice', '/foo/')->
  end()
;

I would like to know why I'm getting a NULL value on this test, since
I'm using sfGuardPlugin. Using the SWDT I saw this values on the user
parameters:

attributeHolder:
  sfGuardSecurityUser: { user_id: 12 }
  symfony/user/sfUser/attributes: {  }
culture: en

When I saw that { user_id: }, I thought that would be the pararameter
for the test, but also get the NULL value on this parameter... so,
what should be the right one to compare?

Thanks in advance for any contribution°!
--~--~-~--~~~---~--~~
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: Call For Information Re-organization [opinions needed]

2009-09-25 Thread pcummins

+1 for listing array options for function arguments!

On Sep 25, 5:14 am, Romain de Wolff  wrote:
> Comments is a good idea!
> Oh and do you knowhttp://www.gotapi.com? The symfony section allows you to
> browse the API quickly.
>
> On Fri, Sep 25, 2009 at 8:50 AM, Gareth McCumskey wrote:
>
>
>
> > I think taking a note from the php.net site (the PHP manual) is a good
> > idea. The search feature in the php.net is incredibly useful and helps you
> > target any part of PHP with a simple search for function, feature or class
> > names. Having some "sitewide" search functionality for a specific part of
> > symfony such as being able to track down "Forms", as an example, and having
> > it go to a section that discusses the various components of the forms
> > framework. Or Authentication, things like that. I know the API documentation
> > exists but to have that wrapped in a section that deals with everything
> > related such as examples etc.
>
> > Allowing comments would also be great. Often the php.net description of a
> > function or feature isn't that clear but then the user comments help clear
> > things up.
>
> > Just my 2 cents.
>
> > On Wed, Sep 23, 2009 at 2:10 PM, fakingfantastic 
> > wrote:
>
> >> I recently had a discussion with Fabien about this topic, and he
> >> suggested it would be best if I stage the debate here.
>
> >> Has anyone ever felt like the information they needed to get on
> >> Symfony was hard to find? Do you find that the information you need is
> >> very-well documented on the site, but it takes a while to search for?
> >> These are very big issues for me that over the last 6 months of me
> >> learning the framework, have made it quite difficult.
>
> >> Do not get me wrong: I am not say "Symfony isn't well documented" (I
> >> made that mistake when talking with Fabien). What I am saying is
> >> Symfony-Project.org, for whatever reason, is always very difficult for
> >> me to search through to find what I am looking for. I feel that it has
> >> to do with the way the content is organized on the site. It doesn't
> >> feel very compartmentalized to me. When I need to find out some
> >> information on the framework, I seem to always have the same 3 issues:
> >> "What am I trying to find out", "Where do I search to find the
> >> information", and "Is this information outdated"?
>
> >> For now, I was to leave what I am asking a little vague, in hopes to
> >> see what that naturally brings out in people about this. My ultimate
> >> goal would be trying to put together an initiative to re-organize and
> >> enhance the site to make it more "intuative" (if that's the right
> >> word) for new-comers and seasoned users alike.
>
> >> Feel free to irc me at fakingfantastic aswell, i'm usually in #symfony.
>
> > --
> > Gareth McCumskey
> >http://garethmccumskey.blogspot.com
> > twitter: @garethmcc
>
> --
>
> Joan Crawford
> - "I, Joan Crawford, I believe in the dollar. Everything I earn, I
> spend."
--~--~-~--~~~---~--~~
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: Fatal Error in actions.class.php

2009-09-25 Thread Eno

On Fri, 25 Sep 2009, DEEPAK BHATIA wrote:

> "Fatal Error: Call to a member function getEmpId() on a non-object in
> /opt/lampp/htdocs/crb/apps/tool/modules/book/actions/actions.class.php at
> line 2370 which is the highlighted pink line above.
> 
> My opinion
> 
> My point is that session between web browser and server has been broken
> hence the $this->getUser()->getAttribute('allnames'); is returning a null
> value but if it is null then we should get PropelException.

Yes, null is not an object :-)

You should always check that the object returned is not null *before* 
trying to use it.



-- 



--~--~-~--~~~---~--~~
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: User session variables

2009-09-25 Thread Eno

On Fri, 25 Sep 2009, DEEPAK BHATIA wrote:

> So, I am sorry to repeat again
> 
> Then default value is returned whenever the session variable is null.


http://www.symfony-project.org/book/1_2/06-Inside-the-Controller-Layer#chapter_06_sub_accessing_the_user_session


-- 



--~--~-~--~~~---~--~~
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: Swift Mail 4.0.4

2009-09-25 Thread DEEPAK BHATIA
Sorry, I have both old version of swift mail and new version of swift mail
installed. I think this is causing some confusion.

On Fri, Sep 25, 2009 at 6:36 PM, DEEPAK BHATIA wrote:

> Hi,
>
> I have installed the swift mail in the directory
>
> /opt/lampp/htdocs/crb/lib/vendor
>
> I have done php symfony cc many time but I am getting the error
>
> *Fatal error*: Call to undefined method Swift_Message::newinstance() in *
> /opt/lampp/htdocs/crb/apps/tool/modules/new/actions/actions.class.php* on
> line *55*
> **
> *Regards*
> **
> *Deepak*
>

--~--~-~--~~~---~--~~
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] Swift Mail 4.0.4

2009-09-25 Thread DEEPAK BHATIA
Hi,

I have installed the swift mail in the directory

/opt/lampp/htdocs/crb/lib/vendor

I have done php symfony cc many time but I am getting the error

*Fatal error*: Call to undefined method Swift_Message::newinstance() in *
/opt/lampp/htdocs/crb/apps/tool/modules/new/actions/actions.class.php* on
line *55*
**
*Regards*
**
*Deepak*

--~--~-~--~~~---~--~~
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: Symfony has definitely become too complicated framework

2009-09-25 Thread Eno

On Fri, 25 Sep 2009, michael.pie...@googlemail.com wrote:

> So maybe the beginner tutorials should start with simple things, like
> handling a hand written html form and then later introduce some
> extended features like sfForms, which makes your life easier.

Actually it does: the definitive guide does not talk about the new forms 
framework but uses the old helpers. There is an explanation at the top 
mentioning the new forms framework for those that are interested.

Once upon a time, the definitive guide was the *only* symfony book. Maybe 
it should be put at the top of the page so its the first thing beginners 
will read? I read that book several times when starting out with symfony 
and its clear from the questions posted on this list that there are a lot 
of people who have never read it even once.



-- 



--~--~-~--~~~---~--~~
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: Symfony has definitely become too complicated framework

2009-09-25 Thread Eno

On Thu, 24 Sep 2009, bghost wrote:

> What is the limit? How deep a developer should go with the "re-
> factoring"?
> Is it necessary to split templates into numerous small fragments

Not necessary no. Possible yes. Useful, yes sometimes.

e.g. Same form will be used for both new and edit actions, so it doesn't 
make sense to duplicate code in two templates (two places to edit to fix 
anything), so making it a partial/component makes sense. Im sure even you 
can see the benefit of being able to fix something in ONE place rather 
than having to go through all the templates.

This has nothing to do with the language or framework - its just common 
sense, its why we use constants and variables instead of hard-coding 
values right? This is just basic stuff you learn as a beginner in 
programming.

> and
> thus make
> them an extremely confusing and difficult to track?

Not confusing if you actually learn the framework - there is a logic 
behind it.

> I heard many
> times: "Yes,
> re-factore it ...yes, yes, yes..hre-factore it!" even if that
> is justified or not.

Im guessing you think it is not justified, or dont understand why.

> Most of you said that Symfony Framework enables developers to
> concentrate
> on business logic? Yes, that's OK. I just wanted to warn that in these
> efforts,
> Symfony developers are exaggerating a bit, which resulted with the
> intricate
> logic of the Symfony framework that hides the flow of the application
> to the level
> where it is very difficult to understand and monitor the application.

You really can only say that if you have learnt several frameworks and 
understand them. Go read up on Rails or Django for some perspective. Or 
try writing your own framework - you will spend a *lot* of time writing 
database or view functions, or end up writing those as libraries (if 
you're good, they will be reusable, if not you will be rewriting them 
for every project). When we say symfony allows us to concentrate on 
business logic, its because we dont have to write the database layer or 
template layer. In other words, while you're busy writing the database 
layer, i.e. concentrating on the 'plumbing', we're already writing 
actions/templates for our application, i.e. picking furniture and looking 
at swatches.

I know all these design patterns might be 'scary' but only if you're not 
willing to keep an open mind and learn new things.

For the record, Im probably come from a similar background (i.e. BASIC, 
assembly language, Pascal, C, Java, Perl, PHP, Ruby), but the day I stop 
learning is when Im dead or no longer in technology.



-- 


--~--~-~--~~~---~--~~
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] sfPropelApplyPlugin Instructions

2009-09-25 Thread Sorom Uzomah
Hi everyone,

I'm looking at using the sfPropelApply plugin in an ongoing project. I've 
viewed the plugin's page and gone through the sfDoctrineApply plugin for 
instructions. However I want to find out if there's anywhere else online where 
I can get direct implementation instructions for the sfPropelApply plugin. 

I want to be careful so that I dont spend unneeded time trying to work out 
something that can actually be sorted out in an easier way. 

And I just want to say about the "symfony is too complicated" thread: I picked 
up symfony , mid last year, and I've been able to develop and deploy intranet 
applications using it. It's excellent, straightforward, once you take the time 
to read and learn. To put it all in context, imagine how much you'd have to pay 
for a framework with the same capabilities if you had to pay. So thanks to the 
sensio labs team and everyone who's put in the time and effort to create this. 
I definitely look forward to a time when I can contribute something really 
valuable, back to the community. Thanks guys.



  
--~--~-~--~~~---~--~~
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: User session variables

2009-09-25 Thread DEEPAK BHATIA
So, I am sorry to repeat again

Then default value is returned whenever the session variable is null.

If it is iether null due to session expiry or forcefully made null.
On Fri, Sep 25, 2009 at 5:11 PM, Gareth McCumskey wrote:

> Yes it will. If that session variable does not exist (i.e. = null) it
> returns default.
>
>
> On Fri, Sep 25, 2009 at 1:32 PM, DEEPAK BHATIA wrote:
>
>> You mean that we use the default value when we need to else we use session
>> variable value.
>>
>> But if session variable is null, it will still not return the default
>> value.
>> Thanks
>>   On Fri, Sep 25, 2009 at 4:46 PM, david wrote:
>>
>>>
>>> You don't.  You pick sensible defaults where it's needed and where they
>>> are not, or something is mandatory - you return null.
>>>
>>> Examples:
>>>   Your site has multiple templates (look & feel) - if the user doesn't
>>> have something selected then you'll have a default (pretty in pink).
>>>   Your site needs the users email address - there isn't a sensible
>>> default
>>> - so you'll return null which will trigger a notification that they need
>>> to record one.
>>>
>>> On Fri, 25 Sep 2009 13:11:45 +0200, DEEPAK BHATIA
>>>   wrote:
>>>
>>> > So, the solution is to check whether getAttribute is returning the
>>> > default
>>> > value which could be due to two reasons
>>> >
>>> > 1. Session timeout
>>> > 2. User still not has set the session variable
>>> >
>>> > How do we find out if default is returned for which reason ? I hope I
>>> am
>>> > making sense.
>>> >
>>> > Thanks
>>> >
>>> > Deepak
>>> >
>>> > On Fri, Sep 25, 2009 at 4:36 PM, Gareth McCumskey
>>> > wrote:
>>> >
>>> >> Like I said, on your login action, set the unset your own session
>>> >> variables
>>> >> if you don't want the user to retain session variables on timeout of
>>> >> session. Process is like this:
>>> >>
>>> >> - User logs in the first time.
>>> >> - During the course using the application your code sets certain
>>> session
>>> >> variables.
>>> >> - User walks away and while he is away the session times out
>>> >> - When he comes back and tries to carry on using the application, he
>>> >> gets
>>> >> redirected to login screen because of session timeout.
>>> >> - When he resubmits his credentials, your login action will unset any
>>> >> session variables he may have created in his previous session.
>>> >>
>>> >> That way, whether the user logs out manually or gets timed out,
>>> session
>>> >> variables are unset each time.
>>> >>
>>> >> The advantage of this approach is simply that you then have full
>>> control
>>> >> over what session variables a user can "keep" after timeout or logout.
>>> >>
>>> >>
>>> >> On Fri, Sep 25, 2009 at 12:38 PM, DEEPAK BHATIA
>>> >> wrote:
>>> >>
>>> >>> Thanks Gareth.
>>> >>>
>>> >>> The point I am seeing is that in case user has logged out while the
>>> >>> session had not expired, user can still get back the session
>>> variables
>>> >>> he
>>> >>> has created if logs-in again.
>>> >>>
>>> >>> However say user opened a web page and forgot to do anything with
>>> that
>>> >>> web
>>> >>> page and the session expired then as soon as user starts, user will
>>> >>> get NULL
>>> >>> values from the session variables. Means the session variable will
>>> not
>>> >>> be
>>> >>> set to anything.
>>> >>>
>>> >>> If session variable is not set to anything then the default value is
>>> >>> returned.
>>> >>>
>>> >>> Is my algorithm of understanding session variables as per your
>>> >>> explaination ?
>>> >>>
>>> >>> Thanks
>>> >>>
>>> >>> Deepak Bhatia
>>> >>>
>>> >>>
>>> >>>
>>> >>>
>>> >>>
>>> >>>
>>> >>>  On Fri, Sep 25, 2009 at 4:01 PM, Gareth McCumskey
>>> >>> wrote:
>>> >>>
>>>  The session variables are not cleared automatically. If a user logs
>>>  out
>>>  only the symfony authenticated variable is set to false and all the
>>>  session
>>>  data you added to the user session is still available.
>>> 
>>>  This is actually a GOOD thing. In our example, our interface uses a
>>>  tabbing system within the application stored in session. When a user
>>>  logs
>>>  out and logs back in he still has the tabs he made previously. There
>>>  are
>>>  other things that we manually remove from session on log out/log in.
>>> 
>>>  One way to ensure that the users session is emptied when he logs in
>>>  again
>>>  is on login manually set those session variables using
>>>  sfUser->setParameter() to nothing.
>>> 
>>> 
>>>  On Fri, Sep 25, 2009 at 12:13 PM, DEEPAK BHATIA
>>>  >>  > wrote:
>>> 
>>> > "The session object for the current user is accessed in the action
>>> > with
>>> > the getUser() method and is an instance of the sfUser class. This
>>> > class
>>> > contains a parameter holder that allows you to store any user
>>> > attribute in
>>> > it. This data will be available to other requests until the end of
>>> > the user
>>> > session, as shown in Li

[symfony-users] Re: User session variables

2009-09-25 Thread Gareth McCumskey
Yes it will. If that session variable does not exist (i.e. = null) it
returns default.

On Fri, Sep 25, 2009 at 1:32 PM, DEEPAK BHATIA wrote:

> You mean that we use the default value when we need to else we use session
> variable value.
>
> But if session variable is null, it will still not return the default
> value.
> Thanks
> On Fri, Sep 25, 2009 at 4:46 PM, david wrote:
>
>>
>> You don't.  You pick sensible defaults where it's needed and where they
>> are not, or something is mandatory - you return null.
>>
>> Examples:
>>   Your site has multiple templates (look & feel) - if the user doesn't
>> have something selected then you'll have a default (pretty in pink).
>>   Your site needs the users email address - there isn't a sensible default
>> - so you'll return null which will trigger a notification that they need
>> to record one.
>>
>> On Fri, 25 Sep 2009 13:11:45 +0200, DEEPAK BHATIA
>>   wrote:
>>
>> > So, the solution is to check whether getAttribute is returning the
>> > default
>> > value which could be due to two reasons
>> >
>> > 1. Session timeout
>> > 2. User still not has set the session variable
>> >
>> > How do we find out if default is returned for which reason ? I hope I am
>> > making sense.
>> >
>> > Thanks
>> >
>> > Deepak
>> >
>> > On Fri, Sep 25, 2009 at 4:36 PM, Gareth McCumskey
>> > wrote:
>> >
>> >> Like I said, on your login action, set the unset your own session
>> >> variables
>> >> if you don't want the user to retain session variables on timeout of
>> >> session. Process is like this:
>> >>
>> >> - User logs in the first time.
>> >> - During the course using the application your code sets certain
>> session
>> >> variables.
>> >> - User walks away and while he is away the session times out
>> >> - When he comes back and tries to carry on using the application, he
>> >> gets
>> >> redirected to login screen because of session timeout.
>> >> - When he resubmits his credentials, your login action will unset any
>> >> session variables he may have created in his previous session.
>> >>
>> >> That way, whether the user logs out manually or gets timed out, session
>> >> variables are unset each time.
>> >>
>> >> The advantage of this approach is simply that you then have full
>> control
>> >> over what session variables a user can "keep" after timeout or logout.
>> >>
>> >>
>> >> On Fri, Sep 25, 2009 at 12:38 PM, DEEPAK BHATIA
>> >> wrote:
>> >>
>> >>> Thanks Gareth.
>> >>>
>> >>> The point I am seeing is that in case user has logged out while the
>> >>> session had not expired, user can still get back the session variables
>> >>> he
>> >>> has created if logs-in again.
>> >>>
>> >>> However say user opened a web page and forgot to do anything with that
>> >>> web
>> >>> page and the session expired then as soon as user starts, user will
>> >>> get NULL
>> >>> values from the session variables. Means the session variable will not
>> >>> be
>> >>> set to anything.
>> >>>
>> >>> If session variable is not set to anything then the default value is
>> >>> returned.
>> >>>
>> >>> Is my algorithm of understanding session variables as per your
>> >>> explaination ?
>> >>>
>> >>> Thanks
>> >>>
>> >>> Deepak Bhatia
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>  On Fri, Sep 25, 2009 at 4:01 PM, Gareth McCumskey
>> >>> wrote:
>> >>>
>>  The session variables are not cleared automatically. If a user logs
>>  out
>>  only the symfony authenticated variable is set to false and all the
>>  session
>>  data you added to the user session is still available.
>> 
>>  This is actually a GOOD thing. In our example, our interface uses a
>>  tabbing system within the application stored in session. When a user
>>  logs
>>  out and logs back in he still has the tabs he made previously. There
>>  are
>>  other things that we manually remove from session on log out/log in.
>> 
>>  One way to ensure that the users session is emptied when he logs in
>>  again
>>  is on login manually set those session variables using
>>  sfUser->setParameter() to nothing.
>> 
>> 
>>  On Fri, Sep 25, 2009 at 12:13 PM, DEEPAK BHATIA
>>  >  > wrote:
>> 
>> > "The session object for the current user is accessed in the action
>> > with
>> > the getUser() method and is an instance of the sfUser class. This
>> > class
>> > contains a parameter holder that allows you to store any user
>> > attribute in
>> > it. This data will be available to other requests until the end of
>> > the user
>> > session, as shown in Listing 6-15."
>> >
>> > 
>> >
>> > Hi,
>> >
>> > I have taken above from the Chapter 6 - Inside The Controller Layer.
>> >
>> > When a the user sessions ends, the session variables will have the
>> > values returned as "NULL", I guess.
>> >
>> > So is it safe to redirect the action to error template in c

[symfony-users] Re: User session variables

2009-09-25 Thread DEEPAK BHATIA
You mean that we use the default value when we need to else we use session
variable value.

But if session variable is null, it will still not return the default value.
Thanks
On Fri, Sep 25, 2009 at 4:46 PM, david  wrote:

>
> You don't.  You pick sensible defaults where it's needed and where they
> are not, or something is mandatory - you return null.
>
> Examples:
>   Your site has multiple templates (look & feel) - if the user doesn't
> have something selected then you'll have a default (pretty in pink).
>   Your site needs the users email address - there isn't a sensible default
> - so you'll return null which will trigger a notification that they need
> to record one.
>
> On Fri, 25 Sep 2009 13:11:45 +0200, DEEPAK BHATIA
>   wrote:
>
> > So, the solution is to check whether getAttribute is returning the
> > default
> > value which could be due to two reasons
> >
> > 1. Session timeout
> > 2. User still not has set the session variable
> >
> > How do we find out if default is returned for which reason ? I hope I am
> > making sense.
> >
> > Thanks
> >
> > Deepak
> >
> > On Fri, Sep 25, 2009 at 4:36 PM, Gareth McCumskey
> > wrote:
> >
> >> Like I said, on your login action, set the unset your own session
> >> variables
> >> if you don't want the user to retain session variables on timeout of
> >> session. Process is like this:
> >>
> >> - User logs in the first time.
> >> - During the course using the application your code sets certain session
> >> variables.
> >> - User walks away and while he is away the session times out
> >> - When he comes back and tries to carry on using the application, he
> >> gets
> >> redirected to login screen because of session timeout.
> >> - When he resubmits his credentials, your login action will unset any
> >> session variables he may have created in his previous session.
> >>
> >> That way, whether the user logs out manually or gets timed out, session
> >> variables are unset each time.
> >>
> >> The advantage of this approach is simply that you then have full control
> >> over what session variables a user can "keep" after timeout or logout.
> >>
> >>
> >> On Fri, Sep 25, 2009 at 12:38 PM, DEEPAK BHATIA
> >> wrote:
> >>
> >>> Thanks Gareth.
> >>>
> >>> The point I am seeing is that in case user has logged out while the
> >>> session had not expired, user can still get back the session variables
> >>> he
> >>> has created if logs-in again.
> >>>
> >>> However say user opened a web page and forgot to do anything with that
> >>> web
> >>> page and the session expired then as soon as user starts, user will
> >>> get NULL
> >>> values from the session variables. Means the session variable will not
> >>> be
> >>> set to anything.
> >>>
> >>> If session variable is not set to anything then the default value is
> >>> returned.
> >>>
> >>> Is my algorithm of understanding session variables as per your
> >>> explaination ?
> >>>
> >>> Thanks
> >>>
> >>> Deepak Bhatia
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>  On Fri, Sep 25, 2009 at 4:01 PM, Gareth McCumskey
> >>> wrote:
> >>>
>  The session variables are not cleared automatically. If a user logs
>  out
>  only the symfony authenticated variable is set to false and all the
>  session
>  data you added to the user session is still available.
> 
>  This is actually a GOOD thing. In our example, our interface uses a
>  tabbing system within the application stored in session. When a user
>  logs
>  out and logs back in he still has the tabs he made previously. There
>  are
>  other things that we manually remove from session on log out/log in.
> 
>  One way to ensure that the users session is emptied when he logs in
>  again
>  is on login manually set those session variables using
>  sfUser->setParameter() to nothing.
> 
> 
>  On Fri, Sep 25, 2009 at 12:13 PM, DEEPAK BHATIA
>    > wrote:
> 
> > "The session object for the current user is accessed in the action
> > with
> > the getUser() method and is an instance of the sfUser class. This
> > class
> > contains a parameter holder that allows you to store any user
> > attribute in
> > it. This data will be available to other requests until the end of
> > the user
> > session, as shown in Listing 6-15."
> >
> > 
> >
> > Hi,
> >
> > I have taken above from the Chapter 6 - Inside The Controller Layer.
> >
> > When a the user sessions ends, the session variables will have the
> > values returned as "NULL", I guess.
> >
> > So is it safe to redirect the action to error template in case
> > session
> > variables returns NULL ?
> >
> > For example, in the line of code below, I assume that I get something
> > from 'allnames' session variable. However if it is "NULL", means the
> > session
> > is broken now.
> >
> > $current_name = $this->

[symfony-users] Re: User session variables

2009-09-25 Thread david

You don't.  You pick sensible defaults where it's needed and where they  
are not, or something is mandatory - you return null.

Examples:
   Your site has multiple templates (look & feel) - if the user doesn't  
have something selected then you'll have a default (pretty in pink).
   Your site needs the users email address - there isn't a sensible default  
- so you'll return null which will trigger a notification that they need  
to record one.

On Fri, 25 Sep 2009 13:11:45 +0200, DEEPAK BHATIA  
 wrote:

> So, the solution is to check whether getAttribute is returning the  
> default
> value which could be due to two reasons
>
> 1. Session timeout
> 2. User still not has set the session variable
>
> How do we find out if default is returned for which reason ? I hope I am
> making sense.
>
> Thanks
>
> Deepak
>
> On Fri, Sep 25, 2009 at 4:36 PM, Gareth McCumskey  
> wrote:
>
>> Like I said, on your login action, set the unset your own session  
>> variables
>> if you don't want the user to retain session variables on timeout of
>> session. Process is like this:
>>
>> - User logs in the first time.
>> - During the course using the application your code sets certain session
>> variables.
>> - User walks away and while he is away the session times out
>> - When he comes back and tries to carry on using the application, he  
>> gets
>> redirected to login screen because of session timeout.
>> - When he resubmits his credentials, your login action will unset any
>> session variables he may have created in his previous session.
>>
>> That way, whether the user logs out manually or gets timed out, session
>> variables are unset each time.
>>
>> The advantage of this approach is simply that you then have full control
>> over what session variables a user can "keep" after timeout or logout.
>>
>>
>> On Fri, Sep 25, 2009 at 12:38 PM, DEEPAK BHATIA  
>> wrote:
>>
>>> Thanks Gareth.
>>>
>>> The point I am seeing is that in case user has logged out while the
>>> session had not expired, user can still get back the session variables  
>>> he
>>> has created if logs-in again.
>>>
>>> However say user opened a web page and forgot to do anything with that  
>>> web
>>> page and the session expired then as soon as user starts, user will  
>>> get NULL
>>> values from the session variables. Means the session variable will not  
>>> be
>>> set to anything.
>>>
>>> If session variable is not set to anything then the default value is
>>> returned.
>>>
>>> Is my algorithm of understanding session variables as per your
>>> explaination ?
>>>
>>> Thanks
>>>
>>> Deepak Bhatia
>>>
>>>
>>>
>>>
>>>
>>>
>>>  On Fri, Sep 25, 2009 at 4:01 PM, Gareth McCumskey  
>>> wrote:
>>>
 The session variables are not cleared automatically. If a user logs  
 out
 only the symfony authenticated variable is set to false and all the  
 session
 data you added to the user session is still available.

 This is actually a GOOD thing. In our example, our interface uses a
 tabbing system within the application stored in session. When a user  
 logs
 out and logs back in he still has the tabs he made previously. There  
 are
 other things that we manually remove from session on log out/log in.

 One way to ensure that the users session is emptied when he logs in  
 again
 is on login manually set those session variables using
 sfUser->setParameter() to nothing.


 On Fri, Sep 25, 2009 at 12:13 PM, DEEPAK BHATIA  
 >>> > wrote:

> "The session object for the current user is accessed in the action  
> with
> the getUser() method and is an instance of the sfUser class. This  
> class
> contains a parameter holder that allows you to store any user  
> attribute in
> it. This data will be available to other requests until the end of  
> the user
> session, as shown in Listing 6-15."
>
> 
>
> Hi,
>
> I have taken above from the Chapter 6 - Inside The Controller Layer.
>
> When a the user sessions ends, the session variables will have the
> values returned as "NULL", I guess.
>
> So is it safe to redirect the action to error template in case  
> session
> variables returns NULL ?
>
> For example, in the line of code below, I assume that I get something
> from 'allnames' session variable. However if it is "NULL", means the  
> session
> is broken now.
>
> $current_name = $this->getUser()->getAttribute('allnames');
>
> Please suggest suitably.
>
> Thanks
>
> Deepak Bhatia
>
>
>
>
>


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


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


-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/m

[symfony-users] Re: User session variables

2009-09-25 Thread DEEPAK BHATIA
So, the solution is to check whether getAttribute is returning the default
value which could be due to two reasons

1. Session timeout
2. User still not has set the session variable

How do we find out if default is returned for which reason ? I hope I am
making sense.

Thanks

Deepak

On Fri, Sep 25, 2009 at 4:36 PM, Gareth McCumskey wrote:

> Like I said, on your login action, set the unset your own session variables
> if you don't want the user to retain session variables on timeout of
> session. Process is like this:
>
> - User logs in the first time.
> - During the course using the application your code sets certain session
> variables.
> - User walks away and while he is away the session times out
> - When he comes back and tries to carry on using the application, he gets
> redirected to login screen because of session timeout.
> - When he resubmits his credentials, your login action will unset any
> session variables he may have created in his previous session.
>
> That way, whether the user logs out manually or gets timed out, session
> variables are unset each time.
>
> The advantage of this approach is simply that you then have full control
> over what session variables a user can "keep" after timeout or logout.
>
>
> On Fri, Sep 25, 2009 at 12:38 PM, DEEPAK BHATIA 
> wrote:
>
>> Thanks Gareth.
>>
>> The point I am seeing is that in case user has logged out while the
>> session had not expired, user can still get back the session variables he
>> has created if logs-in again.
>>
>> However say user opened a web page and forgot to do anything with that web
>> page and the session expired then as soon as user starts, user will get NULL
>> values from the session variables. Means the session variable will not be
>> set to anything.
>>
>> If session variable is not set to anything then the default value is
>> returned.
>>
>> Is my algorithm of understanding session variables as per your
>> explaination ?
>>
>> Thanks
>>
>> Deepak Bhatia
>>
>>
>>
>>
>>
>>
>>  On Fri, Sep 25, 2009 at 4:01 PM, Gareth McCumskey 
>> wrote:
>>
>>> The session variables are not cleared automatically. If a user logs out
>>> only the symfony authenticated variable is set to false and all the session
>>> data you added to the user session is still available.
>>>
>>> This is actually a GOOD thing. In our example, our interface uses a
>>> tabbing system within the application stored in session. When a user logs
>>> out and logs back in he still has the tabs he made previously. There are
>>> other things that we manually remove from session on log out/log in.
>>>
>>> One way to ensure that the users session is emptied when he logs in again
>>> is on login manually set those session variables using
>>> sfUser->setParameter() to nothing.
>>>
>>>
>>> On Fri, Sep 25, 2009 at 12:13 PM, DEEPAK BHATIA >> > wrote:
>>>
 "The session object for the current user is accessed in the action with
 the getUser() method and is an instance of the sfUser class. This class
 contains a parameter holder that allows you to store any user attribute in
 it. This data will be available to other requests until the end of the user
 session, as shown in Listing 6-15."

 

 Hi,

 I have taken above from the Chapter 6 - Inside The Controller Layer.

 When a the user sessions ends, the session variables will have the
 values returned as "NULL", I guess.

 So is it safe to redirect the action to error template in case session
 variables returns NULL ?

 For example, in the line of code below, I assume that I get something
 from 'allnames' session variable. However if it is "NULL", means the 
 session
 is broken now.

 $current_name = $this->getUser()->getAttribute('allnames');

 Please suggest suitably.

 Thanks

 Deepak Bhatia





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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-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: Symfony has definitely become too complicated framework

2009-09-25 Thread david

Applications you develop can quickly grow out of the baby-steps ways and  
into full-blown adolescence and a good primary school gets you some life  
skills, while preparing you for more advanced learning.

It's better to take a little longer to learn the basics of how and why  
everything hooks together, than to find yourself completely lost later.

The forms framework isn't just about having things reusable; it's also  
about having something repeatable, testable & consistent.

Symfony promotes rapid prototyping - but there's a flip side.  When you  
have a demo, it often quickly goes into production.

On Fri, 25 Sep 2009 12:42:18 +0200, michael.pie...@googlemail.com  
 wrote:

>
> So maybe the beginner tutorials should start with simple things, like
> handling a hand written html form and then later introduce some
> extended features like sfForms, which makes your life easier. This is
> done with security.yml and credentials: if you need more, you can use
> sfGuard. The good thing about Jobeet is that it shows how fast you can
> develop applications with symfony. But it hides the fact, that you
> have to know very much about the different components, when you try to
> change or add something there ...
>
> Well, i think it is really hard to satisfy everyone ...
>
> Michael
>
>
> On 25 Sep., 12:27, Gareth McCumskey  wrote:
>> I don't use the sfGuard either, just the sfBasicSecurityUser, and it  
>> works
>> well enough and is really not all that complicated. I don't use the  
>> admin
>> generator as I feel it creates elements that are far too generic for my
>> purposes and usually my admin and frontend systems are too integrated.
>>
>> Just like Michael said, thats the beauty of symfony. As a newcomer you  
>> can
>> start using what you want when you want it. Use compat_10 settings to  
>> stick
>> to form helpers instead of forms framework and then switch to the forms
>> framework when you are ready. A lot of things are this way in symfony  
>> and
>> you are in no way compelled to use every plugin/feature that symfony
>> provides.
>>
>> On Fri, Sep 25, 2009 at 12:16 PM, michael.pie...@googlemail.com <
>>
>>
>>
>>
>>
>> michael.pie...@googlemail.com> wrote:
>>
>> > Sid Ferreira, and everyone complaining about the new forms, you don't
>> > have to use them for simple things!
>> > Just post your raw html form to an action, handle it with
>> > getPostParameter() and do something with it.
>>
>> > It is NOT TRUE that you have to learn a lot of stuff just to do simple
>> > things.
>>
>> > I don't use sfGuard, i don't use the generator, i don't use object
>> > routing. I had the choice to learn and use them, or to do it my way.
>> > And that's what i like about symfony.
>>
>> > Michael
>>
>> > On 25 Sep., 11:39, Sid Ferreira  wrote:
>> > > I was thinking about this, while making a sf1.0 project... and  
>> indeed
>> > > dispite of how good the new things in 1.2, it really got really
>> > complex.In
>> > > some ways, to a new commer, use symfony isn't a good idea he  
>> doesn't need
>> > > only to use MVC and ORM anymore, he needs to learn (and almost  
>> master)
>> > the
>> > > symfony forms to the very first project.
>>
>> > > I mean, it's insane in this point of view that sf can't make it  
>> easyer to
>> > > build a login form (let's ignore the plugin)... Almost against the  
>> 'KISS'
>> > > principle.
>>
>> > > I think symfony is an expert weapon, but it is almost 'no newbies
>> > > allowed'...
>>
>> > > ps: I hope I made my self clear about it.
>>
>> > > On Fri, Sep 25, 2009 at 04:20, Alexandru-Emil Lupu  
>> > > >wrote:
>>
>> > > > Gareth, i might even say old php 3.. in php4 there were any oop
>> > layering in
>> > > > progress ..
>>
>> > > > Fabien, if i remember right (haven't work to much with Rails)  
>> symfony
>> > > > folder structure is much alike with Ruby on Rails. By the way.  
>> Please
>> > close
>> > > > this non sense thread.
>>
>> > > > Alecs
>>
>> > > > On Fri, Sep 25, 2009 at 10:04 AM, Gareth McCumskey <
>> > gmccums...@gmail.com>wrote:
>>
>> > > >> We recently hired a junior PHP developer, fresh out of college,
>> > getting
>> > > >> his first taste of using PHP AND symfony in a production  
>> environment.
>> > We
>> > > >> pretty much had to throw him in the deep end with using symfony  
>> and
>> > the
>> > > >> associated documentation and give him work to do.
>>
>> > > >> Guess what? Because of symfony's abstracted nature and the  
>> ability for
>> > > >> developers to focus on business logic, he is resolving bugs and  
>> adding
>> > new
>> > > >> features all the time. The only time he stops to ask my help with
>> > anything
>> > > >> is when it has to do with our OWN code implemented in symfony  
>> and NOT
>> > the
>> > > >> framework itself. To me , thats evidence enough that the  
>> framework and
>> > its
>> > > >> structure is not difficult to learn and get into for a new user  
>> who is
>> > > >> willing to take the time and learn it.
>>
>> > > >> If we had built

[symfony-users] Re: User session variables

2009-09-25 Thread Gareth McCumskey
Like I said, on your login action, set the unset your own session variables
if you don't want the user to retain session variables on timeout of
session. Process is like this:

- User logs in the first time.
- During the course using the application your code sets certain session
variables.
- User walks away and while he is away the session times out
- When he comes back and tries to carry on using the application, he gets
redirected to login screen because of session timeout.
- When he resubmits his credentials, your login action will unset any
session variables he may have created in his previous session.

That way, whether the user logs out manually or gets timed out, session
variables are unset each time.

The advantage of this approach is simply that you then have full control
over what session variables a user can "keep" after timeout or logout.

On Fri, Sep 25, 2009 at 12:38 PM, DEEPAK BHATIA wrote:

> Thanks Gareth.
>
> The point I am seeing is that in case user has logged out while the session
> had not expired, user can still get back the session variables he has
> created if logs-in again.
>
> However say user opened a web page and forgot to do anything with that web
> page and the session expired then as soon as user starts, user will get NULL
> values from the session variables. Means the session variable will not be
> set to anything.
>
> If session variable is not set to anything then the default value is
> returned.
>
> Is my algorithm of understanding session variables as per your explaination
> ?
>
> Thanks
>
> Deepak Bhatia
>
>
>
>
>
>
> On Fri, Sep 25, 2009 at 4:01 PM, Gareth McCumskey wrote:
>
>> The session variables are not cleared automatically. If a user logs out
>> only the symfony authenticated variable is set to false and all the session
>> data you added to the user session is still available.
>>
>> This is actually a GOOD thing. In our example, our interface uses a
>> tabbing system within the application stored in session. When a user logs
>> out and logs back in he still has the tabs he made previously. There are
>> other things that we manually remove from session on log out/log in.
>>
>> One way to ensure that the users session is emptied when he logs in again
>> is on login manually set those session variables using
>> sfUser->setParameter() to nothing.
>>
>>
>> On Fri, Sep 25, 2009 at 12:13 PM, DEEPAK BHATIA 
>> wrote:
>>
>>> "The session object for the current user is accessed in the action with
>>> the getUser() method and is an instance of the sfUser class. This class
>>> contains a parameter holder that allows you to store any user attribute in
>>> it. This data will be available to other requests until the end of the user
>>> session, as shown in Listing 6-15."
>>>
>>> 
>>>
>>> Hi,
>>>
>>> I have taken above from the Chapter 6 - Inside The Controller Layer.
>>>
>>> When a the user sessions ends, the session variables will have the values
>>> returned as "NULL", I guess.
>>>
>>> So is it safe to redirect the action to error template in case session
>>> variables returns NULL ?
>>>
>>> For example, in the line of code below, I assume that I get something
>>> from 'allnames' session variable. However if it is "NULL", means the session
>>> is broken now.
>>>
>>> $current_name = $this->getUser()->getAttribute('allnames');
>>>
>>> Please suggest suitably.
>>>
>>> Thanks
>>>
>>> Deepak Bhatia
>>>
>>>
>>>
>>>
>>>
>>
>>
>> --
>> Gareth McCumskey
>> http://garethmccumskey.blogspot.com
>> twitter: @garethmcc
>> >>
>>


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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-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] web_debug in settings.yml

2009-09-25 Thread DEEPAK BHATIA
Hi,

I have set the web_debug to on in settings.yml file. But when I go to some
other page, the web debug bar disappears. Though the new pages are ajax
templates.

Please help me.

Regards

Deepak Bhatia

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



[symfony-users] Re: Fatal Error in actions.class.php

2009-09-25 Thread DEEPAK BHATIA
Yes, I like getting addicted to good things like xdebug with eclipse. Thanks
for the suggestion.

Best Regards

Deepak Bhatia

On Fri, Sep 25, 2009 at 4:05 PM, Kieu Anh Tuan wrote:

> I'm not used to sf1.2 yet so that I could not tell you anything about
> tool_dev.php :).
>
> You could try xdebug with eclipse http://devzone.zend.com/article/2930,
> believe me, after trying this, you should be addicted to the debugger,
> especially in a language likes php. Otherwise, make, for example an echo on
> $token and $current_name to see what it returns.
>
>
> On Fri, Sep 25, 2009 at 12:00 PM, DEEPAK BHATIA 
> wrote:
>
>> Hi,
>>
>> I have never used the debugger. I think we need to put the below in the
>> tool_dev.php file in web directory
>>
>> >
>> define('SF_ROOT_DIR',realpath(dirname(__FILE__).'/..'));
>> define('SF_APP', 'myapp');
>> define('SF_ENVIRONMENT', 'dev');
>> define('SF_DEBUG',   true);
>>
>> require_once(SF_ROOT_DIR.DIRECTORY_SEPARATOR.'apps'
>> .DIRECTORY_SEPARATOR.SF_APP.DIRECTORY_SEPARATOR.'config'
>> .DIRECTORY_SEPARATOR.'config.php');
>>
>> sfContext::getInstance()->getController()->dispatch();
>>   On Fri, Sep 25, 2009 at 3:18 PM, Kieu Anh Tuan 
>> wrote:
>>
>>> Hi,
>>> What do you have in $current_name and $token in your debugger? To me
>>> EmployeeTablePeer::doSelectOne($c) returns null which means it could not
>>> find the employee with name = $token.
>>> I don't think that it will throw an exception when your
>>> $this->getUser()->getAttribute('allnames') return null because this is
>>> actually not an exception. Furthermore, it reaches your pink line $val =
>>> $par_tuple->getEmpId(); so the if condition
>>> if($this->getUser()->getAttribute('allnames')) must have returned not null.
>>>
>>> In my opinion, there're somethings wrong with the $token that Propel
>>> could not find the right user.
>>>
>>>
>>>
>>> On Fri, Sep 25, 2009 at 11:33 AM, DEEPAK BHATIA >> > wrote:
>>>
 Hi,

 Please find the code below


 ===
 if($this->getUser()->getAttribute('allnames'))
 {
$current_name = $this->getUser()->getAttribute('allnames');

$token = strtok($current_name, ",");
$msubject = "Invitation for the meeting-Date:".$startdate." Start
 Time:".$stime." Room:".$room_tuple->getName();

$c = new Criteria();
$c->add(EmployeeTablePeer::NAME,$token);

try
{
$par_tuple = EmployeeTablePeer::doSelectOne($c);
}
catch(PropelException $e)
{
   $this->redirect('login/logindberror');
}
$val = $par_tuple->getEmpId();

 ===

 I get the error for the line above -

 "Fatal Error: Call to a member function getEmpId() on a non-object in
 /opt/lampp/htdocs/crb/apps/tool/modules/book/actions/actions.class.php at
 line 2370 which is the highlighted pink line above.

 My opinion
 
 My point is that session between web browser and server has been broken
 hence the $this->getUser()->getAttribute('allnames'); is returning a null
 value but if it is null then we should get PropelException.



>>>
>>>
>>>
>
> >
>

--~--~-~--~~~---~--~~
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: Symfony has definitely become too complicated framework

2009-09-25 Thread michael.pie...@googlemail.com

So maybe the beginner tutorials should start with simple things, like
handling a hand written html form and then later introduce some
extended features like sfForms, which makes your life easier. This is
done with security.yml and credentials: if you need more, you can use
sfGuard. The good thing about Jobeet is that it shows how fast you can
develop applications with symfony. But it hides the fact, that you
have to know very much about the different components, when you try to
change or add something there ...

Well, i think it is really hard to satisfy everyone ...

Michael


On 25 Sep., 12:27, Gareth McCumskey  wrote:
> I don't use the sfGuard either, just the sfBasicSecurityUser, and it works
> well enough and is really not all that complicated. I don't use the admin
> generator as I feel it creates elements that are far too generic for my
> purposes and usually my admin and frontend systems are too integrated.
>
> Just like Michael said, thats the beauty of symfony. As a newcomer you can
> start using what you want when you want it. Use compat_10 settings to stick
> to form helpers instead of forms framework and then switch to the forms
> framework when you are ready. A lot of things are this way in symfony and
> you are in no way compelled to use every plugin/feature that symfony
> provides.
>
> On Fri, Sep 25, 2009 at 12:16 PM, michael.pie...@googlemail.com <
>
>
>
>
>
> michael.pie...@googlemail.com> wrote:
>
> > Sid Ferreira, and everyone complaining about the new forms, you don't
> > have to use them for simple things!
> > Just post your raw html form to an action, handle it with
> > getPostParameter() and do something with it.
>
> > It is NOT TRUE that you have to learn a lot of stuff just to do simple
> > things.
>
> > I don't use sfGuard, i don't use the generator, i don't use object
> > routing. I had the choice to learn and use them, or to do it my way.
> > And that's what i like about symfony.
>
> > Michael
>
> > On 25 Sep., 11:39, Sid Ferreira  wrote:
> > > I was thinking about this, while making a sf1.0 project... and indeed
> > > dispite of how good the new things in 1.2, it really got really
> > complex.In
> > > some ways, to a new commer, use symfony isn't a good idea he doesn't need
> > > only to use MVC and ORM anymore, he needs to learn (and almost master)
> > the
> > > symfony forms to the very first project.
>
> > > I mean, it's insane in this point of view that sf can't make it easyer to
> > > build a login form (let's ignore the plugin)... Almost against the 'KISS'
> > > principle.
>
> > > I think symfony is an expert weapon, but it is almost 'no newbies
> > > allowed'...
>
> > > ps: I hope I made my self clear about it.
>
> > > On Fri, Sep 25, 2009 at 04:20, Alexandru-Emil Lupu  > >wrote:
>
> > > > Gareth, i might even say old php 3.. in php4 there were any oop
> > layering in
> > > > progress ..
>
> > > > Fabien, if i remember right (haven't work to much with Rails) symfony
> > > > folder structure is much alike with Ruby on Rails. By the way. Please
> > close
> > > > this non sense thread.
>
> > > > Alecs
>
> > > > On Fri, Sep 25, 2009 at 10:04 AM, Gareth McCumskey <
> > gmccums...@gmail.com>wrote:
>
> > > >> We recently hired a junior PHP developer, fresh out of college,
> > getting
> > > >> his first taste of using PHP AND symfony in a production environment.
> > We
> > > >> pretty much had to throw him in the deep end with using symfony and
> > the
> > > >> associated documentation and give him work to do.
>
> > > >> Guess what? Because of symfony's abstracted nature and the ability for
> > > >> developers to focus on business logic, he is resolving bugs and adding
> > new
> > > >> features all the time. The only time he stops to ask my help with
> > anything
> > > >> is when it has to do with our OWN code implemented in symfony and NOT
> > the
> > > >> framework itself. To me , thats evidence enough that the framework and
> > its
> > > >> structure is not difficult to learn and get into for a new user who is
> > > >> willing to take the time and learn it.
>
> > > >> If we had built our application without symfony we would still be very
> > far
> > > >> away from a releasable product costing the company more and more
> > money.
>
> > > >> All of your responses show someone who is stuck in the old PHP4
> > procedural
> > > >> line of thinking where its create functionality line by line and you
> > are
> > > >> apparently not willing to invest the relaistically small amount of
> > time
> > > >> required to use symfony.
>
> > > >> On Fri, Sep 25, 2009 at 3:34 AM, bghost  wrote:
>
> > > >>> And? Where you saw any recommendation to use  tags outside
> > > >>>  ??
> > > >>> I never said that any developer is stupid here. But now I have
> > changed
> > > >>> my opinion
> > > >>> under the pressure of your arguments.
>
> > > >>> Anyway, finally I would say this:
>
> > > >>> Most of you are calling for some alleged benefits that are hidden
> > > >>> behind terms
> > > >>> like "re

[symfony-users] Re: User session variables

2009-09-25 Thread DEEPAK BHATIA
Thanks Gareth.

The point I am seeing is that in case user has logged out while the session
had not expired, user can still get back the session variables he has
created if logs-in again.

However say user opened a web page and forgot to do anything with that web
page and the session expired then as soon as user starts, user will get NULL
values from the session variables. Means the session variable will not be
set to anything.

If session variable is not set to anything then the default value is
returned.

Is my algorithm of understanding session variables as per your explaination
?

Thanks

Deepak Bhatia






On Fri, Sep 25, 2009 at 4:01 PM, Gareth McCumskey wrote:

> The session variables are not cleared automatically. If a user logs out
> only the symfony authenticated variable is set to false and all the session
> data you added to the user session is still available.
>
> This is actually a GOOD thing. In our example, our interface uses a tabbing
> system within the application stored in session. When a user logs out and
> logs back in he still has the tabs he made previously. There are other
> things that we manually remove from session on log out/log in.
>
> One way to ensure that the users session is emptied when he logs in again
> is on login manually set those session variables using
> sfUser->setParameter() to nothing.
>
>
> On Fri, Sep 25, 2009 at 12:13 PM, DEEPAK BHATIA 
> wrote:
>
>> "The session object for the current user is accessed in the action with
>> the getUser() method and is an instance of the sfUser class. This class
>> contains a parameter holder that allows you to store any user attribute in
>> it. This data will be available to other requests until the end of the user
>> session, as shown in Listing 6-15."
>>
>> 
>>
>> Hi,
>>
>> I have taken above from the Chapter 6 - Inside The Controller Layer.
>>
>> When a the user sessions ends, the session variables will have the values
>> returned as "NULL", I guess.
>>
>> So is it safe to redirect the action to error template in case session
>> variables returns NULL ?
>>
>> For example, in the line of code below, I assume that I get something from
>> 'allnames' session variable. However if it is "NULL", means the session is
>> broken now.
>>
>> $current_name = $this->getUser()->getAttribute('allnames');
>>
>> Please suggest suitably.
>>
>> Thanks
>>
>> Deepak Bhatia
>>
>>
>>
>>
>>
>
>
> --
> Gareth McCumskey
> http://garethmccumskey.blogspot.com
> twitter: @garethmcc
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-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: Fatal Error in actions.class.php

2009-09-25 Thread Kieu Anh Tuan
I'm not used to sf1.2 yet so that I could not tell you anything about
tool_dev.php :).

You could try xdebug with eclipse http://devzone.zend.com/article/2930,
believe me, after trying this, you should be addicted to the debugger,
especially in a language likes php. Otherwise, make, for example an echo on
$token and $current_name to see what it returns.

On Fri, Sep 25, 2009 at 12:00 PM, DEEPAK BHATIA wrote:

> Hi,
>
> I have never used the debugger. I think we need to put the below in the
> tool_dev.php file in web directory
>
> 
> define('SF_ROOT_DIR',realpath(dirname(__FILE__).'/..'));
> define('SF_APP', 'myapp');
> define('SF_ENVIRONMENT', 'dev');
> define('SF_DEBUG',   true);
>
> require_once(SF_ROOT_DIR.DIRECTORY_SEPARATOR.'apps'
> .DIRECTORY_SEPARATOR.SF_APP.DIRECTORY_SEPARATOR.'config'
> .DIRECTORY_SEPARATOR.'config.php');
>
> sfContext::getInstance()->getController()->dispatch();
>  On Fri, Sep 25, 2009 at 3:18 PM, Kieu Anh Tuan wrote:
>
>> Hi,
>> What do you have in $current_name and $token in your debugger? To me
>> EmployeeTablePeer::doSelectOne($c) returns null which means it could not
>> find the employee with name = $token.
>> I don't think that it will throw an exception when your
>> $this->getUser()->getAttribute('allnames') return null because this is
>> actually not an exception. Furthermore, it reaches your pink line $val =
>> $par_tuple->getEmpId(); so the if condition
>> if($this->getUser()->getAttribute('allnames')) must have returned not null.
>>
>> In my opinion, there're somethings wrong with the $token that Propel could
>> not find the right user.
>>
>>
>>
>> On Fri, Sep 25, 2009 at 11:33 AM, DEEPAK BHATIA 
>> wrote:
>>
>>> Hi,
>>>
>>> Please find the code below
>>>
>>>
>>> ===
>>> if($this->getUser()->getAttribute('allnames'))
>>> {
>>>$current_name = $this->getUser()->getAttribute('allnames');
>>>
>>>$token = strtok($current_name, ",");
>>>$msubject = "Invitation for the meeting-Date:".$startdate." Start
>>> Time:".$stime." Room:".$room_tuple->getName();
>>>
>>>$c = new Criteria();
>>>$c->add(EmployeeTablePeer::NAME,$token);
>>>
>>>try
>>>{
>>>$par_tuple = EmployeeTablePeer::doSelectOne($c);
>>>}
>>>catch(PropelException $e)
>>>{
>>>   $this->redirect('login/logindberror');
>>>}
>>>$val = $par_tuple->getEmpId();
>>>
>>> ===
>>>
>>> I get the error for the line above -
>>>
>>> "Fatal Error: Call to a member function getEmpId() on a non-object in
>>> /opt/lampp/htdocs/crb/apps/tool/modules/book/actions/actions.class.php at
>>> line 2370 which is the highlighted pink line above.
>>>
>>> My opinion
>>> 
>>> My point is that session between web browser and server has been broken
>>> hence the $this->getUser()->getAttribute('allnames'); is returning a null
>>> value but if it is null then we should get PropelException.
>>>
>>>
>>>
>>
>> >>
>>

--~--~-~--~~~---~--~~
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: User session variables

2009-09-25 Thread Gareth McCumskey
Oh yes, and sfUser->getAttribute() has a default option if there is no value
to get. In other words:

echo sfUser->getAttribute('value_i_want', "default value");

If the session variable 'value_i_want' is set it returns that value else it
will return "default value"

On Fri, Sep 25, 2009 at 12:13 PM, DEEPAK BHATIA wrote:

> "The session object for the current user is accessed in the action with the
> getUser() method and is an instance of the sfUser class. This class
> contains a parameter holder that allows you to store any user attribute in
> it. This data will be available to other requests until the end of the user
> session, as shown in Listing 6-15."
>
> 
>
> Hi,
>
> I have taken above from the Chapter 6 - Inside The Controller Layer.
>
> When a the user sessions ends, the session variables will have the values
> returned as "NULL", I guess.
>
> So is it safe to redirect the action to error template in case session
> variables returns NULL ?
>
> For example, in the line of code below, I assume that I get something from
> 'allnames' session variable. However if it is "NULL", means the session is
> broken now.
>
> $current_name = $this->getUser()->getAttribute('allnames');
>
> Please suggest suitably.
>
> Thanks
>
> Deepak Bhatia
>
>
>
> >
>


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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-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: User session variables

2009-09-25 Thread Gareth McCumskey
The session variables are not cleared automatically. If a user logs out only
the symfony authenticated variable is set to false and all the session data
you added to the user session is still available.

This is actually a GOOD thing. In our example, our interface uses a tabbing
system within the application stored in session. When a user logs out and
logs back in he still has the tabs he made previously. There are other
things that we manually remove from session on log out/log in.

One way to ensure that the users session is emptied when he logs in again is
on login manually set those session variables using sfUser->setParameter()
to nothing.

On Fri, Sep 25, 2009 at 12:13 PM, DEEPAK BHATIA wrote:

> "The session object for the current user is accessed in the action with the
> getUser() method and is an instance of the sfUser class. This class
> contains a parameter holder that allows you to store any user attribute in
> it. This data will be available to other requests until the end of the user
> session, as shown in Listing 6-15."
>
> 
>
> Hi,
>
> I have taken above from the Chapter 6 - Inside The Controller Layer.
>
> When a the user sessions ends, the session variables will have the values
> returned as "NULL", I guess.
>
> So is it safe to redirect the action to error template in case session
> variables returns NULL ?
>
> For example, in the line of code below, I assume that I get something from
> 'allnames' session variable. However if it is "NULL", means the session is
> broken now.
>
> $current_name = $this->getUser()->getAttribute('allnames');
>
> Please suggest suitably.
>
> Thanks
>
> Deepak Bhatia
>
>
>
> >
>


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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-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: Symfony has definitely become too complicated framework

2009-09-25 Thread Gareth McCumskey
Set compat_10 : true in settings.yml and you're all good

On Fri, Sep 25, 2009 at 12:25 PM, Sid Bachtiar wrote:

>
> The helpers are still there. Just not included by default. I think you
> need to  or include it other way.
>
> On Fri, Sep 25, 2009 at 10:21 PM, Sid Ferreira  wrote:
> > Actually I do like and use a lot of forms.
> > Im just looking as a new commer.
> > It isn't cause (framework name here) does something that everyone must to
> > do.
> > Maybe let the forms helper there, unused, as a way to new users learn
> before
> > really get into symfony.
> > Making it easyer.
> >
> > On Fri, Sep 25, 2009 at 07:16, michael.pie...@googlemail.com
> >  wrote:
> >>
> >> Sid Ferreira, and everyone complaining about the new forms, you don't
> >> have to use them for simple things!
> >> Just post your raw html form to an action, handle it with
> >> getPostParameter() and do something with it.
> >>
> >> It is NOT TRUE that you have to learn a lot of stuff just to do simple
> >> things.
> >>
> >> I don't use sfGuard, i don't use the generator, i don't use object
> >> routing. I had the choice to learn and use them, or to do it my way.
> >> And that's what i like about symfony.
> >>
> >> Michael
> >>
> >>
> >> On 25 Sep., 11:39, Sid Ferreira  wrote:
> >> > I was thinking about this, while making a sf1.0 project... and indeed
> >> > dispite of how good the new things in 1.2, it really got really
> >> > complex.In
> >> > some ways, to a new commer, use symfony isn't a good idea he doesn't
> >> > need
> >> > only to use MVC and ORM anymore, he needs to learn (and almost master)
> >> > the
> >> > symfony forms to the very first project.
> >> >
> >> > I mean, it's insane in this point of view that sf can't make it easyer
> >> > to
> >> > build a login form (let's ignore the plugin)... Almost against the
> >> > 'KISS'
> >> > principle.
> >> >
> >> > I think symfony is an expert weapon, but it is almost 'no newbies
> >> > allowed'...
> >> >
> >> > ps: I hope I made my self clear about it.
> >> >
> >> > On Fri, Sep 25, 2009 at 04:20, Alexandru-Emil Lupu
> >> > wrote:
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > > Gareth, i might even say old php 3.. in php4 there were any oop
> >> > > layering in
> >> > > progress ..
> >> >
> >> > > Fabien, if i remember right (haven't work to much with Rails)
> symfony
> >> > > folder structure is much alike with Ruby on Rails. By the way.
> Please
> >> > > close
> >> > > this non sense thread.
> >> >
> >> > > Alecs
> >> >
> >> > > On Fri, Sep 25, 2009 at 10:04 AM, Gareth McCumskey
> >> > > wrote:
> >> >
> >> > >> We recently hired a junior PHP developer, fresh out of college,
> >> > >> getting
> >> > >> his first taste of using PHP AND symfony in a production
> environment.
> >> > >> We
> >> > >> pretty much had to throw him in the deep end with using symfony and
> >> > >> the
> >> > >> associated documentation and give him work to do.
> >> >
> >> > >> Guess what? Because of symfony's abstracted nature and the ability
> >> > >> for
> >> > >> developers to focus on business logic, he is resolving bugs and
> >> > >> adding new
> >> > >> features all the time. The only time he stops to ask my help with
> >> > >> anything
> >> > >> is when it has to do with our OWN code implemented in symfony and
> NOT
> >> > >> the
> >> > >> framework itself. To me , thats evidence enough that the framework
> >> > >> and its
> >> > >> structure is not difficult to learn and get into for a new user who
> >> > >> is
> >> > >> willing to take the time and learn it.
> >> >
> >> > >> If we had built our application without symfony we would still be
> >> > >> very far
> >> > >> away from a releasable product costing the company more and more
> >> > >> money.
> >> >
> >> > >> All of your responses show someone who is stuck in the old PHP4
> >> > >> procedural
> >> > >> line of thinking where its create functionality line by line and
> you
> >> > >> are
> >> > >> apparently not willing to invest the relaistically small amount of
> >> > >> time
> >> > >> required to use symfony.
> >> >
> >> > >> On Fri, Sep 25, 2009 at 3:34 AM, bghost 
> wrote:
> >> >
> >> > >>> And? Where you saw any recommendation to use  tags outside
> >> > >>>  ??
> >> > >>> I never said that any developer is stupid here. But now I have
> >> > >>> changed
> >> > >>> my opinion
> >> > >>> under the pressure of your arguments.
> >> >
> >> > >>> Anyway, finally I would say this:
> >> >
> >> > >>> Most of you are calling for some alleged benefits that are hidden
> >> > >>> behind terms
> >> > >>> like "re-usable, re-factoring" or "developer can concentrate on
> >> > >>> business logic" ... bla ... bla .. bla
> >> >
> >> > >>> 1st
> >> >
> >> > >>> What does it mean to do something re-usable? Do you really need to
> >> > >>> spend
> >> > >>> too much time on that if it will eventually be used once or just a
> >> > >>> few
> >> > >>> times?
> >> > >>> I heard many times: "Yes, make it re-usable...yes, yes,
> >> > >>> yes..hmake it
> >> > >>> re

[symfony-users] Re: Symfony has definitely become too complicated framework

2009-09-25 Thread Gareth McCumskey
I don't use the sfGuard either, just the sfBasicSecurityUser, and it works
well enough and is really not all that complicated. I don't use the admin
generator as I feel it creates elements that are far too generic for my
purposes and usually my admin and frontend systems are too integrated.

Just like Michael said, thats the beauty of symfony. As a newcomer you can
start using what you want when you want it. Use compat_10 settings to stick
to form helpers instead of forms framework and then switch to the forms
framework when you are ready. A lot of things are this way in symfony and
you are in no way compelled to use every plugin/feature that symfony
provides.

On Fri, Sep 25, 2009 at 12:16 PM, michael.pie...@googlemail.com <
michael.pie...@googlemail.com> wrote:

>
> Sid Ferreira, and everyone complaining about the new forms, you don't
> have to use them for simple things!
> Just post your raw html form to an action, handle it with
> getPostParameter() and do something with it.
>
> It is NOT TRUE that you have to learn a lot of stuff just to do simple
> things.
>
> I don't use sfGuard, i don't use the generator, i don't use object
> routing. I had the choice to learn and use them, or to do it my way.
> And that's what i like about symfony.
>
> Michael
>
>
> On 25 Sep., 11:39, Sid Ferreira  wrote:
> > I was thinking about this, while making a sf1.0 project... and indeed
> > dispite of how good the new things in 1.2, it really got really
> complex.In
> > some ways, to a new commer, use symfony isn't a good idea he doesn't need
> > only to use MVC and ORM anymore, he needs to learn (and almost master)
> the
> > symfony forms to the very first project.
> >
> > I mean, it's insane in this point of view that sf can't make it easyer to
> > build a login form (let's ignore the plugin)... Almost against the 'KISS'
> > principle.
> >
> > I think symfony is an expert weapon, but it is almost 'no newbies
> > allowed'...
> >
> > ps: I hope I made my self clear about it.
> >
> > On Fri, Sep 25, 2009 at 04:20, Alexandru-Emil Lupu  >wrote:
> >
> >
> >
> >
> >
> > > Gareth, i might even say old php 3.. in php4 there were any oop
> layering in
> > > progress ..
> >
> > > Fabien, if i remember right (haven't work to much with Rails) symfony
> > > folder structure is much alike with Ruby on Rails. By the way. Please
> close
> > > this non sense thread.
> >
> > > Alecs
> >
> > > On Fri, Sep 25, 2009 at 10:04 AM, Gareth McCumskey <
> gmccums...@gmail.com>wrote:
> >
> > >> We recently hired a junior PHP developer, fresh out of college,
> getting
> > >> his first taste of using PHP AND symfony in a production environment.
> We
> > >> pretty much had to throw him in the deep end with using symfony and
> the
> > >> associated documentation and give him work to do.
> >
> > >> Guess what? Because of symfony's abstracted nature and the ability for
> > >> developers to focus on business logic, he is resolving bugs and adding
> new
> > >> features all the time. The only time he stops to ask my help with
> anything
> > >> is when it has to do with our OWN code implemented in symfony and NOT
> the
> > >> framework itself. To me , thats evidence enough that the framework and
> its
> > >> structure is not difficult to learn and get into for a new user who is
> > >> willing to take the time and learn it.
> >
> > >> If we had built our application without symfony we would still be very
> far
> > >> away from a releasable product costing the company more and more
> money.
> >
> > >> All of your responses show someone who is stuck in the old PHP4
> procedural
> > >> line of thinking where its create functionality line by line and you
> are
> > >> apparently not willing to invest the relaistically small amount of
> time
> > >> required to use symfony.
> >
> > >> On Fri, Sep 25, 2009 at 3:34 AM, bghost  wrote:
> >
> > >>> And? Where you saw any recommendation to use  tags outside
> > >>>  ??
> > >>> I never said that any developer is stupid here. But now I have
> changed
> > >>> my opinion
> > >>> under the pressure of your arguments.
> >
> > >>> Anyway, finally I would say this:
> >
> > >>> Most of you are calling for some alleged benefits that are hidden
> > >>> behind terms
> > >>> like "re-usable, re-factoring" or "developer can concentrate on
> > >>> business logic" ... bla ... bla .. bla
> >
> > >>> 1st
> >
> > >>> What does it mean to do something re-usable? Do you really need to
> > >>> spend
> > >>> too much time on that if it will eventually be used once or just a
> few
> > >>> times?
> > >>> I heard many times: "Yes, make it re-usable...yes, yes,
> > >>> yes..hmake it
> > >>> re-usable!" even if that is justified or not.
> >
> > >>> 2nd
> >
> > >>> What is the limit? How deep a developer should go with the "re-
> > >>> factoring"?
> > >>> Is it necessary to split templates into numerous small fragments and
> > >>> thus make
> > >>> them an extremely confusing and difficult to track? I heard many
> > >>> times: "Yes,
> > >>> re

[symfony-users] Re: Symfony has definitely become too complicated framework

2009-09-25 Thread Sid Bachtiar

The helpers are still there. Just not included by default. I think you
need to  or include it other way.

On Fri, Sep 25, 2009 at 10:21 PM, Sid Ferreira  wrote:
> Actually I do like and use a lot of forms.
> Im just looking as a new commer.
> It isn't cause (framework name here) does something that everyone must to
> do.
> Maybe let the forms helper there, unused, as a way to new users learn before
> really get into symfony.
> Making it easyer.
>
> On Fri, Sep 25, 2009 at 07:16, michael.pie...@googlemail.com
>  wrote:
>>
>> Sid Ferreira, and everyone complaining about the new forms, you don't
>> have to use them for simple things!
>> Just post your raw html form to an action, handle it with
>> getPostParameter() and do something with it.
>>
>> It is NOT TRUE that you have to learn a lot of stuff just to do simple
>> things.
>>
>> I don't use sfGuard, i don't use the generator, i don't use object
>> routing. I had the choice to learn and use them, or to do it my way.
>> And that's what i like about symfony.
>>
>> Michael
>>
>>
>> On 25 Sep., 11:39, Sid Ferreira  wrote:
>> > I was thinking about this, while making a sf1.0 project... and indeed
>> > dispite of how good the new things in 1.2, it really got really
>> > complex.In
>> > some ways, to a new commer, use symfony isn't a good idea he doesn't
>> > need
>> > only to use MVC and ORM anymore, he needs to learn (and almost master)
>> > the
>> > symfony forms to the very first project.
>> >
>> > I mean, it's insane in this point of view that sf can't make it easyer
>> > to
>> > build a login form (let's ignore the plugin)... Almost against the
>> > 'KISS'
>> > principle.
>> >
>> > I think symfony is an expert weapon, but it is almost 'no newbies
>> > allowed'...
>> >
>> > ps: I hope I made my self clear about it.
>> >
>> > On Fri, Sep 25, 2009 at 04:20, Alexandru-Emil Lupu
>> > wrote:
>> >
>> >
>> >
>> >
>> >
>> > > Gareth, i might even say old php 3.. in php4 there were any oop
>> > > layering in
>> > > progress ..
>> >
>> > > Fabien, if i remember right (haven't work to much with Rails) symfony
>> > > folder structure is much alike with Ruby on Rails. By the way. Please
>> > > close
>> > > this non sense thread.
>> >
>> > > Alecs
>> >
>> > > On Fri, Sep 25, 2009 at 10:04 AM, Gareth McCumskey
>> > > wrote:
>> >
>> > >> We recently hired a junior PHP developer, fresh out of college,
>> > >> getting
>> > >> his first taste of using PHP AND symfony in a production environment.
>> > >> We
>> > >> pretty much had to throw him in the deep end with using symfony and
>> > >> the
>> > >> associated documentation and give him work to do.
>> >
>> > >> Guess what? Because of symfony's abstracted nature and the ability
>> > >> for
>> > >> developers to focus on business logic, he is resolving bugs and
>> > >> adding new
>> > >> features all the time. The only time he stops to ask my help with
>> > >> anything
>> > >> is when it has to do with our OWN code implemented in symfony and NOT
>> > >> the
>> > >> framework itself. To me , thats evidence enough that the framework
>> > >> and its
>> > >> structure is not difficult to learn and get into for a new user who
>> > >> is
>> > >> willing to take the time and learn it.
>> >
>> > >> If we had built our application without symfony we would still be
>> > >> very far
>> > >> away from a releasable product costing the company more and more
>> > >> money.
>> >
>> > >> All of your responses show someone who is stuck in the old PHP4
>> > >> procedural
>> > >> line of thinking where its create functionality line by line and you
>> > >> are
>> > >> apparently not willing to invest the relaistically small amount of
>> > >> time
>> > >> required to use symfony.
>> >
>> > >> On Fri, Sep 25, 2009 at 3:34 AM, bghost  wrote:
>> >
>> > >>> And? Where you saw any recommendation to use  tags outside
>> > >>>  ??
>> > >>> I never said that any developer is stupid here. But now I have
>> > >>> changed
>> > >>> my opinion
>> > >>> under the pressure of your arguments.
>> >
>> > >>> Anyway, finally I would say this:
>> >
>> > >>> Most of you are calling for some alleged benefits that are hidden
>> > >>> behind terms
>> > >>> like "re-usable, re-factoring" or "developer can concentrate on
>> > >>> business logic" ... bla ... bla .. bla
>> >
>> > >>> 1st
>> >
>> > >>> What does it mean to do something re-usable? Do you really need to
>> > >>> spend
>> > >>> too much time on that if it will eventually be used once or just a
>> > >>> few
>> > >>> times?
>> > >>> I heard many times: "Yes, make it re-usable...yes, yes,
>> > >>> yes..hmake it
>> > >>> re-usable!" even if that is justified or not.
>> >
>> > >>> 2nd
>> >
>> > >>> What is the limit? How deep a developer should go with the "re-
>> > >>> factoring"?
>> > >>> Is it necessary to split templates into numerous small fragments and
>> > >>> thus make
>> > >>> them an extremely confusing and difficult to track? I heard many
>> > >>> times: "Yes,
>> > >>> re-factore it ...yes, yes, yes

[symfony-users] Re: Symfony has definitely become too complicated framework

2009-09-25 Thread Sid Ferreira
Actually I do like and use a lot of forms.Im just looking as a new commer.

It isn't cause (framework name here) does something that everyone must to
do.
Maybe let the forms helper there, unused, as a way to new users learn before
really get into symfony.

Making it easyer.

On Fri, Sep 25, 2009 at 07:16, michael.pie...@googlemail.com <
michael.pie...@googlemail.com> wrote:

>
> Sid Ferreira, and everyone complaining about the new forms, you don't
> have to use them for simple things!
> Just post your raw html form to an action, handle it with
> getPostParameter() and do something with it.
>
> It is NOT TRUE that you have to learn a lot of stuff just to do simple
> things.
>
> I don't use sfGuard, i don't use the generator, i don't use object
> routing. I had the choice to learn and use them, or to do it my way.
> And that's what i like about symfony.
>
> Michael
>
>
> On 25 Sep., 11:39, Sid Ferreira  wrote:
> > I was thinking about this, while making a sf1.0 project... and indeed
> > dispite of how good the new things in 1.2, it really got really
> complex.In
> > some ways, to a new commer, use symfony isn't a good idea he doesn't need
> > only to use MVC and ORM anymore, he needs to learn (and almost master)
> the
> > symfony forms to the very first project.
> >
> > I mean, it's insane in this point of view that sf can't make it easyer to
> > build a login form (let's ignore the plugin)... Almost against the 'KISS'
> > principle.
> >
> > I think symfony is an expert weapon, but it is almost 'no newbies
> > allowed'...
> >
> > ps: I hope I made my self clear about it.
> >
> > On Fri, Sep 25, 2009 at 04:20, Alexandru-Emil Lupu  >wrote:
> >
> >
> >
> >
> >
> > > Gareth, i might even say old php 3.. in php4 there were any oop
> layering in
> > > progress ..
> >
> > > Fabien, if i remember right (haven't work to much with Rails) symfony
> > > folder structure is much alike with Ruby on Rails. By the way. Please
> close
> > > this non sense thread.
> >
> > > Alecs
> >
> > > On Fri, Sep 25, 2009 at 10:04 AM, Gareth McCumskey <
> gmccums...@gmail.com>wrote:
> >
> > >> We recently hired a junior PHP developer, fresh out of college,
> getting
> > >> his first taste of using PHP AND symfony in a production environment.
> We
> > >> pretty much had to throw him in the deep end with using symfony and
> the
> > >> associated documentation and give him work to do.
> >
> > >> Guess what? Because of symfony's abstracted nature and the ability for
> > >> developers to focus on business logic, he is resolving bugs and adding
> new
> > >> features all the time. The only time he stops to ask my help with
> anything
> > >> is when it has to do with our OWN code implemented in symfony and NOT
> the
> > >> framework itself. To me , thats evidence enough that the framework and
> its
> > >> structure is not difficult to learn and get into for a new user who is
> > >> willing to take the time and learn it.
> >
> > >> If we had built our application without symfony we would still be very
> far
> > >> away from a releasable product costing the company more and more
> money.
> >
> > >> All of your responses show someone who is stuck in the old PHP4
> procedural
> > >> line of thinking where its create functionality line by line and you
> are
> > >> apparently not willing to invest the relaistically small amount of
> time
> > >> required to use symfony.
> >
> > >> On Fri, Sep 25, 2009 at 3:34 AM, bghost  wrote:
> >
> > >>> And? Where you saw any recommendation to use  tags outside
> > >>>  ??
> > >>> I never said that any developer is stupid here. But now I have
> changed
> > >>> my opinion
> > >>> under the pressure of your arguments.
> >
> > >>> Anyway, finally I would say this:
> >
> > >>> Most of you are calling for some alleged benefits that are hidden
> > >>> behind terms
> > >>> like "re-usable, re-factoring" or "developer can concentrate on
> > >>> business logic" ... bla ... bla .. bla
> >
> > >>> 1st
> >
> > >>> What does it mean to do something re-usable? Do you really need to
> > >>> spend
> > >>> too much time on that if it will eventually be used once or just a
> few
> > >>> times?
> > >>> I heard many times: "Yes, make it re-usable...yes, yes,
> > >>> yes..hmake it
> > >>> re-usable!" even if that is justified or not.
> >
> > >>> 2nd
> >
> > >>> What is the limit? How deep a developer should go with the "re-
> > >>> factoring"?
> > >>> Is it necessary to split templates into numerous small fragments and
> > >>> thus make
> > >>> them an extremely confusing and difficult to track? I heard many
> > >>> times: "Yes,
> > >>> re-factore it ...yes, yes, yes..hre-factore it!" even if that
> > >>> is justified or not.
> >
> > >>> 3rd
> >
> > >>> Most of you said that Symfony Framework enables developers to
> > >>> concentrate
> > >>> on business logic? Yes, that's OK. I just wanted to warn that in
> these
> > >>> efforts,
> > >>> Symfony developers are exaggerating a bit, which resulted with the
> > >>> intricate

[symfony-users] Re: Symfony has definitely become too complicated framework

2009-09-25 Thread michael.pie...@googlemail.com

Sid Ferreira, and everyone complaining about the new forms, you don't
have to use them for simple things!
Just post your raw html form to an action, handle it with
getPostParameter() and do something with it.

It is NOT TRUE that you have to learn a lot of stuff just to do simple
things.

I don't use sfGuard, i don't use the generator, i don't use object
routing. I had the choice to learn and use them, or to do it my way.
And that's what i like about symfony.

Michael


On 25 Sep., 11:39, Sid Ferreira  wrote:
> I was thinking about this, while making a sf1.0 project... and indeed
> dispite of how good the new things in 1.2, it really got really complex.In
> some ways, to a new commer, use symfony isn't a good idea he doesn't need
> only to use MVC and ORM anymore, he needs to learn (and almost master) the
> symfony forms to the very first project.
>
> I mean, it's insane in this point of view that sf can't make it easyer to
> build a login form (let's ignore the plugin)... Almost against the 'KISS'
> principle.
>
> I think symfony is an expert weapon, but it is almost 'no newbies
> allowed'...
>
> ps: I hope I made my self clear about it.
>
> On Fri, Sep 25, 2009 at 04:20, Alexandru-Emil Lupu 
> wrote:
>
>
>
>
>
> > Gareth, i might even say old php 3.. in php4 there were any oop layering in
> > progress ..
>
> > Fabien, if i remember right (haven't work to much with Rails) symfony
> > folder structure is much alike with Ruby on Rails. By the way. Please close
> > this non sense thread.
>
> > Alecs
>
> > On Fri, Sep 25, 2009 at 10:04 AM, Gareth McCumskey 
> > wrote:
>
> >> We recently hired a junior PHP developer, fresh out of college, getting
> >> his first taste of using PHP AND symfony in a production environment. We
> >> pretty much had to throw him in the deep end with using symfony and the
> >> associated documentation and give him work to do.
>
> >> Guess what? Because of symfony's abstracted nature and the ability for
> >> developers to focus on business logic, he is resolving bugs and adding new
> >> features all the time. The only time he stops to ask my help with anything
> >> is when it has to do with our OWN code implemented in symfony and NOT the
> >> framework itself. To me , thats evidence enough that the framework and its
> >> structure is not difficult to learn and get into for a new user who is
> >> willing to take the time and learn it.
>
> >> If we had built our application without symfony we would still be very far
> >> away from a releasable product costing the company more and more money.
>
> >> All of your responses show someone who is stuck in the old PHP4 procedural
> >> line of thinking where its create functionality line by line and you are
> >> apparently not willing to invest the relaistically small amount of time
> >> required to use symfony.
>
> >> On Fri, Sep 25, 2009 at 3:34 AM, bghost  wrote:
>
> >>> And? Where you saw any recommendation to use  tags outside
> >>>  ??
> >>> I never said that any developer is stupid here. But now I have changed
> >>> my opinion
> >>> under the pressure of your arguments.
>
> >>> Anyway, finally I would say this:
>
> >>> Most of you are calling for some alleged benefits that are hidden
> >>> behind terms
> >>> like "re-usable, re-factoring" or "developer can concentrate on
> >>> business logic" ... bla ... bla .. bla
>
> >>> 1st
>
> >>> What does it mean to do something re-usable? Do you really need to
> >>> spend
> >>> too much time on that if it will eventually be used once or just a few
> >>> times?
> >>> I heard many times: "Yes, make it re-usable...yes, yes,
> >>> yes..hmake it
> >>> re-usable!" even if that is justified or not.
>
> >>> 2nd
>
> >>> What is the limit? How deep a developer should go with the "re-
> >>> factoring"?
> >>> Is it necessary to split templates into numerous small fragments and
> >>> thus make
> >>> them an extremely confusing and difficult to track? I heard many
> >>> times: "Yes,
> >>> re-factore it ...yes, yes, yes..hre-factore it!" even if that
> >>> is justified or not.
>
> >>> 3rd
>
> >>> Most of you said that Symfony Framework enables developers to
> >>> concentrate
> >>> on business logic? Yes, that's OK. I just wanted to warn that in these
> >>> efforts,
> >>> Symfony developers are exaggerating a bit, which resulted with the
> >>> intricate
> >>> logic of the Symfony framework that hides the flow of the application
> >>> to the level
> >>> where it is very difficult to understand and monitor the application.
>
> >>> This is my last post here.
>
> >>> WBR,
> >>> Ghost3D
>
> >>> On Sep 25, 2:52 am, Jeremy Thomerson 
> >>> wrote:
> >>> > I've avoided responding on this thread to this point because your rude
> >>> > foul-mouthed criticism is ridiculously ignorant and malicious.  But,
> >>> since
> >>> > you once again call all developers here stupid, please be quickly
> >>> proven
> >>> > wrong by reading the "INTRODUCTION TO TABLES" by the W3C.  If you don't
> >>> know
> >>> > who the W3

[symfony-users] User session variables

2009-09-25 Thread DEEPAK BHATIA
"The session object for the current user is accessed in the action with the
getUser() method and is an instance of the sfUser class. This class contains
a parameter holder that allows you to store any user attribute in it. This
data will be available to other requests until the end of the user session,
as shown in Listing 6-15."



Hi,

I have taken above from the Chapter 6 - Inside The Controller Layer.

When a the user sessions ends, the session variables will have the values
returned as "NULL", I guess.

So is it safe to redirect the action to error template in case session
variables returns NULL ?

For example, in the line of code below, I assume that I get something from
'allnames' session variable. However if it is "NULL", means the session is
broken now.

$current_name = $this->getUser()->getAttribute('allnames');

Please suggest suitably.

Thanks

Deepak Bhatia

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



[symfony-users] Re: Fatal Error in actions.class.php

2009-09-25 Thread DEEPAK BHATIA
Hi,

I have never used the debugger. I think we need to put the below in the
tool_dev.php file in web directory

getController()->dispatch();
On Fri, Sep 25, 2009 at 3:18 PM, Kieu Anh Tuan wrote:

> Hi,
> What do you have in $current_name and $token in your debugger? To me
> EmployeeTablePeer::doSelectOne($c) returns null which means it could not
> find the employee with name = $token.
> I don't think that it will throw an exception when your
> $this->getUser()->getAttribute('allnames') return null because this is
> actually not an exception. Furthermore, it reaches your pink line $val =
> $par_tuple->getEmpId(); so the if condition
> if($this->getUser()->getAttribute('allnames')) must have returned not null.
>
> In my opinion, there're somethings wrong with the $token that Propel could
> not find the right user.
>
>
>
> On Fri, Sep 25, 2009 at 11:33 AM, DEEPAK BHATIA 
> wrote:
>
>> Hi,
>>
>> Please find the code below
>>
>>
>> ===
>> if($this->getUser()->getAttribute('allnames'))
>> {
>>$current_name = $this->getUser()->getAttribute('allnames');
>>
>>$token = strtok($current_name, ",");
>>$msubject = "Invitation for the meeting-Date:".$startdate." Start
>> Time:".$stime." Room:".$room_tuple->getName();
>>
>>$c = new Criteria();
>>$c->add(EmployeeTablePeer::NAME,$token);
>>
>>try
>>{
>>$par_tuple = EmployeeTablePeer::doSelectOne($c);
>>}
>>catch(PropelException $e)
>>{
>>   $this->redirect('login/logindberror');
>>}
>>$val = $par_tuple->getEmpId();
>>
>> ===
>>
>> I get the error for the line above -
>>
>> "Fatal Error: Call to a member function getEmpId() on a non-object in
>> /opt/lampp/htdocs/crb/apps/tool/modules/book/actions/actions.class.php at
>> line 2370 which is the highlighted pink line above.
>>
>> My opinion
>> 
>> My point is that session between web browser and server has been broken
>> hence the $this->getUser()->getAttribute('allnames'); is returning a null
>> value but if it is null then we should get PropelException.
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
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: Symfony has definitely become too complicated framework

2009-09-25 Thread Sid Bachtiar

As Fabien pointed out, sfForm is similar to Zend Form, Django, etc. So
Symfony isn't alone with this approach.

In general, someone not familiar with OOP and MVC will definitely
struggling at first, not just with Symfony. No shortcut here, web
developer just needs to learn best practices.

And you can still use old style form if you'd like, nothing stopping you.

> I mean, it's insane in this point of view that sf can't make it easyer to
> build a login form (let's ignore the plugin)

Without something like sfGuardPlugin, login form isn't simple.

On Fri, Sep 25, 2009 at 9:39 PM, Sid Ferreira  wrote:
> I was thinking about this, while making a sf1.0 project... and indeed
> dispite of how good the new things in 1.2, it really got really complex.
> In some ways, to a new commer, use symfony isn't a good idea he doesn't need
> only to use MVC and ORM anymore, he needs to learn (and almost master) the
> symfony forms to the very first project.
> I mean, it's insane in this point of view that sf can't make it easyer to
> build a login form (let's ignore the plugin)... Almost against the 'KISS'
> principle.
> I think symfony is an expert weapon, but it is almost 'no newbies
> allowed'...
> ps: I hope I made my self clear about it.
>
> On Fri, Sep 25, 2009 at 04:20, Alexandru-Emil Lupu 
> wrote:
>>
>> Gareth, i might even say old php 3.. in php4 there were any oop layering
>> in progress ..
>>
>> Fabien, if i remember right (haven't work to much with Rails) symfony
>> folder structure is much alike with Ruby on Rails. By the way. Please close
>> this non sense thread.
>>
>> Alecs
>>
>> On Fri, Sep 25, 2009 at 10:04 AM, Gareth McCumskey 
>> wrote:
>>>
>>> We recently hired a junior PHP developer, fresh out of college, getting
>>> his first taste of using PHP AND symfony in a production environment. We
>>> pretty much had to throw him in the deep end with using symfony and the
>>> associated documentation and give him work to do.
>>>
>>> Guess what? Because of symfony's abstracted nature and the ability for
>>> developers to focus on business logic, he is resolving bugs and adding new
>>> features all the time. The only time he stops to ask my help with anything
>>> is when it has to do with our OWN code implemented in symfony and NOT the
>>> framework itself. To me , thats evidence enough that the framework and its
>>> structure is not difficult to learn and get into for a new user who is
>>> willing to take the time and learn it.
>>>
>>> If we had built our application without symfony we would still be very
>>> far away from a releasable product costing the company more and more money.
>>>
>>> All of your responses show someone who is stuck in the old PHP4
>>> procedural line of thinking where its create functionality line by line and
>>> you are apparently not willing to invest the relaistically small amount of
>>> time required to use symfony.
>>>
>>> On Fri, Sep 25, 2009 at 3:34 AM, bghost  wrote:

 And? Where you saw any recommendation to use  tags outside
  ??
 I never said that any developer is stupid here. But now I have changed
 my opinion
 under the pressure of your arguments.

 Anyway, finally I would say this:

 Most of you are calling for some alleged benefits that are hidden
 behind terms
 like "re-usable, re-factoring" or "developer can concentrate on
 business logic" ... bla ... bla .. bla

 1st

 What does it mean to do something re-usable? Do you really need to
 spend
 too much time on that if it will eventually be used once or just a few
 times?
 I heard many times: "Yes, make it re-usable...yes, yes,
 yes..hmake it
 re-usable!" even if that is justified or not.

 2nd

 What is the limit? How deep a developer should go with the "re-
 factoring"?
 Is it necessary to split templates into numerous small fragments and
 thus make
 them an extremely confusing and difficult to track? I heard many
 times: "Yes,
 re-factore it ...yes, yes, yes..hre-factore it!" even if that
 is justified or not.

 3rd

 Most of you said that Symfony Framework enables developers to
 concentrate
 on business logic? Yes, that's OK. I just wanted to warn that in these
 efforts,
 Symfony developers are exaggerating a bit, which resulted with the
 intricate
 logic of the Symfony framework that hides the flow of the application
 to the level
 where it is very difficult to understand and monitor the application.

 This is my last post here.

 WBR,
 Ghost3D


 On Sep 25, 2:52 am, Jeremy Thomerson 
 wrote:
 > I've avoided responding on this thread to this point because your rude
 > foul-mouthed criticism is ridiculously ignorant and malicious.  But,
 > since
 > you once again call all developers here stupid, please be quickly
 > proven
 > wrong by reading the "INTRODUCTION T

[symfony-users] Re: Fatal Error in actions.class.php

2009-09-25 Thread Kieu Anh Tuan
Hi,
What do you have in $current_name and $token in your debugger? To me
EmployeeTablePeer::doSelectOne($c) returns null which means it could not
find the employee with name = $token.
I don't think that it will throw an exception when your
$this->getUser()->getAttribute('allnames') return null because this is
actually not an exception. Furthermore, it reaches your pink line $val =
$par_tuple->getEmpId(); so the if condition
if($this->getUser()->getAttribute('allnames')) must have returned not null.

In my opinion, there're somethings wrong with the $token that Propel could
not find the right user.


On Fri, Sep 25, 2009 at 11:33 AM, DEEPAK BHATIA wrote:

> Hi,
>
> Please find the code below
>
>
> ===
> if($this->getUser()->getAttribute('allnames'))
> {
>$current_name = $this->getUser()->getAttribute('allnames');
>
>$token = strtok($current_name, ",");
>$msubject = "Invitation for the meeting-Date:".$startdate." Start
> Time:".$stime." Room:".$room_tuple->getName();
>
>$c = new Criteria();
>$c->add(EmployeeTablePeer::NAME,$token);
>
>try
>{
>$par_tuple = EmployeeTablePeer::doSelectOne($c);
>}
>catch(PropelException $e)
>{
>   $this->redirect('login/logindberror');
>}
>$val = $par_tuple->getEmpId();
>
> ===
>
> I get the error for the line above -
>
> "Fatal Error: Call to a member function getEmpId() on a non-object in
> /opt/lampp/htdocs/crb/apps/tool/modules/book/actions/actions.class.php at
> line 2370 which is the highlighted pink line above.
>
> My opinion
> 
> My point is that session between web browser and server has been broken
> hence the $this->getUser()->getAttribute('allnames'); is returning a null
> value but if it is null then we should get PropelException.
>
> >
>

--~--~-~--~~~---~--~~
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: Symfony has definitely become too complicated framework

2009-09-25 Thread Sid Ferreira
I was thinking about this, while making a sf1.0 project... and indeed
dispite of how good the new things in 1.2, it really got really complex.In
some ways, to a new commer, use symfony isn't a good idea he doesn't need
only to use MVC and ORM anymore, he needs to learn (and almost master) the
symfony forms to the very first project.

I mean, it's insane in this point of view that sf can't make it easyer to
build a login form (let's ignore the plugin)... Almost against the 'KISS'
principle.

I think symfony is an expert weapon, but it is almost 'no newbies
allowed'...

ps: I hope I made my self clear about it.


On Fri, Sep 25, 2009 at 04:20, Alexandru-Emil Lupu wrote:

> Gareth, i might even say old php 3.. in php4 there were any oop layering in
> progress ..
>
> Fabien, if i remember right (haven't work to much with Rails) symfony
> folder structure is much alike with Ruby on Rails. By the way. Please close
> this non sense thread.
>
> Alecs
>
> On Fri, Sep 25, 2009 at 10:04 AM, Gareth McCumskey 
> wrote:
>
>> We recently hired a junior PHP developer, fresh out of college, getting
>> his first taste of using PHP AND symfony in a production environment. We
>> pretty much had to throw him in the deep end with using symfony and the
>> associated documentation and give him work to do.
>>
>> Guess what? Because of symfony's abstracted nature and the ability for
>> developers to focus on business logic, he is resolving bugs and adding new
>> features all the time. The only time he stops to ask my help with anything
>> is when it has to do with our OWN code implemented in symfony and NOT the
>> framework itself. To me , thats evidence enough that the framework and its
>> structure is not difficult to learn and get into for a new user who is
>> willing to take the time and learn it.
>>
>> If we had built our application without symfony we would still be very far
>> away from a releasable product costing the company more and more money.
>>
>> All of your responses show someone who is stuck in the old PHP4 procedural
>> line of thinking where its create functionality line by line and you are
>> apparently not willing to invest the relaistically small amount of time
>> required to use symfony.
>>
>>
>> On Fri, Sep 25, 2009 at 3:34 AM, bghost  wrote:
>>
>>>
>>> And? Where you saw any recommendation to use  tags outside
>>>  ??
>>> I never said that any developer is stupid here. But now I have changed
>>> my opinion
>>> under the pressure of your arguments.
>>>
>>> Anyway, finally I would say this:
>>>
>>> Most of you are calling for some alleged benefits that are hidden
>>> behind terms
>>> like "re-usable, re-factoring" or "developer can concentrate on
>>> business logic" ... bla ... bla .. bla
>>>
>>> 1st
>>>
>>> What does it mean to do something re-usable? Do you really need to
>>> spend
>>> too much time on that if it will eventually be used once or just a few
>>> times?
>>> I heard many times: "Yes, make it re-usable...yes, yes,
>>> yes..hmake it
>>> re-usable!" even if that is justified or not.
>>>
>>> 2nd
>>>
>>> What is the limit? How deep a developer should go with the "re-
>>> factoring"?
>>> Is it necessary to split templates into numerous small fragments and
>>> thus make
>>> them an extremely confusing and difficult to track? I heard many
>>> times: "Yes,
>>> re-factore it ...yes, yes, yes..hre-factore it!" even if that
>>> is justified or not.
>>>
>>> 3rd
>>>
>>> Most of you said that Symfony Framework enables developers to
>>> concentrate
>>> on business logic? Yes, that's OK. I just wanted to warn that in these
>>> efforts,
>>> Symfony developers are exaggerating a bit, which resulted with the
>>> intricate
>>> logic of the Symfony framework that hides the flow of the application
>>> to the level
>>> where it is very difficult to understand and monitor the application.
>>>
>>> This is my last post here.
>>>
>>> WBR,
>>> Ghost3D
>>>
>>>
>>> On Sep 25, 2:52 am, Jeremy Thomerson 
>>> wrote:
>>> > I've avoided responding on this thread to this point because your rude
>>> > foul-mouthed criticism is ridiculously ignorant and malicious.  But,
>>> since
>>> > you once again call all developers here stupid, please be quickly
>>> proven
>>> > wrong by reading the "INTRODUCTION TO TABLES" by the W3C.  If you don't
>>> know
>>> > who the W3C is, please try to do a little research.
>>> >
>>> > http://www.w3.org/TR/html401/struct/tables.html#h-11.1
>>> >
>>> > Jeremy
>>> >
>>> > On Thu, Sep 24, 2009 at 7:27 PM, bghost  wrote:
>>> >
>>> > > Ok Eno,
>>> >
>>> > > I visited that link and I did not thrilled because I found something
>>> > > wrong again:
>>> >
>>> > > 
>>> > >  
>>> >
>>> > >
>>> > >
>>> > >  Name
>>> > >  
>>> > >
>>> > >
>>> > >  Email
>>> > >  
>>> > >
>>> > >
>>> > >  Message
>>> > >  >> > > textarea>
>>> > >
>>> > >
>>> >
>>> > >
>>> > >  
>>> > >
>>> > >  
>>> > >
>>> > >  
>>> > > 
>>> >
>>> > > So, w

[symfony-users] Fatal Error in actions.class.php

2009-09-25 Thread DEEPAK BHATIA
Hi,

Please find the code below

===
if($this->getUser()->getAttribute('allnames'))
{
   $current_name = $this->getUser()->getAttribute('allnames');

   $token = strtok($current_name, ",");
   $msubject = "Invitation for the meeting-Date:".$startdate." Start
Time:".$stime." Room:".$room_tuple->getName();

   $c = new Criteria();
   $c->add(EmployeeTablePeer::NAME,$token);

   try
   {
   $par_tuple = EmployeeTablePeer::doSelectOne($c);
   }
   catch(PropelException $e)
   {
  $this->redirect('login/logindberror');
   }
   $val = $par_tuple->getEmpId();
===

I get the error for the line above -

"Fatal Error: Call to a member function getEmpId() on a non-object in
/opt/lampp/htdocs/crb/apps/tool/modules/book/actions/actions.class.php at
line 2370 which is the highlighted pink line above.

My opinion

My point is that session between web browser and server has been broken
hence the $this->getUser()->getAttribute('allnames'); is returning a null
value but if it is null then we should get PropelException.

--~--~-~--~~~---~--~~
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: Call For Information Re-organization [opinions needed]

2009-09-25 Thread Romain de Wolff
Comments is a good idea!
Oh and do you know http://www.gotapi.com ? The symfony section allows you to
browse the API quickly.

On Fri, Sep 25, 2009 at 8:50 AM, Gareth McCumskey wrote:

> I think taking a note from the php.net site (the PHP manual) is a good
> idea. The search feature in the php.net is incredibly useful and helps you
> target any part of PHP with a simple search for function, feature or class
> names. Having some "sitewide" search functionality for a specific part of
> symfony such as being able to track down "Forms", as an example, and having
> it go to a section that discusses the various components of the forms
> framework. Or Authentication, things like that. I know the API documentation
> exists but to have that wrapped in a section that deals with everything
> related such as examples etc.
>
> Allowing comments would also be great. Often the php.net description of a
> function or feature isn't that clear but then the user comments help clear
> things up.
>
> Just my 2 cents.
>
> On Wed, Sep 23, 2009 at 2:10 PM, fakingfantastic 
> wrote:
>
>>
>> I recently had a discussion with Fabien about this topic, and he
>> suggested it would be best if I stage the debate here.
>>
>> Has anyone ever felt like the information they needed to get on
>> Symfony was hard to find? Do you find that the information you need is
>> very-well documented on the site, but it takes a while to search for?
>> These are very big issues for me that over the last 6 months of me
>> learning the framework, have made it quite difficult.
>>
>> Do not get me wrong: I am not say "Symfony isn't well documented" (I
>> made that mistake when talking with Fabien). What I am saying is
>> Symfony-Project.org, for whatever reason, is always very difficult for
>> me to search through to find what I am looking for. I feel that it has
>> to do with the way the content is organized on the site. It doesn't
>> feel very compartmentalized to me. When I need to find out some
>> information on the framework, I seem to always have the same 3 issues:
>> "What am I trying to find out", "Where do I search to find the
>> information", and "Is this information outdated"?
>>
>> For now, I was to leave what I am asking a little vague, in hopes to
>> see what that naturally brings out in people about this. My ultimate
>> goal would be trying to put together an initiative to re-organize and
>> enhance the site to make it more "intuative" (if that's the right
>> word) for new-comers and seasoned users alike.
>>
>> Feel free to irc me at fakingfantastic aswell, i'm usually in #symfony.
>>
>>
>>
>
>
> --
> Gareth McCumskey
> http://garethmccumskey.blogspot.com
> twitter: @garethmcc
>
>
> >
>


-- 

Joan Crawford
- "I, Joan Crawford, I believe in the dollar. Everything I earn, I
spend."

--~--~-~--~~~---~--~~
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: Form posting problem

2009-09-25 Thread Lorand

Thank you for the suggestions.
I found the problem. It was my mistake in the routing logic.

Lorand

On Sep 24, 10:11 pm, Alexandru-Emil Lupu  wrote:
> could you show us some code ?
> also posible problems:
>
> - form invalid
> - a bad redirect
> - form action wrong
> - forms not closed properly
>
> I will wait your code to be able to say more
> // paste the component form / layout + article form / layout
>
> Alecs
>
>
>
> On Thu, Sep 24, 2009 at 10:05 PM, Lorand Tamas  wrote:
> > Hi all,
>
> > I have a form posting problem:
> > - in the main template (article) i display some informations, and i include
> > a component, which display a form (contact).
> > - the form action was set to a specific action (submitContact)
> > - when i post the form i receive back the same main template (article)
> > instead of the submitContact's template
> > Can anybody help me with this problem, why can not enter to the action
> > specified in the form?
>
> > Best regards, Lorand
>
> --
> As programmers create bigger & better idiot proof programs, so the universe
> creates bigger & better idiots!
> I am on web:  http://www.alecslupu.ro/
> I am on twitter:http://twitter.com/alecslupu
> I am on linkedIn:http://www.linkedin.com/in/alecslupu
> Tel: (+4)0748.543.798
--~--~-~--~~~---~--~~
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: Call For Information Re-organization [opinions needed]

2009-09-25 Thread Georg Gell

Hi,

as I am just now developing a symfony application, I will watch myself
how I try to get the information I need and maybe add some suggestions.

In general I would like to say that the symfony documentation is very
comprehensive and well done. Thanks to the symfony team for it. On some
parts the navigation could be improved, because I find myself very often
using google to find the information that is already provided on the site.

Maybe some suggestions that come to my mind right now:
(ref link for all examples:
http://www.symfony-project.org/book/1_2/14-Generators)

There is a search field on the right side of all documentation. AFAIK
this should search in the actual document I am reading.

For me an improvement would be to have the search field on top in the
right column, so I wouldn't have to search for it (see ref link and try
to find the search field).

And IMO the search should not be on the document I am reading only, but
on the whole documentation. The reason for this is, that some infos
probably are not in the document I am reading. For example in the
generator docs (ref link), I read something, and need some info about
the forms used (but they are not in the book, so they will not be
found). And even worse, when I use the navigation links on the right
side, I come to information about form helpers, and how to process a
form, but this is not the way the admin generator works, and now I am
even more confused. But if the search had provided a link to the new
form framework, I would have to read for a day again ;-)

BTW it seems that the search is not working as intended ATM. Go to the
ref link above and enter any term in the search, nothing is found.

I think that the search is well structured on php.net
(http://de.php.net/manual/en/). Here you find the search on top always
in the same place, and you can choose the scope of your search. On
symfony docs, options could be [this document, all documentation, API
documentation, all site, ...]

If I use google to find something in the docs, I am stuck in the chapter
then. Use my ref link again. Somewhere down the page you find "Chapter
18 explains the concept of Join more extensively." Good information. But
how the get there?
I can scroll down to the bottom, click on next chapter, wait for it to
load, scroll down again, and this four times.
Here my suggestions would be to add a link to the index in the middle,
and add the whole navigation on top also (last chapter, index, next
chapter).
Also maybe there would be an option to automatically create a link for
chapter ## in the docs?

I think most of the suggestions are implemented quite quickly and would
help me a lot. Anyone else also?

Georg

fakingfantastic schrieb:
> I recently had a discussion with Fabien about this topic, and he
> suggested it would be best if I stage the debate here.
> 
> Has anyone ever felt like the information they needed to get on
> Symfony was hard to find? Do you find that the information you need is
> very-well documented on the site, but it takes a while to search for?
> These are very big issues for me that over the last 6 months of me
> learning the framework, have made it quite difficult.
> 
> Do not get me wrong: I am not say "Symfony isn't well documented" (I
> made that mistake when talking with Fabien). What I am saying is
> Symfony-Project.org, for whatever reason, is always very difficult for
> me to search through to find what I am looking for. I feel that it has
> to do with the way the content is organized on the site. It doesn't
> feel very compartmentalized to me. When I need to find out some
> information on the framework, I seem to always have the same 3 issues:
> "What am I trying to find out", "Where do I search to find the
> information", and "Is this information outdated"?
> 
> For now, I was to leave what I am asking a little vague, in hopes to
> see what that naturally brings out in people about this. My ultimate
> goal would be trying to put together an initiative to re-organize and
> enhance the site to make it more "intuative" (if that's the right
> word) for new-comers and seasoned users alike.
> 
> Feel free to irc me at fakingfantastic aswell, i'm usually in #symfony.
> 
> > 
> 

--~--~-~--~~~---~--~~
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: Call For Information Re-organization [opinions needed]

2009-09-25 Thread Massimiliano Arione

+1 for php.net-like notes/comments.

On Sep 25, 8:50 am, Gareth McCumskey  wrote:
> I think taking a note from the php.net site (the PHP manual) is a good idea.
> The search feature in the php.net is incredibly useful and helps you target
> any part of PHP with a simple search for function, feature or class names.
> Having some "sitewide" search functionality for a specific part of symfony
> such as being able to track down "Forms", as an example, and having it go to
> a section that discusses the various components of the forms framework. Or
> Authentication, things like that. I know the API documentation exists but to
> have that wrapped in a section that deals with everything related such as
> examples etc.
>
> Allowing comments would also be great. Often the php.net description of a
> function or feature isn't that clear but then the user comments help clear
> things up.
>
> Just my 2 cents.
>
> On Wed, Sep 23, 2009 at 2:10 PM, fakingfantastic 
> wrote:
>
>
>
>
>
> > I recently had a discussion with Fabien about this topic, and he
> > suggested it would be best if I stage the debate here.
>
> > Has anyone ever felt like the information they needed to get on
> > Symfony was hard to find? Do you find that the information you need is
> > very-well documented on the site, but it takes a while to search for?
> > These are very big issues for me that over the last 6 months of me
> > learning the framework, have made it quite difficult.
>
> > Do not get me wrong: I am not say "Symfony isn't well documented" (I
> > made that mistake when talking with Fabien). What I am saying is
> > Symfony-Project.org, for whatever reason, is always very difficult for
> > me to search through to find what I am looking for. I feel that it has
> > to do with the way the content is organized on the site. It doesn't
> > feel very compartmentalized to me. When I need to find out some
> > information on the framework, I seem to always have the same 3 issues:
> > "What am I trying to find out", "Where do I search to find the
> > information", and "Is this information outdated"?
>
> > For now, I was to leave what I am asking a little vague, in hopes to
> > see what that naturally brings out in people about this. My ultimate
> > goal would be trying to put together an initiative to re-organize and
> > enhance the site to make it more "intuative" (if that's the right
> > word) for new-comers and seasoned users alike.
>
> > Feel free to irc me at fakingfantastic aswell, i'm usually in #symfony.
>
> --
> Gareth McCumskeyhttp://garethmccumskey.blogspot.com
> twitter: @garethmcc
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-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: Symfony has definitely become too complicated framework

2009-09-25 Thread Alexandru-Emil Lupu
Gareth, i might even say old php 3.. in php4 there were any oop layering in
progress ..

Fabien, if i remember right (haven't work to much with Rails) symfony folder
structure is much alike with Ruby on Rails. By the way. Please close this
non sense thread.

Alecs

On Fri, Sep 25, 2009 at 10:04 AM, Gareth McCumskey wrote:

> We recently hired a junior PHP developer, fresh out of college, getting his
> first taste of using PHP AND symfony in a production environment. We pretty
> much had to throw him in the deep end with using symfony and the associated
> documentation and give him work to do.
>
> Guess what? Because of symfony's abstracted nature and the ability for
> developers to focus on business logic, he is resolving bugs and adding new
> features all the time. The only time he stops to ask my help with anything
> is when it has to do with our OWN code implemented in symfony and NOT the
> framework itself. To me , thats evidence enough that the framework and its
> structure is not difficult to learn and get into for a new user who is
> willing to take the time and learn it.
>
> If we had built our application without symfony we would still be very far
> away from a releasable product costing the company more and more money.
>
> All of your responses show someone who is stuck in the old PHP4 procedural
> line of thinking where its create functionality line by line and you are
> apparently not willing to invest the relaistically small amount of time
> required to use symfony.
>
>
> On Fri, Sep 25, 2009 at 3:34 AM, bghost  wrote:
>
>>
>> And? Where you saw any recommendation to use  tags outside
>>  ??
>> I never said that any developer is stupid here. But now I have changed
>> my opinion
>> under the pressure of your arguments.
>>
>> Anyway, finally I would say this:
>>
>> Most of you are calling for some alleged benefits that are hidden
>> behind terms
>> like "re-usable, re-factoring" or "developer can concentrate on
>> business logic" ... bla ... bla .. bla
>>
>> 1st
>>
>> What does it mean to do something re-usable? Do you really need to
>> spend
>> too much time on that if it will eventually be used once or just a few
>> times?
>> I heard many times: "Yes, make it re-usable...yes, yes,
>> yes..hmake it
>> re-usable!" even if that is justified or not.
>>
>> 2nd
>>
>> What is the limit? How deep a developer should go with the "re-
>> factoring"?
>> Is it necessary to split templates into numerous small fragments and
>> thus make
>> them an extremely confusing and difficult to track? I heard many
>> times: "Yes,
>> re-factore it ...yes, yes, yes..hre-factore it!" even if that
>> is justified or not.
>>
>> 3rd
>>
>> Most of you said that Symfony Framework enables developers to
>> concentrate
>> on business logic? Yes, that's OK. I just wanted to warn that in these
>> efforts,
>> Symfony developers are exaggerating a bit, which resulted with the
>> intricate
>> logic of the Symfony framework that hides the flow of the application
>> to the level
>> where it is very difficult to understand and monitor the application.
>>
>> This is my last post here.
>>
>> WBR,
>> Ghost3D
>>
>>
>> On Sep 25, 2:52 am, Jeremy Thomerson 
>> wrote:
>> > I've avoided responding on this thread to this point because your rude
>> > foul-mouthed criticism is ridiculously ignorant and malicious.  But,
>> since
>> > you once again call all developers here stupid, please be quickly proven
>> > wrong by reading the "INTRODUCTION TO TABLES" by the W3C.  If you don't
>> know
>> > who the W3C is, please try to do a little research.
>> >
>> > http://www.w3.org/TR/html401/struct/tables.html#h-11.1
>> >
>> > Jeremy
>> >
>> > On Thu, Sep 24, 2009 at 7:27 PM, bghost  wrote:
>> >
>> > > Ok Eno,
>> >
>> > > I visited that link and I did not thrilled because I found something
>> > > wrong again:
>> >
>> > > 
>> > >  
>> >
>> > >
>> > >
>> > >  Name
>> > >  
>> > >
>> > >
>> > >  Email
>> > >  
>> > >
>> > >
>> > >  Message
>> > >  > > > textarea>
>> > >
>> > >
>> >
>> > >
>> > >  
>> > >
>> > >  
>> > >
>> > >  
>> > > 
>> >
>> > > So, what is the problem here:
>> >
>> > >  tag within the HTML table should never be used
>> > > outside  , because each web browser
>> > > could interpreted this in different ways! Now I understand
>> > > better why most of you loves the Symfony Form
>> > > framework - most obviously does not even basic
>> > > knowledge of the HTML.
>> >
>> > > WBR,
>> > > Ghost3D
>> >
>> > > On Sep 25, 12:11 am, Eno  wrote:
>> > > > On Thu, 24 Sep 2009, bghost wrote:
>> > > > > This is bad formatted HTML - where is  tag? Using ,
>> 
>> > > > > and  without table - terrible !
>> >
>> > > > As the example in the docs show, *you* must supply that:
>> >
>> > > >
>> http://www.symfony-project.org/forms/1_2/en/01-Form-Creation#chapter_...
>> >
>> > > > --
>>
>>
>
>
> --
> Gareth McCumskey
> http://garethmccumskey.blogspot.com
> twitter: @garet

[symfony-users] Re: Symfony has definitely become too complicated framework

2009-09-25 Thread Gareth McCumskey
We recently hired a junior PHP developer, fresh out of college, getting his
first taste of using PHP AND symfony in a production environment. We pretty
much had to throw him in the deep end with using symfony and the associated
documentation and give him work to do.

Guess what? Because of symfony's abstracted nature and the ability for
developers to focus on business logic, he is resolving bugs and adding new
features all the time. The only time he stops to ask my help with anything
is when it has to do with our OWN code implemented in symfony and NOT the
framework itself. To me , thats evidence enough that the framework and its
structure is not difficult to learn and get into for a new user who is
willing to take the time and learn it.

If we had built our application without symfony we would still be very far
away from a releasable product costing the company more and more money.

All of your responses show someone who is stuck in the old PHP4 procedural
line of thinking where its create functionality line by line and you are
apparently not willing to invest the relaistically small amount of time
required to use symfony.

On Fri, Sep 25, 2009 at 3:34 AM, bghost  wrote:

>
> And? Where you saw any recommendation to use  tags outside
>  ??
> I never said that any developer is stupid here. But now I have changed
> my opinion
> under the pressure of your arguments.
>
> Anyway, finally I would say this:
>
> Most of you are calling for some alleged benefits that are hidden
> behind terms
> like "re-usable, re-factoring" or "developer can concentrate on
> business logic" ... bla ... bla .. bla
>
> 1st
>
> What does it mean to do something re-usable? Do you really need to
> spend
> too much time on that if it will eventually be used once or just a few
> times?
> I heard many times: "Yes, make it re-usable...yes, yes,
> yes..hmake it
> re-usable!" even if that is justified or not.
>
> 2nd
>
> What is the limit? How deep a developer should go with the "re-
> factoring"?
> Is it necessary to split templates into numerous small fragments and
> thus make
> them an extremely confusing and difficult to track? I heard many
> times: "Yes,
> re-factore it ...yes, yes, yes..hre-factore it!" even if that
> is justified or not.
>
> 3rd
>
> Most of you said that Symfony Framework enables developers to
> concentrate
> on business logic? Yes, that's OK. I just wanted to warn that in these
> efforts,
> Symfony developers are exaggerating a bit, which resulted with the
> intricate
> logic of the Symfony framework that hides the flow of the application
> to the level
> where it is very difficult to understand and monitor the application.
>
> This is my last post here.
>
> WBR,
> Ghost3D
>
>
> On Sep 25, 2:52 am, Jeremy Thomerson 
> wrote:
> > I've avoided responding on this thread to this point because your rude
> > foul-mouthed criticism is ridiculously ignorant and malicious.  But,
> since
> > you once again call all developers here stupid, please be quickly proven
> > wrong by reading the "INTRODUCTION TO TABLES" by the W3C.  If you don't
> know
> > who the W3C is, please try to do a little research.
> >
> > http://www.w3.org/TR/html401/struct/tables.html#h-11.1
> >
> > Jeremy
> >
> > On Thu, Sep 24, 2009 at 7:27 PM, bghost  wrote:
> >
> > > Ok Eno,
> >
> > > I visited that link and I did not thrilled because I found something
> > > wrong again:
> >
> > > 
> > >  
> >
> > >
> > >
> > >  Name
> > >  
> > >
> > >
> > >  Email
> > >  
> > >
> > >
> > >  Message
> > >   > > textarea>
> > >
> > >
> >
> > >
> > >  
> > >
> > >  
> > >
> > >  
> > > 
> >
> > > So, what is the problem here:
> >
> > >  tag within the HTML table should never be used
> > > outside  , because each web browser
> > > could interpreted this in different ways! Now I understand
> > > better why most of you loves the Symfony Form
> > > framework - most obviously does not even basic
> > > knowledge of the HTML.
> >
> > > WBR,
> > > Ghost3D
> >
> > > On Sep 25, 12:11 am, Eno  wrote:
> > > > On Thu, 24 Sep 2009, bghost wrote:
> > > > > This is bad formatted HTML - where is  tag? Using , 
> > > > > and  without table - terrible !
> >
> > > > As the example in the docs show, *you* must supply that:
> >
> > > >
> http://www.symfony-project.org/forms/1_2/en/01-Form-Creation#chapter_...
> >
> > > > --
> >
>


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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-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
-~--~~~~--~~--~--~---