I figured out what happened.
The damn thing is that the word "all" repeats itself in the built-in
settings.yml file that comes with Symfony. When you first install your
project, you've got this in your file:
all:
.settings:
enabled_modules: [default, sfMediaLibrary]
# Form security secret (CSRF protection)
csrf_secret: false # Unique secret to enable CSRF
protection or false to disable
# Output escaping settings
escaping_strategy: false # Determines how
variables are made available to templates. Accepted values: on, off.
#all:
# .actions:
# error_404_module: default # To be called when a 404 error
is raised
# error_404_action: error404 # Or when the requested URL
doesn't match any route
#
# login_module: default # To be called when a non-
authenticated user
# login_action: login # Tries to access a secure page
#
# secure_module: default # To be called when a user
doesn't have
# secure_action: secure # The credentials required for an
action
What I did was uncomment the commented part, so now I had the "all"
repeating twice, and the second one overwrote the first one:
all:
.settings:
enabled_modules: [default, sfMediaLibrary]
# Form security secret (CSRF protection)
csrf_secret: false # Unique secret to enable CSRF
protection or false to disable
# Output escaping settings
escaping_strategy: false # Determines how
variables are made available to templates. Accepted values: on, off.
all:
.actions:
error_404_module: default # To be called when a 404 error
is raised
error_404_action: error404 # Or when the requested URL
doesn't match any route
login_module: default # To be called when a non-
authenticated user
login_action: login # Tries to access a secure page
secure_module: default # To be called when a user
doesn't have
secure_action: secure # The credentials required for an
action
I didn't realize the problem till I tried to go back into
sfMediaLibrary and got this error:
[sfConfigurationException]
The module "sfMediaLibrary" is not enabled.
The second "all" is wiping out the line that enables the modules,
including the default module.
This is a stupid way to set up the built-in settings.yml file, in my
opinion.
On Mar 6, 6:06 am, Lawrence Krubner <[email protected]> wrote:
> On Mar 6, 2:04 am, Sid Bachtiar <[email protected]> wrote:
>
> > No, AFAIK there isn't default login form. You need sfGuardPlugin or
> > build your own.
>
> Where does the login form go? Symfony redirects me to this URL:
>
> frontend_dev.php/symfony/login
>
> But where is themodulecalled "symfony"?
>
> Symfony is redirecting me from this URL:
>
> frontend_dev.php/newnews/edit
>
> I don't want people to reach that URL unless they are logged in. So
> symfony is correctly keeping out of that URL. But it redirects me to
> an unknownmodule.
>
> I created a loginSuccess.php template and put in the newnewsmodule,
> but that had no effect.
>
>
>
> > On Fri, Mar 6, 2009 at 7:59 PM, LawrenceKrubner<[email protected]>
> > wrote:
>
> > > Check out this screenshot:
>
> > >http://lawrence.sds5.com/no_login.gif
>
> > > I find this odd. I've got amoduleI want to lock down to people who
> > > are logged in. I've got this in themodule'sconfig/security.yml:
>
> > > read:
> > > is_secure: on
>
> > > update:
> > > is_secure: on
>
> > > delete:
> > > is_secure: on
>
> > > edit:
> > > is_secure: on
>
> > > all:
> > > is_secure: off
>
> > > I've got this in the apps settings.yml:
>
> > > all:
> > > .actions:
> > > error_404_module: default # To be called when a 404 error
> > > is raised
> > > error_404_action: error404 # Or when the requested URL
> > > doesn't match any route
>
> > > login_module: default # To be called when a non-
> > > authenticated user
> > > login_action: login # Tries to access a secure page
>
> > > secure_module: default # To be called when a user
> > > doesn't have
> > > secure_action: secure # The credentials required for
> > > an action
>
> > > If I go to themodule, I'm told the page is not public. This is
> > > expected behavior. I then click on the link "Proceed to login". What I
> > > get is what you see in the screenshot. It continues to tell me that
> > > the page is not public. Shouldn't it offer me a login form? I thought
> > > there was a default login form built into the defaultmodule?
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---